Open CASCADE Technology
7.0.0
|
VTK picker for OCC shapes with OCC selection algorithm. More...
#include <IVtkTools_ShapePicker.hxx>
Public Member Functions | |
vtkTypeMacro (IVtkTools_ShapePicker, vtkAbstractPropPicker) static IVtkTools_ShapePicker *New() | |
int | pick (double *thePos, vtkRenderer *theRenderer, const int theNbPoints=-1) |
Pick entities in the given point or area. More... | |
int | Pick (double theX, double theY, double theZ, vtkRenderer *theRenderer=NULL) |
Pick entities in the given point. More... | |
int | Pick (double theX0, double theY0, double theX1, double theY1, vtkRenderer *theRenderer=NULL) |
Pick entities in the given rectangle area. More... | |
int | Pick (double poly[][3], const int theNbPoints, vtkRenderer *theRenderer=NULL) |
Pick entities in the given polygonal area. More... | |
void | SetTolerance (float theTolerance) |
Setter for tolerance of picking. More... | |
float | GetTolerance () const |
Getter for tolerance of picking. More... | |
void | SetRenderer (vtkRenderer *theRenderer) |
Sets the renderer to be used by OCCT selection algorithm. More... | |
void | SetAreaSelection (bool theIsOn) |
Sets area selection on/off. More... | |
IVtk_SelectionModeList | GetSelectionModes (const IVtk_IShape::Handle &theShape) const |
Get activated selection modes for a shape. More... | |
IVtk_SelectionModeList | GetSelectionModes (vtkActor *theShapeActor) const |
Get activated selection modes for a shape actor. More... | |
void | SetSelectionMode (const IVtk_IShape::Handle &theShape, const IVtk_SelectionMode theMode, const bool theIsTurnOn=true) const |
Turn on/off a selection mode for a shape actor. More... | |
void | SetSelectionMode (vtkActor *theShapeActor, const IVtk_SelectionMode theMode, const bool theIsTurnOn=true) const |
Turn on/off a selection mode for a shape actor. More... | |
void | SetSelectionMode (const IVtk_SelectionMode theMode, const bool theIsTurnOn=true) const |
Sets the current selection mode for all visible shape objects. More... | |
IVtk_ShapeIdList | GetPickedShapesIds (bool theIsAll=false) const |
Access to the list of top-level shapes picked. If all argument is true, the picker returns the list of all OccShape objects found by the picking algorithm. e.g. all shapes under the mouse cursor. Otherwise, ID of the shape closest to the eye is returned. More... | |
IVtk_ShapeIdList | GetPickedSubShapesIds (const IVtk_IdType theId, bool theIsAll=false) const |
Access to the list of sub-shapes ids picked. More... | |
vtkActorCollection * | GetPickedActors (bool theIsAll=false) const |
Access to the list of actors picked. More... | |
Protected Member Functions | |
IVtkTools_ShapePicker () | |
Constructs the picker with empty renderer and ready for point selection. More... | |
~IVtkTools_ShapePicker () | |
Destructor. More... | |
Static Protected Member Functions | |
static bool | convertDisplayToWorld (vtkRenderer *theRenderer, double theDisplayCoord[3], double theWorldCoord[3]) |
Convert display coordinates to world coordinates. More... | |
VTK picker for OCC shapes with OCC selection algorithm.
|
protected |
Constructs the picker with empty renderer and ready for point selection.
|
protected |
Destructor.
|
staticprotected |
Convert display coordinates to world coordinates.
vtkActorCollection* IVtkTools_ShapePicker::GetPickedActors | ( | bool | theIsAll = false | ) | const |
Access to the list of actors picked.
[in] | all | Controls if all selected actors or just the only top one is returned, has no effect during area selection. |
IVtk_ShapeIdList IVtkTools_ShapePicker::GetPickedShapesIds | ( | bool | theIsAll = false | ) | const |
Access to the list of top-level shapes picked. If all argument is true, the picker returns the list of all OccShape objects found by the picking algorithm. e.g. all shapes under the mouse cursor. Otherwise, ID of the shape closest to the eye is returned.
[in] | all | Controls if all selected shapes or just the only top one is returned, has no effect during area selection. |
IVtk_ShapeIdList IVtkTools_ShapePicker::GetPickedSubShapesIds | ( | const IVtk_IdType | theId, |
bool | theIsAll = false |
||
) | const |
Access to the list of sub-shapes ids picked.
[in] | id | top-level shape ID |
[in] | all | Controls if all selected sub-shapes or just the only top one is returned, has no effect during area selection. |
IVtk_SelectionModeList IVtkTools_ShapePicker::GetSelectionModes | ( | const IVtk_IShape::Handle & | theShape | ) | const |
Get activated selection modes for a shape.
[in] | theShape | a shape with activated selection mode(s) |
IVtk_SelectionModeList IVtkTools_ShapePicker::GetSelectionModes | ( | vtkActor * | theShapeActor | ) | const |
Get activated selection modes for a shape actor.
[in] | theShapeActor | an actor with activated selection mode(s) |
float IVtkTools_ShapePicker::GetTolerance | ( | ) | const |
Getter for tolerance of picking.
int IVtkTools_ShapePicker::pick | ( | double * | thePos, |
vtkRenderer * | theRenderer, | ||
const int | theNbPoints = -1 |
||
) |
Pick entities in the given point or area.
int IVtkTools_ShapePicker::Pick | ( | double | theX, |
double | theY, | ||
double | theZ, | ||
vtkRenderer * | theRenderer = NULL |
||
) |
Pick entities in the given point.
int IVtkTools_ShapePicker::Pick | ( | double | theX0, |
double | theY0, | ||
double | theX1, | ||
double | theY1, | ||
vtkRenderer * | theRenderer = NULL |
||
) |
Pick entities in the given rectangle area.
int IVtkTools_ShapePicker::Pick | ( | double | poly[][3], |
const int | theNbPoints, | ||
vtkRenderer * | theRenderer = NULL |
||
) |
Pick entities in the given polygonal area.
void IVtkTools_ShapePicker::SetAreaSelection | ( | bool | theIsOn | ) |
Sets area selection on/off.
[in] | theIsOn | true if area selection is turned on, false otherwise. |
void IVtkTools_ShapePicker::SetRenderer | ( | vtkRenderer * | theRenderer | ) |
Sets the renderer to be used by OCCT selection algorithm.
void IVtkTools_ShapePicker::SetSelectionMode | ( | const IVtk_IShape::Handle & | theShape, |
const IVtk_SelectionMode | theMode, | ||
const bool | theIsTurnOn = true |
||
) | const |
Turn on/off a selection mode for a shape actor.
[in] | theShape | a shape to set a selection mode for |
[in] | theMode | selection mode to be activated |
[in] | theIsTurnOn | Flag to turn on/off the selection mode |
void IVtkTools_ShapePicker::SetSelectionMode | ( | vtkActor * | theShapeActor, |
const IVtk_SelectionMode | theMode, | ||
const bool | theIsTurnOn = true |
||
) | const |
Turn on/off a selection mode for a shape actor.
[in] | shapeActor | shape presentation actor to set a selection mode for |
[in] | mode | selection mode to be activated |
[in] | turnOn | Flag to turn on/off the selection mode |
void IVtkTools_ShapePicker::SetSelectionMode | ( | const IVtk_SelectionMode | theMode, |
const bool | theIsTurnOn = true |
||
) | const |
Sets the current selection mode for all visible shape objects.
[in] | theMode | selection mode to be activated |
[in] | theIsTurnOn | Flag to turn on/off the selection mode |
void IVtkTools_ShapePicker::SetTolerance | ( | float | theTolerance | ) |
Setter for tolerance of picking.
IVtkTools_ShapePicker::vtkTypeMacro | ( | IVtkTools_ShapePicker | , |
vtkAbstractPropPicker | |||
) |