VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkFrustumCoverageCuller.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00037 #ifndef __vtkFrustumCoverageCuller_h 00038 #define __vtkFrustumCoverageCuller_h 00039 00040 #include "vtkCuller.h" 00041 00042 #define VTK_CULLER_SORT_NONE 0 00043 #define VTK_CULLER_SORT_FRONT_TO_BACK 1 00044 #define VTK_CULLER_SORT_BACK_TO_FRONT 2 00045 00046 class vtkProp; 00047 class vtkRenderer; 00048 00049 class VTK_RENDERING_EXPORT vtkFrustumCoverageCuller : public vtkCuller 00050 { 00051 public: 00052 static vtkFrustumCoverageCuller *New(); 00053 vtkTypeMacro(vtkFrustumCoverageCuller,vtkCuller); 00054 void PrintSelf(ostream& os,vtkIndent indent); 00055 00057 00059 vtkSetMacro( MinimumCoverage, double ); 00060 vtkGetMacro( MinimumCoverage, double ); 00062 00064 00066 vtkSetMacro( MaximumCoverage, double ); 00067 vtkGetMacro( MaximumCoverage, double ); 00069 00071 00073 vtkSetClampMacro( SortingStyle, int, 00074 VTK_CULLER_SORT_NONE, VTK_CULLER_SORT_BACK_TO_FRONT ); 00075 vtkGetMacro(SortingStyle,int); 00076 void SetSortingStyleToNone() 00077 {this->SetSortingStyle(VTK_CULLER_SORT_NONE);}; 00078 void SetSortingStyleToBackToFront() 00079 {this->SetSortingStyle(VTK_CULLER_SORT_BACK_TO_FRONT);}; 00080 void SetSortingStyleToFrontToBack() 00081 {this->SetSortingStyle(VTK_CULLER_SORT_FRONT_TO_BACK);}; 00082 const char *GetSortingStyleAsString(void); 00084 00085 //BTX 00087 00091 double Cull( vtkRenderer *ren, vtkProp **propList, 00092 int& listLength, int& initialized ); 00093 //ETX 00095 00096 protected: 00097 vtkFrustumCoverageCuller(); 00098 ~vtkFrustumCoverageCuller() {}; 00099 00100 double MinimumCoverage; 00101 double MaximumCoverage; 00102 int SortingStyle; 00103 private: 00104 vtkFrustumCoverageCuller(const vtkFrustumCoverageCuller&); // Not implemented. 00105 void operator=(const vtkFrustumCoverageCuller&); // Not implemented. 00106 }; 00107 00108 00109 #endif