VTK
dox/Interaction/Widgets/vtkPolyDataPointPlacer.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPolyDataPointPlacer.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 =========================================================================*/
00033 #ifndef __vtkPolyDataPointPlacer_h
00034 #define __vtkPolyDataPointPlacer_h
00035 
00036 #include "vtkInteractionWidgetsModule.h" // For export macro
00037 #include "vtkPointPlacer.h"
00038 
00039 class vtkRenderer;
00040 class vtkPropCollection;
00041 class vtkProp;
00042 class vtkPropPicker;
00043 
00044 class VTKINTERACTIONWIDGETS_EXPORT vtkPolyDataPointPlacer : public vtkPointPlacer
00045 {
00046 public:
00048   static vtkPolyDataPointPlacer *New();
00049 
00051 
00052   vtkTypeMacro(vtkPolyDataPointPlacer,vtkPointPlacer);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00055 
00056   // Descuription:
00057   // Add an actor (that represents a terrain in a rendererd scene) to the
00058   // list. Only props in this list are considered by the PointPlacer
00059   virtual void AddProp( vtkProp * );
00060   virtual void RemoveViewProp(vtkProp *prop);
00061   virtual void RemoveAllProps();
00062   int          HasProp( vtkProp * );
00063   int          GetNumberOfProps();
00064 
00066 
00071   virtual int ComputeWorldPosition( vtkRenderer *ren,
00072                                     double displayPos[2],
00073                                     double worldPos[3],
00074                                     double worldOrient[9] );
00076 
00078 
00081   virtual int ComputeWorldPosition( vtkRenderer *ren,
00082                                     double displayPos[2],
00083                                     double refWorldPos[3],
00084                                     double worldPos[3],
00085                                     double worldOrient[9] );
00087 
00090   virtual int ValidateWorldPosition( double worldPos[3] );
00091 
00093   virtual int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] );
00094 
00096 
00098   virtual int ValidateWorldPosition( double worldPos[3],
00099                                      double worldOrient[9] );
00101 
00103 
00104   vtkGetObjectMacro( PropPicker, vtkPropPicker );
00106 
00107 protected:
00108   vtkPolyDataPointPlacer();
00109   ~vtkPolyDataPointPlacer();
00110 
00111   // The props that represents the terrain data (one or more) in a rendered
00112   // scene
00113   vtkPropCollection  *SurfaceProps;
00114   vtkPropPicker      *PropPicker;
00115 
00116 private:
00117   vtkPolyDataPointPlacer(const vtkPolyDataPointPlacer&);  //Not implemented
00118   void operator=(const vtkPolyDataPointPlacer&);  //Not implemented
00119 };
00120 
00121 #endif
00122