VTK
|
Abstract interface to translate 2D display positions to world coordinates. More...
#include <vtkPointPlacer.h>
Public Member Functions | |
virtual int | ValidateWorldPosition (double worldPos[3]) |
virtual int | ValidateDisplayPosition (vtkRenderer *, double displayPos[2]) |
virtual int | UpdateInternalState () |
virtual int | ComputeWorldPosition (vtkRenderer *ren, double displayPos[2], double worldPos[3], double worldOrient[9]) |
virtual int | ComputeWorldPosition (vtkRenderer *ren, double displayPos[2], double refWorldPos[3], double worldPos[3], double worldOrient[9]) |
virtual int | ValidateWorldPosition (double worldPos[3], double worldOrient[9]) |
virtual int | UpdateWorldPosition (vtkRenderer *ren, double worldPos[3], double worldOrient[9]) |
virtual int | UpdateNodeWorldPosition (double worldPos[3], vtkIdType nodePointId) |
virtual void | SetPixelTolerance (int) |
virtual int | GetPixelTolerance () |
virtual void | SetWorldTolerance (double) |
virtual double | GetWorldTolerance () |
Static Public Member Functions | |
static vtkPointPlacer * | New () |
Protected Member Functions | |
vtkPointPlacer () | |
~vtkPointPlacer () | |
Protected Attributes | |
int | PixelTolerance |
double | WorldTolerance |
typedef vtkObject | Superclass |
static int | IsTypeOf (const char *type) |
static vtkPointPlacer * | SafeDownCast (vtkObjectBase *o) |
virtual int | IsA (const char *type) |
vtkPointPlacer * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual vtkObjectBase * | NewInstanceInternal () const |
Abstract interface to translate 2D display positions to world coordinates.
Most widgets in VTK have a need to translate of 2D display coordinates (as reported by the RenderWindowInteractor) to 3D world coordinates. This class is an abstraction of this functionality. A few subclasses are listed below:
1) vtkFocalPlanePointPlacer: This class converts 2D display positions to world positions such that they lie on the focal plane.
2) vtkPolygonalSurfacePointPlacer: Converts 2D display positions to world positions such that they lie on the surface of one or more specified polydatas.
3) vtkImageActorPointPlacer: Converts 2D display positions to world positions such that they lie on an ImageActor
4) vtkBoundedPlanePointPlacer: Converts 2D display positions to world positions such that they lie within a set of specified bounding planes.
5) vtkTerrainDataPointPlacer: Converts 2D display positions to world positions such that they lie on a height field.
Point placers provide an extensible framework to specify constraints on points. The methods ComputeWorldPosition, ValidateDisplayPosition and ValidateWorldPosition may be overridden to dictate whether a world or display position is allowed. These classes are currently used by the HandleWidget and the ContourWidget to allow various constraints to be enforced on the placement of their handles.
Definition at line 48 of file vtkPointPlacer.h.
typedef vtkObject vtkPointPlacer::Superclass |
Standard methods for instances of this class.
Reimplemented from vtkObject.
Reimplemented in vtkPolygonalSurfacePointPlacer, vtkCellCentersPointPlacer, vtkTerrainDataPointPlacer, vtkPolyDataPointPlacer, vtkBoundedPlanePointPlacer, vtkClosedSurfacePointPlacer, vtkImageActorPointPlacer, and vtkFocalPlanePointPlacer.
Definition at line 56 of file vtkPointPlacer.h.
vtkPointPlacer::vtkPointPlacer | ( | ) | [protected] |
vtkPointPlacer::~vtkPointPlacer | ( | ) | [protected] |
static vtkPointPlacer* vtkPointPlacer::New | ( | ) | [static] |
Instantiate this class.
Reimplemented from vtkObject.
Reimplemented in vtkPolygonalSurfacePointPlacer, vtkCellCentersPointPlacer, vtkTerrainDataPointPlacer, vtkPolyDataPointPlacer, vtkBoundedPlanePointPlacer, vtkClosedSurfacePointPlacer, vtkImageActorPointPlacer, and vtkFocalPlanePointPlacer.
static int vtkPointPlacer::IsTypeOf | ( | const char * | type | ) | [static] |
Standard methods for instances of this class.
Reimplemented from vtkObject.
Reimplemented in vtkPolygonalSurfacePointPlacer, vtkCellCentersPointPlacer, vtkTerrainDataPointPlacer, vtkPolyDataPointPlacer, vtkBoundedPlanePointPlacer, vtkClosedSurfacePointPlacer, vtkImageActorPointPlacer, and vtkFocalPlanePointPlacer.
virtual int vtkPointPlacer::IsA | ( | const char * | type | ) | [virtual] |
Standard methods for instances of this class.
Reimplemented from vtkObject.
Reimplemented in vtkPolygonalSurfacePointPlacer, vtkCellCentersPointPlacer, vtkTerrainDataPointPlacer, vtkPolyDataPointPlacer, vtkBoundedPlanePointPlacer, vtkClosedSurfacePointPlacer, vtkImageActorPointPlacer, and vtkFocalPlanePointPlacer.
static vtkPointPlacer* vtkPointPlacer::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Standard methods for instances of this class.
Reimplemented from vtkObject.
Reimplemented in vtkPolygonalSurfacePointPlacer, vtkCellCentersPointPlacer, vtkTerrainDataPointPlacer, vtkPolyDataPointPlacer, vtkBoundedPlanePointPlacer, vtkClosedSurfacePointPlacer, vtkImageActorPointPlacer, and vtkFocalPlanePointPlacer.
virtual vtkObjectBase* vtkPointPlacer::NewInstanceInternal | ( | ) | const [protected, virtual] |
Standard methods for instances of this class.
Reimplemented from vtkObject.
Reimplemented in vtkPolygonalSurfacePointPlacer, vtkCellCentersPointPlacer, vtkTerrainDataPointPlacer, vtkPolyDataPointPlacer, vtkBoundedPlanePointPlacer, vtkClosedSurfacePointPlacer, vtkImageActorPointPlacer, and vtkFocalPlanePointPlacer.
vtkPointPlacer* vtkPointPlacer::NewInstance | ( | ) | const |
Standard methods for instances of this class.
Reimplemented from vtkObject.
Reimplemented in vtkPolygonalSurfacePointPlacer, vtkCellCentersPointPlacer, vtkTerrainDataPointPlacer, vtkPolyDataPointPlacer, vtkBoundedPlanePointPlacer, vtkClosedSurfacePointPlacer, vtkImageActorPointPlacer, and vtkFocalPlanePointPlacer.
void vtkPointPlacer::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Standard methods for instances of this class.
Reimplemented from vtkObject.
Reimplemented in vtkPolygonalSurfacePointPlacer, vtkCellCentersPointPlacer, vtkTerrainDataPointPlacer, vtkPolyDataPointPlacer, vtkBoundedPlanePointPlacer, vtkClosedSurfacePointPlacer, vtkImageActorPointPlacer, and vtkFocalPlanePointPlacer.
virtual int vtkPointPlacer::ComputeWorldPosition | ( | vtkRenderer * | ren, |
double | displayPos[2], | ||
double | worldPos[3], | ||
double | worldOrient[9] | ||
) | [virtual] |
Given a renderer and a display position in pixel coordinates, compute the world position and orientation where this point will be placed. This method is typically used by the representation to place the point initially. A return value of 1 indicates that constraints of the placer are met.
Reimplemented in vtkBoundedPlanePointPlacer, vtkPolygonalSurfacePointPlacer, vtkTerrainDataPointPlacer, vtkCellCentersPointPlacer, vtkClosedSurfacePointPlacer, vtkPolyDataPointPlacer, vtkImageActorPointPlacer, and vtkFocalPlanePointPlacer.
virtual int vtkPointPlacer::ComputeWorldPosition | ( | vtkRenderer * | ren, |
double | displayPos[2], | ||
double | refWorldPos[3], | ||
double | worldPos[3], | ||
double | worldOrient[9] | ||
) | [virtual] |
Given a renderer, a display position, and a reference world position, compute the new world position and orientation of this point. This method is typically used by the representation to move the point. A return value of 1 indicates that constraints of the placer are met.
Reimplemented in vtkBoundedPlanePointPlacer, vtkPolygonalSurfacePointPlacer, vtkTerrainDataPointPlacer, vtkCellCentersPointPlacer, vtkPolyDataPointPlacer, and vtkFocalPlanePointPlacer.
virtual int vtkPointPlacer::ValidateWorldPosition | ( | double | worldPos[3] | ) | [virtual] |
Given a world position check the validity of this position according to the constraints of the placer.
Reimplemented in vtkBoundedPlanePointPlacer, vtkPolygonalSurfacePointPlacer, vtkTerrainDataPointPlacer, vtkClosedSurfacePointPlacer, vtkCellCentersPointPlacer, vtkPolyDataPointPlacer, vtkImageActorPointPlacer, and vtkFocalPlanePointPlacer.
virtual int vtkPointPlacer::ValidateDisplayPosition | ( | vtkRenderer * | , |
double | displayPos[2] | ||
) | [virtual] |
Given a display position, check the validity of this position.
Reimplemented in vtkPolygonalSurfacePointPlacer, vtkTerrainDataPointPlacer, vtkCellCentersPointPlacer, and vtkPolyDataPointPlacer.
virtual int vtkPointPlacer::ValidateWorldPosition | ( | double | worldPos[3], |
double | worldOrient[9] | ||
) | [virtual] |
Given a world position and a world orientation, validate it according to the constraints of the placer.
Reimplemented in vtkBoundedPlanePointPlacer, vtkPolygonalSurfacePointPlacer, vtkTerrainDataPointPlacer, vtkCellCentersPointPlacer, vtkClosedSurfacePointPlacer, vtkPolyDataPointPlacer, vtkImageActorPointPlacer, and vtkFocalPlanePointPlacer.
virtual int vtkPointPlacer::UpdateWorldPosition | ( | vtkRenderer * | ren, |
double | worldPos[3], | ||
double | worldOrient[9] | ||
) | [virtual] |
Given a current renderer, world position and orientation, update them according to the constraints of the placer. This method is typically used when UpdateContour is called on the representation, which must be called after changes are made to the constraints in the placer. A return value of 1 indicates that the point has been updated. A return value of 0 indicates that the point could not be updated and was left alone. By default this is a no-op - leaving the point as is.
Reimplemented in vtkBoundedPlanePointPlacer, and vtkImageActorPointPlacer.
virtual int vtkPointPlacer::UpdateNodeWorldPosition | ( | double | worldPos[3], |
vtkIdType | nodePointId | ||
) | [virtual] |
Give the placer a chance to update the node information, if any. Most placers do not maintain any cached node information. vtkPolygonalSurfacePointPlacer is one that does. It stores the point id (id on the surface mesh) on which its drawn. The second argument may be used to pass that in. Update world position
Reimplemented in vtkPolygonalSurfacePointPlacer.
virtual int vtkPointPlacer::UpdateInternalState | ( | ) | [inline, virtual] |
Called by the representation to give the placer a chance to update itself.
Reimplemented in vtkImageActorPointPlacer.
Definition at line 123 of file vtkPointPlacer.h.
virtual void vtkPointPlacer::SetPixelTolerance | ( | int | ) | [virtual] |
Set/get the tolerance used when performing computations in display coordinates.
virtual int vtkPointPlacer::GetPixelTolerance | ( | ) | [virtual] |
Set/get the tolerance used when performing computations in display coordinates.
virtual void vtkPointPlacer::SetWorldTolerance | ( | double | ) | [virtual] |
Set/get the tolerance used when performing computations in world coordinates.
Reimplemented in vtkImageActorPointPlacer.
virtual double vtkPointPlacer::GetWorldTolerance | ( | ) | [virtual] |
Set/get the tolerance used when performing computations in world coordinates.
int vtkPointPlacer::PixelTolerance [protected] |
Definition at line 143 of file vtkPointPlacer.h.
double vtkPointPlacer::WorldTolerance [protected] |
Definition at line 144 of file vtkPointPlacer.h.