VTK
vtkClosedSurfacePointPlacer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkClosedSurfacePointPlacer.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
27 #ifndef vtkClosedSurfacePointPlacer_h
28 #define vtkClosedSurfacePointPlacer_h
29 
30 #include "vtkInteractionWidgetsModule.h" // For export macro
31 #include "vtkPointPlacer.h"
32 
33 class vtkPlane;
34 class vtkPlaneCollection;
35 class vtkPlanes;
36 class vtkRenderer;
37 
39 {
40 public:
43 
45 
47  void PrintSelf(ostream& os, vtkIndent indent);
49 
51 
57  void AddBoundingPlane(vtkPlane *plane);
58  void RemoveBoundingPlane(vtkPlane *plane);
59  void RemoveAllBoundingPlanes();
60  virtual void SetBoundingPlanes(vtkPlaneCollection*);
61  vtkGetObjectMacro(BoundingPlanes,vtkPlaneCollection);
62  void SetBoundingPlanes(vtkPlanes *planes);
64 
66 
76  double displayPos[2],
77  double worldPos[3],
78  double worldOrient[9] );
80 
82 
91  double displayPos[2],
92  double refWorldPos[2],
93  double worldPos[3],
94  double worldOrient[9] );
96 
99  int ValidateWorldPosition( double worldPos[3] );
100 
101  // Descrption:
102  // Orientationation is ignored, and the above method
103  // is called instead.
104  int ValidateWorldPosition( double worldPos[3],
105  double worldOrient[9]);
106 
107  // Descrption:
108  // The minimum distance the object should be from the faces of the object.
109  // Must be greater than 0. Default is 0.
110  vtkSetClampMacro( MinimumDistance, double, 0.0, VTK_DOUBLE_MAX );
111  vtkGetMacro( MinimumDistance, double );
112 
113 protected:
116 
117  // A collection of planes used to bound the projection
118  // plane
120 
121  // Calculate the distance of a point from the Object. Negative
122  // values imply that the point is outside. Positive values imply that it is
123  // inside. The closest point to the object is returned in closestPt.
124  static double GetDistanceFromObject( double pos[3],
125  vtkPlaneCollection * pc,
126  double closestPt[3]);
127 
128  void BuildPlanes();
129 
132 
133 private:
135  void operator=(const vtkClosedSurfacePointPlacer&); //Not implemented
136 };
137 
138 #endif
virtual int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double worldPos[3], double worldOrient[9])
#define VTK_DOUBLE_MAX
Definition: vtkType.h:140
maintain a list of planes
implicit function for convex set of planes
Definition: vtkPlanes.h:53
abstract specification for renderers
Definition: vtkRenderer.h:62
void PrintSelf(ostream &os, vtkIndent indent)
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
Abstract interface to translate 2D display positions to world coordinates.
perform various plane computations
Definition: vtkPlane.h:36
virtual int ValidateWorldPosition(double worldPos[3])
static vtkPointPlacer * New()
PointPlacer to constrain validity within a set of convex planes.