VTK
dox/Interaction/Widgets/vtkTerrainDataPointPlacer.h
Go to the documentation of this file.
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 "vtkInteractionWidgetsModule.h" // For export macro
00043 #include "vtkPointPlacer.h"
00044 
00045 class vtkPropCollection;
00046 class vtkProp;
00047 class vtkPropPicker;
00048 
00049 class VTKINTERACTIONWIDGETS_EXPORT vtkTerrainDataPointPlacer : public vtkPointPlacer
00050 {
00051 public:
00053   static vtkTerrainDataPointPlacer *New();
00054 
00056 
00057   vtkTypeMacro(vtkTerrainDataPointPlacer,vtkPointPlacer);
00058   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00061   // Descuription:
00062   // Add an actor (that represents a terrain in a rendererd scene) to the
00063   // list. Only props in this list are considered by the PointPlacer
00064   virtual void AddProp( vtkProp * );
00065   virtual void RemoveAllProps();
00066 
00068 
00072   vtkSetMacro(HeightOffset,double);
00073   vtkGetMacro(HeightOffset,double);
00075 
00077 
00082   virtual int ComputeWorldPosition( vtkRenderer *ren,
00083                                     double displayPos[2],
00084                                     double worldPos[3],
00085                                     double worldOrient[9] );
00087 
00089 
00092   virtual int ComputeWorldPosition( vtkRenderer *ren,
00093                                     double displayPos[2],
00094                                     double refWorldPos[3],
00095                                     double worldPos[3],
00096                                     double worldOrient[9] );
00098 
00101   virtual int ValidateWorldPosition( double worldPos[3] );
00102 
00104   virtual int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] );
00105 
00107 
00109   virtual int ValidateWorldPosition( double worldPos[3],
00110                                      double worldOrient[9] );
00112 
00114 
00115   vtkGetObjectMacro( PropPicker, vtkPropPicker );
00117 
00118 protected:
00119   vtkTerrainDataPointPlacer();
00120   ~vtkTerrainDataPointPlacer();
00121 
00122   // The props that represents the terrain data (one or more) in a rendered
00123   // scene
00124   vtkPropCollection  *TerrainProps;
00125   vtkPropPicker      *PropPicker;
00126   double              HeightOffset;
00127 
00128 private:
00129   vtkTerrainDataPointPlacer(const vtkTerrainDataPointPlacer&);  //Not implemented
00130   void operator=(const vtkTerrainDataPointPlacer&);  //Not implemented
00131 };
00132 
00133 #endif