From Aurelien Albert, "I made a modification in the Dragger class :
You can now set a "intersection mask" and it will be used when looking for intersections. So you can now easily "hide" some objects from manipulators."
This commit is contained in:
@@ -262,6 +262,13 @@ class OSGMANIPULATOR_EXPORT Dragger : public osg::MatrixTransform
|
||||
void setDraggerActive(bool active) { _draggerActive = active; }
|
||||
bool getDraggerActive() const { return _draggerActive; }
|
||||
|
||||
/**
|
||||
* Set/Get the traversal mask used by this dragger when looking for intersections during event handling.
|
||||
* This is usefull to "hide" some geometry during event handling.
|
||||
*/
|
||||
virtual void setIntersectionMask(osg::Node::NodeMask intersectionMask) { _intersectionMask = intersectionMask; }
|
||||
osg::Node::NodeMask getIntersectionMask() const { return _intersectionMask; }
|
||||
|
||||
protected:
|
||||
|
||||
Dragger();
|
||||
@@ -285,6 +292,7 @@ class OSGMANIPULATOR_EXPORT Dragger : public osg::MatrixTransform
|
||||
osg::ref_ptr<DraggerCallback> _selfUpdater;
|
||||
Constraints _constraints;
|
||||
DraggerCallbacks _draggerCallbacks;
|
||||
osg::Node::NodeMask _intersectionMask;
|
||||
|
||||
};
|
||||
|
||||
@@ -317,6 +325,8 @@ class OSGMANIPULATOR_EXPORT CompositeDragger : public Dragger
|
||||
bool containsDragger(const Dragger* dragger) const;
|
||||
DraggerList::iterator findDragger(const Dragger* dragger);
|
||||
|
||||
virtual void setIntersectionMask(osg::Node::NodeMask intersectionMask);
|
||||
|
||||
protected:
|
||||
|
||||
CompositeDragger() {}
|
||||
|
||||
Reference in New Issue
Block a user