VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkAreaPicker Class Reference

Picks props behind a selection rectangle on a viewport. More...

#include <vtkAreaPicker.h>

Inheritance diagram for vtkAreaPicker:
Inheritance graph
[legend]
Collaboration diagram for vtkAreaPicker:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkAbstractPropPicker Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkAreaPickerNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
void SetPickCoords (double x0, double y0, double x1, double y1)
void SetRenderer (vtkRenderer *)
virtual int Pick ()
virtual int AreaPick (double x0, double y0, double x1, double y1, vtkRenderer *renderer=NULL)
virtual int Pick (double x0, double y0, double vtkNotUsed(z0), vtkRenderer *renderer=NULL)
virtual vtkAbstractMapper3DGetMapper ()
virtual vtkDataSetGetDataSet ()
vtkProp3DCollectionGetProp3Ds ()
virtual vtkPlanesGetFrustum ()
virtual vtkPointsGetClipPoints ()

Static Public Member Functions

static vtkAreaPickerNew ()
static int IsTypeOf (const char *type)
static vtkAreaPickerSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkAreaPicker ()
 ~vtkAreaPicker ()
virtual void Initialize ()
void DefineFrustum (double x0, double y0, double x1, double y1, vtkRenderer *)
virtual int PickProps (vtkRenderer *renderer)
int TypeDecipher (vtkProp *, vtkAbstractMapper3D **)
int ABoxFrustumIsect (double bounds[], double &mindist)

Protected Attributes

vtkPointsClipPoints
vtkPlanesFrustum
vtkProp3DCollectionProp3Ds
vtkAbstractMapper3DMapper
vtkDataSetDataSet
vtkExtractSelectedFrustumFrustumExtractor
double X0
double Y0
double X1
double Y1

Detailed Description

Picks props behind a selection rectangle on a viewport.

The vtkAreaPicker picks all vtkProp3Ds that lie behind the screen space rectangle from x0,y0 and x1,y1. The selection is based upon the bounding box of the prop and is thus not exact.

Like vtkPicker, a pick results in a list of Prop3Ds because many props may lie within the pick frustum. You can also get an AssemblyPath, which in this case is defined to be the path to the one particular prop in the Prop3D list that lies nearest to the near plane.

This picker also returns the selection frustum, defined as either a vtkPlanes, or a set of eight corner vertices in world space. The vtkPlanes version is an ImplicitFunction, which is suitable for use with the vtkExtractGeometry. The six frustum planes are in order: left, right, bottom, top, near, far

Because this picker picks everything within a volume, the world pick point result is ill-defined. Therefore if you ask this class for the world pick position, you will get the centroid of the pick frustum. This may be outside of all props in the prop list.

See also:
vtkInteractorStyleRubberBandPick, vtkExtractSelectedFrustum.
Events:
vtkCommand::PickEvent vtkCommand::EndPickEvent vtkCommand::StartPickEvent
Tests:
vtkAreaPicker (Tests)

Definition at line 64 of file vtkAreaPicker.h.


Member Typedef Documentation

Reimplemented from vtkAbstractPropPicker.

Reimplemented in vtkRenderedAreaPicker.

Definition at line 68 of file vtkAreaPicker.h.


Constructor & Destructor Documentation


Member Function Documentation

static vtkAreaPicker* vtkAreaPicker::New ( ) [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

Reimplemented in vtkRenderedAreaPicker.

static int vtkAreaPicker::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkAbstractPropPicker.

Reimplemented in vtkRenderedAreaPicker.

virtual int vtkAreaPicker::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkAbstractPropPicker.

Reimplemented in vtkRenderedAreaPicker.

Reimplemented from vtkAbstractPropPicker.

Reimplemented in vtkRenderedAreaPicker.

virtual vtkObjectBase* vtkAreaPicker::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkAbstractPropPicker.

Reimplemented in vtkRenderedAreaPicker.

Reimplemented from vtkAbstractPropPicker.

Reimplemented in vtkRenderedAreaPicker.

void vtkAreaPicker::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkAbstractPropPicker.

Reimplemented in vtkRenderedAreaPicker.

void vtkAreaPicker::SetPickCoords ( double  x0,
double  y0,
double  x1,
double  y1 
)

Set the default screen rectangle to pick in.

Set the default renderer to pick on.

virtual int vtkAreaPicker::Pick ( ) [virtual]

Perform an AreaPick within the default screen rectangle and renderer.

virtual int vtkAreaPicker::AreaPick ( double  x0,
double  y0,
double  x1,
double  y1,
vtkRenderer renderer = NULL 
) [virtual]

Perform pick operation in volume behind the given screen coordinates. Props intersecting the selection frustum will be accessible via GetProp3D. GetPlanes returns a vtkImplicitFunciton suitable for vtkExtractGeometry.

Reimplemented in vtkRenderedAreaPicker.

virtual int vtkAreaPicker::Pick ( double  x0,
double  y0,
double   vtkNotUsedz0,
vtkRenderer renderer = NULL 
) [inline, virtual]

Perform pick operation in volume behind the given screen coordinate. This makes a thin frustum around the selected pixel. Note: this ignores Z in order to pick everying in a volume from z=0 to z=1.

Definition at line 90 of file vtkAreaPicker.h.

Return mapper that was picked (if any).

virtual vtkDataSet* vtkAreaPicker::GetDataSet ( ) [virtual]

Get a pointer to the dataset that was picked (if any). If nothing was picked then NULL is returned.

Return a collection of all the prop 3D's that were intersected by the pick ray. This collection is not sorted.

Definition at line 108 of file vtkAreaPicker.h.

virtual vtkPlanes* vtkAreaPicker::GetFrustum ( ) [virtual]

Return the six planes that define the selection frustum. The implicit function defined by the planes evaluates to negative inside and positive outside.

virtual vtkPoints* vtkAreaPicker::GetClipPoints ( ) [virtual]

Return eight points that define the selection frustum.

virtual void vtkAreaPicker::Initialize ( ) [protected, virtual]

Reimplemented from vtkAbstractPropPicker.

void vtkAreaPicker::DefineFrustum ( double  x0,
double  y0,
double  x1,
double  y1,
vtkRenderer  
) [protected]
virtual int vtkAreaPicker::PickProps ( vtkRenderer renderer) [protected, virtual]
int vtkAreaPicker::ABoxFrustumIsect ( double  bounds[],
double mindist 
) [protected]

Member Data Documentation

Definition at line 135 of file vtkAreaPicker.h.

Definition at line 136 of file vtkAreaPicker.h.

Definition at line 138 of file vtkAreaPicker.h.

Definition at line 139 of file vtkAreaPicker.h.

Definition at line 140 of file vtkAreaPicker.h.

Definition at line 143 of file vtkAreaPicker.h.

Definition at line 145 of file vtkAreaPicker.h.

Definition at line 146 of file vtkAreaPicker.h.

Definition at line 147 of file vtkAreaPicker.h.

Definition at line 148 of file vtkAreaPicker.h.


The documentation for this class was generated from the following file: