VTK
dox/Widgets/vtkCellCentersPointPlacer.h
Go to the documentation of this file.
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 "vtkPointPlacer.h"
00044 
00045 class vtkRenderer;
00046 class vtkPropCollection;
00047 class vtkProp;
00048 class vtkCellPicker;
00049 
00050 class VTK_WIDGETS_EXPORT vtkCellCentersPointPlacer : public vtkPointPlacer
00051 {
00052 public:
00054   static vtkCellCentersPointPlacer *New();
00055 
00057 
00058   vtkTypeMacro(vtkCellCentersPointPlacer,vtkPointPlacer);
00059   void PrintSelf(ostream& os, vtkIndent indent);
00061 
00062   // Descuription:
00063   // Add an actor (that represents a terrain in a rendererd scene) to the
00064   // list. Only props in this list are considered by the PointPlacer
00065   virtual void AddProp( vtkProp * );
00066   virtual void RemoveViewProp(vtkProp *prop);
00067   virtual void RemoveAllProps();
00068   int          HasProp( vtkProp * );
00069   int          GetNumberOfProps();
00070 
00072 
00077   virtual int ComputeWorldPosition( vtkRenderer *ren,
00078                                     double displayPos[2],
00079                                     double worldPos[3],
00080                                     double worldOrient[9] );
00082 
00084 
00087   virtual int ComputeWorldPosition( vtkRenderer *ren,
00088                                     double displayPos[2],
00089                                     double refWorldPos[3],
00090                                     double worldPos[3],
00091                                     double worldOrient[9] );
00093 
00096   virtual int ValidateWorldPosition( double worldPos[3] );
00097 
00099   virtual int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] );
00100 
00102 
00104   virtual int ValidateWorldPosition( double worldPos[3],
00105                                      double worldOrient[9] );
00107 
00109 
00110   vtkGetObjectMacro( CellPicker, vtkCellPicker );
00112 
00114 
00118   vtkSetMacro( Mode, int );
00119   vtkGetMacro( Mode, int );
00121 
00122   enum
00123     {
00124     ParametricCenter = 0,
00125     CellPointsMean,
00126     None
00127     };
00128 
00129 protected:
00130   vtkCellCentersPointPlacer();
00131   ~vtkCellCentersPointPlacer();
00132 
00133   // The props that represents the terrain data (one or more) in a rendered
00134   // scene
00135   vtkPropCollection  *PickProps;
00136   vtkCellPicker      *CellPicker;
00137   int                 Mode;
00138 
00139 private:
00140   vtkCellCentersPointPlacer(const vtkCellCentersPointPlacer&);  //Not implemented
00141   void operator=(const vtkCellCentersPointPlacer&);  //Not implemented
00142 };
00143 
00144 #endif