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 "vtkPointPlacer.h"
31 
32 class vtkPlane;
33 class vtkPlaneCollection;
34 class vtkPlanes;
35 class vtkRenderer;
36 
38 {
39 public:
42 
44 
46  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
56  void AddBoundingPlane(vtkPlane *plane);
57  void RemoveBoundingPlane(vtkPlane *plane);
58  void RemoveAllBoundingPlanes();
59  virtual void SetBoundingPlanes(vtkPlaneCollection*);
60  vtkGetObjectMacro(BoundingPlanes,vtkPlaneCollection);
61  void SetBoundingPlanes(vtkPlanes *planes);
63 
65 
75  double displayPos[2],
76  double worldPos[3],
77  double worldOrient[9] );
79 
81 
90  double displayPos[2],
91  double refWorldPos[2],
92  double worldPos[3],
93  double worldOrient[9] );
95 
98  int ValidateWorldPosition( double worldPos[3] );
99 
100  // Descrption:
101  // Orientationation is ignored, and the above method
102  // is called instead.
103  int ValidateWorldPosition( double worldPos[3],
104  double worldOrient[9]);
105 
106  // Descrption:
107  // The minimum distance the object should be from the faces of the object.
108  // Must be greater than 0. Default is 0.
109  vtkSetClampMacro( MinimumDistance, double, 0.0, VTK_DOUBLE_MAX );
110  vtkGetMacro( MinimumDistance, double );
111 
112 protected:
115 
116  // A collection of planes used to bound the projection
117  // plane
119 
120  // Calculate the distance of a point from the Object. Negative
121  // values imply that the point is outside. Positive values imply that it is
122  // inside. The closest point to the object is returned in closestPt.
123  static double GetDistanceFromObject( double pos[3],
124  vtkPlaneCollection * pc,
125  double closestPt[3]);
126 
127  void BuildPlanes();
128 
131 
132 private:
134  void operator=(const vtkClosedSurfacePointPlacer&); //Not implemented
135 };
136 
137 #endif
virtual int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double worldPos[3], double worldOrient[9])
#define VTK_DOUBLE_MAX
Definition: vtkType.h:133
maintain a list of planes
implicit function for convex set of planes
Definition: vtkPlanes.h:52
abstract specification for renderers
Definition: vtkRenderer.h:69
void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
Abstract interface to translate 2D display positions to world coordinates.
perform various plane computations
Definition: vtkPlane.h:35
#define VTK_WIDGETS_EXPORT
virtual int ValidateWorldPosition(double worldPos[3])
static vtkPointPlacer * New()
PointPlacer to constrain validity within a set of convex planes.