VTK
|
Picks props behind a selection rectangle on a viewport. More...
#include <vtkAreaPicker.h>
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.
Definition at line 64 of file vtkAreaPicker.h.
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.
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.
static vtkAreaPicker* vtkAreaPicker::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkAbstractPropPicker.
Reimplemented in vtkRenderedAreaPicker.
virtual vtkObjectBase* vtkAreaPicker::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkAbstractPropPicker.
Reimplemented in vtkRenderedAreaPicker.
vtkAreaPicker* vtkAreaPicker::NewInstance | ( | ) | const |
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.
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 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.
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 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::TypeDecipher | ( | vtkProp * | , |
vtkAbstractMapper3D ** | |||
) | [protected] |
int vtkAreaPicker::ABoxFrustumIsect | ( | double | bounds[], |
double & | mindist | ||
) | [protected] |
vtkPoints* vtkAreaPicker::ClipPoints [protected] |
Definition at line 135 of file vtkAreaPicker.h.
vtkPlanes* vtkAreaPicker::Frustum [protected] |
Definition at line 136 of file vtkAreaPicker.h.
vtkProp3DCollection* vtkAreaPicker::Prop3Ds [protected] |
Definition at line 138 of file vtkAreaPicker.h.
vtkAbstractMapper3D* vtkAreaPicker::Mapper [protected] |
Definition at line 139 of file vtkAreaPicker.h.
vtkDataSet* vtkAreaPicker::DataSet [protected] |
Definition at line 140 of file vtkAreaPicker.h.
vtkExtractSelectedFrustum* vtkAreaPicker::FrustumExtractor [protected] |
Definition at line 143 of file vtkAreaPicker.h.
double vtkAreaPicker::X0 [protected] |
Definition at line 145 of file vtkAreaPicker.h.
double vtkAreaPicker::Y0 [protected] |
Definition at line 146 of file vtkAreaPicker.h.
double vtkAreaPicker::X1 [protected] |
Definition at line 147 of file vtkAreaPicker.h.
double vtkAreaPicker::Y1 [protected] |
Definition at line 148 of file vtkAreaPicker.h.