VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkCellCentersPointPlacer.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 =========================================================================*/ 00040 #ifndef __vtkCellCentersPointPlacer_h 00041 #define __vtkCellCentersPointPlacer_h 00042 00043 #include "vtkInteractionWidgetsModule.h" // For export macro 00044 #include "vtkPointPlacer.h" 00045 00046 class vtkRenderer; 00047 class vtkPropCollection; 00048 class vtkProp; 00049 class vtkCellPicker; 00050 00051 class VTKINTERACTIONWIDGETS_EXPORT vtkCellCentersPointPlacer : public vtkPointPlacer 00052 { 00053 public: 00055 static vtkCellCentersPointPlacer *New(); 00056 00058 00059 vtkTypeMacro(vtkCellCentersPointPlacer,vtkPointPlacer); 00060 void PrintSelf(ostream& os, vtkIndent indent); 00062 00063 // Descuription: 00064 // Add an actor (that represents a terrain in a rendererd scene) to the 00065 // list. Only props in this list are considered by the PointPlacer 00066 virtual void AddProp( vtkProp * ); 00067 virtual void RemoveViewProp(vtkProp *prop); 00068 virtual void RemoveAllProps(); 00069 int HasProp( vtkProp * ); 00070 int GetNumberOfProps(); 00071 00073 00078 virtual int ComputeWorldPosition( vtkRenderer *ren, 00079 double displayPos[2], 00080 double worldPos[3], 00081 double worldOrient[9] ); 00083 00085 00088 virtual int ComputeWorldPosition( vtkRenderer *ren, 00089 double displayPos[2], 00090 double refWorldPos[3], 00091 double worldPos[3], 00092 double worldOrient[9] ); 00094 00097 virtual int ValidateWorldPosition( double worldPos[3] ); 00098 00100 virtual int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] ); 00101 00103 00105 virtual int ValidateWorldPosition( double worldPos[3], 00106 double worldOrient[9] ); 00108 00110 00111 vtkGetObjectMacro( CellPicker, vtkCellPicker ); 00113 00115 00119 vtkSetMacro( Mode, int ); 00120 vtkGetMacro( Mode, int ); 00122 00123 enum 00124 { 00125 ParametricCenter = 0, 00126 CellPointsMean, 00127 None 00128 }; 00129 00130 protected: 00131 vtkCellCentersPointPlacer(); 00132 ~vtkCellCentersPointPlacer(); 00133 00134 // The props that represents the terrain data (one or more) in a rendered 00135 // scene 00136 vtkPropCollection *PickProps; 00137 vtkCellPicker *CellPicker; 00138 int Mode; 00139 00140 private: 00141 vtkCellCentersPointPlacer(const vtkCellCentersPointPlacer&); //Not implemented 00142 void operator=(const vtkCellCentersPointPlacer&); //Not implemented 00143 }; 00144 00145 #endif