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=========================================================================*/
28#ifndef vtkClosedSurfacePointPlacer_h
29#define vtkClosedSurfacePointPlacer_h
30
31#include "vtkInteractionWidgetsModule.h" // For export macro
32#include "vtkPointPlacer.h"
33
34class vtkPlane;
36class vtkPlanes;
37class vtkRenderer;
38
39class VTKINTERACTIONWIDGETS_EXPORT vtkClosedSurfacePointPlacer : public vtkPointPlacer
40{
41public:
46
48
52 void PrintSelf(ostream& os, vtkIndent indent);
54
56
68 vtkGetObjectMacro(BoundingPlanes,vtkPlaneCollection);
71
87 double displayPos[2],
88 double worldPos[3],
89 double worldOrient[9] );
90
103 double displayPos[2],
104 double refWorldPos[2],
105 double worldPos[3],
106 double worldOrient[9] );
107
113 int ValidateWorldPosition( double worldPos[3] );
114
115 // Descrption:
116 // Orientationation is ignored, and the above method
117 // is called instead.
118 int ValidateWorldPosition( double worldPos[3],
119 double worldOrient[9]);
120
121 // Descrption:
122 // The minimum distance the object should be from the faces of the object.
123 // Must be greater than 0. Default is 0.
124 vtkSetClampMacro( MinimumDistance, double, 0.0, VTK_DOUBLE_MAX );
125 vtkGetMacro( MinimumDistance, double );
126
127protected:
130
131 // A collection of planes used to bound the projection
132 // plane
134
135 // Calculate the distance of a point from the Object. Negative
136 // values imply that the point is outside. Positive values imply that it is
137 // inside. The closest point to the object is returned in closestPt.
138 static double GetDistanceFromObject( double pos[3],
140 double closestPt[3]);
141
143
146
147private:
149 void operator=(const vtkClosedSurfacePointPlacer&) VTK_DELETE_FUNCTION;
150};
151
152#endif
PointPlacer to constrain validity within a set of convex planes.
int ValidateWorldPosition(double worldPos[3])
Give a world position check if it is valid - does it lie on the plane and within the bounds?...
int ValidateWorldPosition(double worldPos[3], double worldOrient[9])
Given a world position and a world orientation, validate it according to the constraints of the place...
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void AddBoundingPlane(vtkPlane *plane)
A collection of plane equations used to bound the position of the point.
void RemoveBoundingPlane(vtkPlane *plane)
virtual void SetBoundingPlanes(vtkPlaneCollection *)
void SetBoundingPlanes(vtkPlanes *planes)
static double GetDistanceFromObject(double pos[3], vtkPlaneCollection *pc, double closestPt[3])
int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double worldPos[3], double worldOrient[9])
Given a renderer and a display position, compute the world position and world orientation for this po...
static vtkClosedSurfacePointPlacer * New()
Instantiate this class.
int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double refWorldPos[2], double worldPos[3], double worldOrient[9])
Given a renderer, a display position and a reference position, "worldPos" is calculated as : Consider...
a simple class to control print indentation
Definition: vtkIndent.h:40
maintain a list of planes
perform various plane computations
Definition: vtkPlane.h:38
implicit function for convex set of planes
Definition: vtkPlanes.h:55
Abstract interface to translate 2D display positions to world coordinates.
abstract specification for renderers
Definition: vtkRenderer.h:64
#define VTK_DOUBLE_MAX
Definition: vtkType.h:163