VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkAreaPicker Class Reference

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

#include <vtkAreaPicker.h>

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

Public Types

typedef vtkAbstractPropPicker Superclass
 
- Public Types inherited from vtkAbstractPropPicker
typedef vtkAbstractPicker Superclass
 
- Public Types inherited from vtkAbstractPicker
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase 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 ()
 
- Public Member Functions inherited from vtkAbstractPropPicker
vtkAbstractPropPickerNewInstance () const
 
virtual vtkPropGetViewProp ()
 
virtual vtkProp3DGetProp3D ()
 
virtual vtkActorGetActor ()
 
virtual vtkActor2DGetActor2D ()
 
virtual vtkVolumeGetVolume ()
 
virtual vtkAssemblyGetAssembly ()
 
virtual vtkPropAssemblyGetPropAssembly ()
 
virtual void SetPath (vtkAssemblyPath *)
 
virtual vtkAssemblyPathGetPath ()
 
- Public Member Functions inherited from vtkAbstractPicker
vtkAbstractPickerNewInstance () const
 
void InitializePickList ()
 
void AddPickList (vtkProp *)
 
void DeletePickList (vtkProp *)
 
vtkPropCollectionGetPickList ()
 
virtual vtkRendererGetRenderer ()
 
virtual doubleGetSelectionPoint ()
 
virtual void GetSelectionPoint (double data[3])
 
virtual doubleGetPickPosition ()
 
virtual void GetPickPosition (double data[3])
 
virtual int Pick (double selectionX, double selectionY, double selectionZ, vtkRenderer *renderer)=0
 
int Pick (double selectionPt[3], vtkRenderer *ren)
 
virtual void SetPickFromList (int)
 
virtual int GetPickFromList ()
 
virtual void PickFromListOn ()
 
virtual void PickFromListOff ()
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkAreaPickerNew ()
 
static int IsTypeOf (const char *type)
 
static vtkAreaPickerSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAbstractPropPicker
static int IsTypeOf (const char *type)
 
static vtkAbstractPropPickerSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAbstractPicker
static int IsTypeOf (const char *type)
 
static vtkAbstractPickerSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

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 Member Functions inherited from vtkAbstractPropPicker
 vtkAbstractPropPicker ()
 
 ~vtkAbstractPropPicker ()
 
- Protected Member Functions inherited from vtkAbstractPicker
 vtkAbstractPicker ()
 
 ~vtkAbstractPicker ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkPointsClipPoints
 
vtkPlanesFrustum
 
vtkProp3DCollectionProp3Ds
 
vtkAbstractMapper3DMapper
 
vtkDataSetDataSet
 
vtkExtractSelectedFrustumFrustumExtractor
 
double X0
 
double Y0
 
double X1
 
double Y1
 
- Protected Attributes inherited from vtkAbstractPropPicker
vtkAssemblyPathPath
 
- Protected Attributes inherited from vtkAbstractPicker
vtkRendererRenderer
 
double SelectionPoint [3]
 
double PickPosition [3]
 
int PickFromList
 
vtkPropCollectionPickList
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

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::EndPickEvent vtkCommand::PickEvent vtkCommand::StartPickEvent
Tests:
vtkAreaPicker (Tests)

Definition at line 64 of file vtkAreaPicker.h.

Member Typedef Documentation

Definition at line 68 of file vtkAreaPicker.h.

Constructor & Destructor Documentation

vtkAreaPicker::vtkAreaPicker ( )
protected
vtkAreaPicker::~vtkAreaPicker ( )
protected

Member Function Documentation

static vtkAreaPicker* vtkAreaPicker::New ( )
static
static int vtkAreaPicker::IsTypeOf ( const char *  type)
static
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
virtual vtkObjectBase* vtkAreaPicker::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkAbstractPropPicker.

Reimplemented in vtkRenderedAreaPicker.

vtkAreaPicker* vtkAreaPicker::NewInstance ( ) const
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 
)
inlinevirtual

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 ( )
protectedvirtual

Reimplemented from vtkAbstractPropPicker.

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

Member Data Documentation

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.


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