VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkVisibilitySort.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 =========================================================================*/ 00015 00016 /* 00017 * Copyright 2003 Sandia Corporation. 00018 * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00019 * license for use of this work by or on behalf of the 00020 * U.S. Government. Redistribution and use in source and binary forms, with 00021 * or without modification, are permitted provided that this Notice and any 00022 * statement of authorship are reproduced on all copies. 00023 */ 00024 00045 #ifndef vtkVisibilitySort_h 00046 #define vtkVisibilitySort_h 00047 00048 #include "vtkRenderingCoreModule.h" // For export macro 00049 #include "vtkObject.h" 00050 00051 class vtkIdTypeArray; 00052 class vtkDataSet; 00053 class vtkMatrix4x4; 00054 class vtkCamera; 00055 00056 class VTKRENDERINGCORE_EXPORT vtkVisibilitySort : public vtkObject 00057 { 00058 public: 00059 vtkTypeMacro(vtkVisibilitySort, vtkObject); 00060 virtual void PrintSelf(ostream &os, vtkIndent indent); 00061 00063 00072 virtual void InitTraversal() = 0; 00073 virtual vtkIdTypeArray *GetNextCells() = 0; 00075 00077 00079 vtkSetClampMacro(MaxCellsReturned, int, 1, VTK_INT_MAX); 00080 vtkGetMacro(MaxCellsReturned, int); 00082 00084 00087 virtual void SetModelTransform(vtkMatrix4x4 *mat); 00088 vtkGetObjectMacro(ModelTransform, vtkMatrix4x4); 00090 00091 vtkGetObjectMacro(InverseModelTransform, vtkMatrix4x4); 00092 00094 00095 virtual void SetCamera(vtkCamera *camera); 00096 vtkGetObjectMacro(Camera, vtkCamera); 00098 00100 00101 virtual void SetInput(vtkDataSet *data); 00102 vtkGetObjectMacro(Input, vtkDataSet); 00104 00106 00108 vtkGetMacro(Direction, int); 00109 vtkSetMacro(Direction, int); 00110 void SetDirectionToBackToFront() { this->SetDirection(BACK_TO_FRONT); } 00111 void SetDirectionToFrontToBack() { this->SetDirection(FRONT_TO_BACK); } 00113 00114 //BTX 00115 enum { BACK_TO_FRONT, FRONT_TO_BACK }; 00116 //ETX 00117 00119 00120 virtual void Register(vtkObjectBase *o); 00121 virtual void UnRegister(vtkObjectBase *o); 00123 00124 protected: 00125 vtkVisibilitySort(); 00126 virtual ~vtkVisibilitySort(); 00127 00128 vtkTimeStamp LastSortTime; 00129 00130 vtkMatrix4x4 *ModelTransform; 00131 vtkMatrix4x4 *InverseModelTransform; 00132 vtkCamera *Camera; 00133 vtkDataSet *Input; 00134 00135 int MaxCellsReturned; 00136 00137 int Direction; 00138 00139 virtual void ReportReferences(vtkGarbageCollector *collector); 00140 00141 private: 00142 vtkVisibilitySort(const vtkVisibilitySort &); // Not implemented. 00143 void operator=(const vtkVisibilitySort &); // Not implemented. 00144 }; 00145 00146 #endif //vtkVisibilitySort_h 00147