Added new Node::getParentalNodePaths() method.
Added better handling in computeIntersections(..) of nodes that are internal to the scene graph, correctly accounting for the accumulated transforms. Changed the EventVisitor so that it only traveses active children rather than all children. Updated wrappers.
This commit is contained in:
@@ -28,6 +28,14 @@ namespace osg {
|
||||
class NodeVisitor;
|
||||
class Group;
|
||||
class Transform;
|
||||
class Node;
|
||||
|
||||
/** A vector of Nodes pointers which is used to describe the path from a root node to a descendant.*/
|
||||
typedef std::vector< Node* > NodePath;
|
||||
|
||||
/** A vector of NodePath, typically used to describe all the paths from a node to the potential root nodes it has.*/
|
||||
typedef std::vector< NodePath > NodePathList;
|
||||
|
||||
|
||||
/** META_Node macro define the standard clone, isSameKindAs, className
|
||||
* and accept methods. Use when subclassing from Node to make it
|
||||
@@ -103,6 +111,7 @@ class OSG_EXPORT Node : public Object
|
||||
inline ParentList getParents() { return _parents; }
|
||||
|
||||
inline Group* getParent(unsigned int i) { return _parents[i]; }
|
||||
|
||||
/**
|
||||
* Get a single const parent of node.
|
||||
* @param i index of the parent to get.
|
||||
@@ -116,6 +125,10 @@ class OSG_EXPORT Node : public Object
|
||||
*/
|
||||
inline unsigned int getNumParents() const { return _parents.size(); }
|
||||
|
||||
/** Get the list of node paths parent paths.
|
||||
* The optional Node* haltTraversalAtNode allows the user to prevent traversal beyond a specifed node. */
|
||||
NodePathList getParentalNodePaths(osg::Node* haltTraversalAtNode=0) const;
|
||||
|
||||
|
||||
/** Set update node callback, called during update traversal. */
|
||||
void setUpdateCallback(NodeCallback* nc);
|
||||
@@ -337,9 +350,6 @@ class OSG_EXPORT Node : public Object
|
||||
|
||||
};
|
||||
|
||||
/** A vector of Nodes pointers which is used to describe the path from a root node to a descendant.*/
|
||||
typedef std::vector<Node*> NodePath;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user