#include <vtkAreaPicker.h>
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.
Definition at line 64 of file vtkAreaPicker.h.
Public Types | |
typedef vtkAbstractPropPicker | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
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) |
vtkProp3DCollection * | GetProp3Ds () |
virtual int | Pick (double x0, double y0, double vtkNotUsed(z0), vtkRenderer *renderer=NULL) |
virtual vtkAbstractMapper3D * | GetMapper () |
virtual vtkDataSet * | GetDataSet () |
virtual vtkPlanes * | GetFrustum () |
virtual vtkPoints * | GetClipPoints () |
Static Public Member Functions | |
static vtkAreaPicker * | New () |
static int | IsTypeOf (const char *type) |
static vtkAreaPicker * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkAreaPicker () | |
~vtkAreaPicker () | |
virtual void | Initialize () |
void | DefineFrustum (double x0, double y0, double x1, double y1, vtkRenderer *renderer) |
virtual int | PickProps (vtkRenderer *renderer) |
int | TypeDecipher (vtkProp *, vtkImageActor **, vtkAbstractMapper3D **) |
int | ABoxFrustumIsect (double bounds[], double &mindist) |
Protected Attributes | |
vtkPoints * | ClipPoints |
vtkPlanes * | Frustum |
vtkProp3DCollection * | Prop3Ds |
vtkAbstractMapper3D * | Mapper |
vtkDataSet * | DataSet |
vtkExtractSelectedFrustum * | FrustumExtractor |
double | X0 |
double | Y0 |
double | X1 |
double | Y1 |
Reimplemented from vtkAbstractPropPicker.
Reimplemented in vtkRenderedAreaPicker.
Definition at line 68 of file vtkAreaPicker.h.
vtkAreaPicker::vtkAreaPicker | ( | ) | [protected] |
vtkAreaPicker::~vtkAreaPicker | ( | ) | [protected] |
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.
virtual const char* vtkAreaPicker::GetClassName | ( | ) | [virtual] |
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 vtkTypeRevisionMacro 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 vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkAbstractPropPicker.
Reimplemented in vtkRenderedAreaPicker.
static vtkAreaPicker* vtkAreaPicker::SafeDownCast | ( | vtkObject * | o | ) | [static] |
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.
void vtkAreaPicker::SetRenderer | ( | vtkRenderer * | ) |
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 accesible 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.
virtual vtkAbstractMapper3D* vtkAreaPicker::GetMapper | ( | ) | [virtual] |
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.
vtkProp3DCollection* vtkAreaPicker::GetProp3Ds | ( | ) | [inline] |
Return a collection of all the prop 3D's that were intersected by the pick ray. This collection is not sorted.
Definition at line 107 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 * | renderer | |||
) | [protected] |
virtual int vtkAreaPicker::PickProps | ( | vtkRenderer * | renderer | ) | [protected, virtual] |
int vtkAreaPicker::TypeDecipher | ( | vtkProp * | , | |
vtkImageActor ** | , | |||
vtkAbstractMapper3D ** | ||||
) | [protected] |
int vtkAreaPicker::ABoxFrustumIsect | ( | double | bounds[], | |
double & | mindist | |||
) | [protected] |
vtkPoints* vtkAreaPicker::ClipPoints [protected] |
Definition at line 132 of file vtkAreaPicker.h.
vtkPlanes* vtkAreaPicker::Frustum [protected] |
Definition at line 133 of file vtkAreaPicker.h.
vtkProp3DCollection* vtkAreaPicker::Prop3Ds [protected] |
Definition at line 135 of file vtkAreaPicker.h.
vtkAbstractMapper3D* vtkAreaPicker::Mapper [protected] |
Definition at line 136 of file vtkAreaPicker.h.
vtkDataSet* vtkAreaPicker::DataSet [protected] |
Definition at line 137 of file vtkAreaPicker.h.
vtkExtractSelectedFrustum* vtkAreaPicker::FrustumExtractor [protected] |
Definition at line 140 of file vtkAreaPicker.h.
double vtkAreaPicker::X0 [protected] |
Definition at line 142 of file vtkAreaPicker.h.
double vtkAreaPicker::Y0 [protected] |
Definition at line 143 of file vtkAreaPicker.h.
double vtkAreaPicker::X1 [protected] |
Definition at line 144 of file vtkAreaPicker.h.
double vtkAreaPicker::Y1 [protected] |
Definition at line 145 of file vtkAreaPicker.h.