26#ifndef _SO_EXTENDED_SELECTION_H_
27#define _SO_EXTENDED_SELECTION_H_
39#include <Inventor/STL/vector>
55class LassoPointsWrapper;
56class MatricesEvaluator;
57class SbPlanarConvexPolygon;
526 :m_path(path), m_source(source), m_isSkipped(false)
638 void *userData = NULL);
645 void *userData = NULL);
651 void *userData = NULL);
684 static void initClass();
685 static void exitClass();
687 virtual void notify( SoNotList* list );
689 void setSelection(
SbBool on );
690 SbBool getSelection()
const;
701 void commonConstructor();
#define TRUE
Possible value of SbBool.
SO_PIMPL_PUBLIC_DECLARATION(SoFileDataAdapter)
#define SO_NODE_HEADER(className)
Base class for all event arguments.
Class representing an event.
Class for representing a viewport.
Performs a generic traversal of a scene graph or path.
Abstract base class for camera nodes.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Selection node t...
virtual void setMovingSelectionCallback(SelectionEventCallback *callback, void *userData=NULL)
Sets the callback called when the mouse is moved in selection mode.
SoSFEnum lassoPolicy
Specifies the lasso policy.
void select(SoNode *root, int numCoord, SbVec2f *lassoCoord, const SbViewportRegion &viewport, SbBool shiftPressed)
Simulates interactive selection starting from the root node with the given lasso contour,...
virtual void setStartSelectionCallback(SelectionEventCallback *callback, void *userData=NULL)
Sets the callback called when the mouse button is clicked in selection mode.
SoSFColor lassoColor
Color of lasso.
SoSeparator * getOverlaySceneGraph()
Returns the scene graph that should be passed to the render area function setOverlaySceneGraph .
@ FULL_BBOX
Full bounding box (default)
@ PART_BBOX
Partial bounding box.
SoDEPRECATED void setOverlayLassoPattern(unsigned short pattern)
Sets the lasso stipple pattern.
virtual void addChild(SoNode *child)
Adds a child at the end of the list of children.
SoSFUShort lassoPattern
Stipple pattern.
void useFastEditing(SbBool flg=TRUE)
Sets whether the lasso should be drawn using fast editing.
SoSFEnum lassoMode
Specifies the lasso mode (whether ALL_SHAPES or only VISIBLE_SHAPES can be selected).
SoDEPRECATED float getLassoWidth()
Gets the lasso line width.
SoDEPRECATED int getOverlayLassoColorIndex()
Gets the lasso color index.
SoDEPRECATED unsigned short getOverlayLassoPattern()
Gets the lasso stipple pattern.
const SbVec3f * getLassoCoordsWC(int &numCoords)
Returns the lasso coordinates in world coordinates.
SbBool isUsingFastEditing()
Gets whether the lasso is drawn using fast editing.
SoSFInt32 lassoPatternScaleFactor
Stipple pattern scale factor.
SbBool SoExtSelectionPointCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v1)
@ SELECT_RETURN
same as TRUE - Select the node and stop traversing node's triangle/line/point
@ SELECT_CONTINUE
Select the node but continue for the remaining triangle/line/point.
@ NOSELECT_RETURN
Do not select the node and stop traversing node's triangle/line/point.
@ NOSELECT_CONTINUE
same as FALSE - Do not select the node, but continue with node's next triangle/line/point
SoSFBool animateLasso
Controls lasso animation.
SoDEPRECATED void setLassoWidth(float width)
Sets the lasso line width.
SoDEPRECATED SbColor getLassoColor()
Gets the lasso color.
void setTriangleFilterCallback(SoExtSelectionTriangleCB *cb, void *userData=NULL)
Sets the triangle filter callback .
SoDEPRECATED void setOverlayLassoColorIndex(int index)
Sets the lasso color index.
SoSFFloat lassoWidth
Width of lasso.
const SbVec2s * getLassoCoordsDC(int &numCoords)
Returns the lasso coordinates in device coordinates.
SbEventHandler< PreFilterEventArg & > onPreFilter
The ExtSelection will traverse each node of scene graph and test intersection against each nodes.
void setPointFilterCallback(SoExtSelectionPointCB *cb, void *userData=NULL)
Sets the point filter callback.
virtual void setEndSelectionCallback(SelectionEventCallback *callback, void *userData=NULL)
Sets the callback called when the mouse button is released in selection mode.
virtual void setSelectionSceneGraph(SoNode *sceneGraph)
Sets the scenegraph to be displayed as "lasso" in fast edit mode.
@ VISIBLE_SHAPES
Only visible shapes can be selected.
@ ALL_SHAPES
All shapes can be selected.
const SoPathList & getSelectionPathList() const
Returns paths list of selected objects.
SbBool SoExtSelectionLineSegmentCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2)
virtual SoNode * getSelectionSceneGraph() const
Returns the scenegraph displayed as "lasso" in fast edit mode.
void setLineSegmentFilterCallback(SoExtSelectionLineSegmentCB *cb, void *userData=NULL)
Sets the line segment filter callback.
SbBool SoExtSelectionTriangleCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3)
SoDEPRECATED SbBool isOverlayLassoAnimated()
Gets the the lasso animation flag.
SbBool SelectionEventCallback(const SbVec2s &position, const SbVec3f &scenePosition, SoExtSelection *selection, void *userData)
This is the declaration to use for selection event callback functions.
SoExtSelection()
Constructor.
SoSFEnum lassoType
Specifies lasso type (none, lasso, or rectangle).
SoDEPRECATED void animateOverlayLasso(SbBool flg=TRUE)
Sets the the lasso animation flag.
@ NOLASSO
No lasso (default)
SoDEPRECATED void setLassoColor(SbColor c)
Sets the lasso color.
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
Allows nodes in a graph to receive input events.
Surface material definition node.
Abstract base class for all database nodes.
Orthographic camera node.
Path that points to a list of hierarchical nodes.
Maintains a list of pointers to paths.
Represents a vertex of a generated primitive.
Field containing a single Boolean value.
Field containing an RGB color.
Field containing an enumerated value.
Field containing a floating-point value.
Field containing a int32_t integer.
Field containing an unsigned short integer.
Searches for nodes in a scene graph.
Manages a list of selected objects.
Group node that saves and restores traversal state.
void notify(SoNotList *list)
Structure given to callback when an event is raised.
PreFilterEventArg(SoPath *path, SoExtSelection *source)
constructor
SoExtSelection * getSource() const
Returns the ExtSelection.
const SoPath * getPath() const
Returns path to node that will be traversed just after event is called.
~PreFilterEventArg()
Destructor.
const SoNode * getNode() const
Returns node that will be traversed just after event is called.
SbBool isNodeSkipped() const
Returns if node must be skipped for traversal.
void skipNode()
Don't traverse the node returned by getNode().