00001 00002 /*========================================================================= 00003 00004 Program: Visualization Toolkit 00005 Module: $RCSfile: vtkFrustumCoverageCuller.h,v $ 00006 Language: C++ 00007 00008 00009 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 00010 All rights reserved. 00011 00012 Redistribution and use in source and binary forms, with or without 00013 modification, are permitted provided that the following conditions are met: 00014 00015 * Redistributions of source code must retain the above copyright notice, 00016 this list of conditions and the following disclaimer. 00017 00018 * Redistributions in binary form must reproduce the above copyright notice, 00019 this list of conditions and the following disclaimer in the documentation 00020 and/or other materials provided with the distribution. 00021 00022 * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names 00023 of any contributors may be used to endorse or promote products derived 00024 from this software without specific prior written permission. 00025 00026 * Modified source versions must be plainly marked as such, and must not be 00027 misrepresented as being the original software. 00028 00029 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' 00030 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00031 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00032 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR 00033 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00034 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00035 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00036 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00037 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00038 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00039 00040 =========================================================================*/ 00062 #ifndef __vtkFrustumCoverageCuller_h 00063 #define __vtkFrustumCoverageCuller_h 00064 00065 #include "vtkCuller.h" 00066 00067 #define VTK_CULLER_SORT_NONE 0 00068 #define VTK_CULLER_SORT_FRONT_TO_BACK 1 00069 #define VTK_CULLER_SORT_BACK_TO_FRONT 2 00070 00071 class vtkProp; 00072 class vtkRenderer; 00073 00074 class VTK_EXPORT vtkFrustumCoverageCuller : public vtkCuller 00075 { 00076 public: 00077 static vtkFrustumCoverageCuller *New(); 00078 vtkTypeMacro(vtkFrustumCoverageCuller,vtkCuller); 00079 void PrintSelf(ostream& os,vtkIndent indent); 00080 00083 vtkSetMacro( MinimumCoverage, float ); 00084 vtkGetMacro( MinimumCoverage, float ); 00085 00088 vtkSetMacro( MaximumCoverage, float ); 00089 vtkGetMacro( MaximumCoverage, float ); 00090 00093 vtkSetClampMacro( SortingStyle, int, 00094 VTK_CULLER_SORT_NONE, VTK_CULLER_SORT_BACK_TO_FRONT ); 00095 vtkGetMacro(SortingStyle,int); 00096 void SetSortingStyleToNone() 00097 {this->SetSortingStyle(VTK_CULLER_SORT_NONE);}; 00098 void SetSortingStyleToBackToFront() 00099 {this->SetSortingStyle(VTK_CULLER_SORT_BACK_TO_FRONT);}; 00100 void SetSortingStyleToFrontToBack() 00101 {this->SetSortingStyle(VTK_CULLER_SORT_FRONT_TO_BACK);}; 00102 const char *GetSortingStyleAsString(void); 00103 00104 //BTX 00109 float Cull( vtkRenderer *ren, vtkProp **propList, 00110 int& listLength, int& initialized ); 00111 //ETX 00112 00113 protected: 00114 vtkFrustumCoverageCuller(); 00115 ~vtkFrustumCoverageCuller() {}; 00116 vtkFrustumCoverageCuller(const vtkFrustumCoverageCuller&) {}; 00117 void operator=(const vtkFrustumCoverageCuller&) {}; 00118 00119 float MinimumCoverage; 00120 float MaximumCoverage; 00121 int SortingStyle; 00122 }; 00123 00124 00125 #endif
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001