VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTerrainDataPointPlacer.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 =========================================================================*/ 00039 #ifndef __vtkTerrainDataPointPlacer_h 00040 #define __vtkTerrainDataPointPlacer_h 00041 00042 #include "vtkPointPlacer.h" 00043 00044 class vtkPropCollection; 00045 class vtkProp; 00046 class vtkPropPicker; 00047 00048 class VTK_WIDGETS_EXPORT vtkTerrainDataPointPlacer : public vtkPointPlacer 00049 { 00050 public: 00052 static vtkTerrainDataPointPlacer *New(); 00053 00055 00056 vtkTypeMacro(vtkTerrainDataPointPlacer,vtkPointPlacer); 00057 void PrintSelf(ostream& os, vtkIndent indent); 00059 00060 // Descuription: 00061 // Add an actor (that represents a terrain in a rendererd scene) to the 00062 // list. Only props in this list are considered by the PointPlacer 00063 virtual void AddProp( vtkProp * ); 00064 virtual void RemoveAllProps(); 00065 00067 00071 vtkSetMacro(HeightOffset,double); 00072 vtkGetMacro(HeightOffset,double); 00074 00076 00081 virtual int ComputeWorldPosition( vtkRenderer *ren, 00082 double displayPos[2], 00083 double worldPos[3], 00084 double worldOrient[9] ); 00086 00088 00091 virtual int ComputeWorldPosition( vtkRenderer *ren, 00092 double displayPos[2], 00093 double refWorldPos[3], 00094 double worldPos[3], 00095 double worldOrient[9] ); 00097 00100 virtual int ValidateWorldPosition( double worldPos[3] ); 00101 00103 virtual int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] ); 00104 00106 00108 virtual int ValidateWorldPosition( double worldPos[3], 00109 double worldOrient[9] ); 00111 00113 00114 vtkGetObjectMacro( PropPicker, vtkPropPicker ); 00116 00117 protected: 00118 vtkTerrainDataPointPlacer(); 00119 ~vtkTerrainDataPointPlacer(); 00120 00121 // The props that represents the terrain data (one or more) in a rendered 00122 // scene 00123 vtkPropCollection *TerrainProps; 00124 vtkPropPicker *PropPicker; 00125 double HeightOffset; 00126 00127 private: 00128 vtkTerrainDataPointPlacer(const vtkTerrainDataPointPlacer&); //Not implemented 00129 void operator=(const vtkTerrainDataPointPlacer&); //Not implemented 00130 }; 00131 00132 #endif