Path that allows access to hidden children. More...
#include <Inventor/SoPath.h>
Public Member Functions | |
void | pop () |
SoNode * | getTail () const |
SoNode * | getNodeFromTail (int i) const |
int | getIndexFromTail (int i) const |
int | getInstanceIndexFromTail (int i) const |
int | getLength () const |
Friends | |
class | SoTempPath |
Path that allows access to hidden children.
This class allows expert users to examine "hidden" children in paths. For example children inside a nodeKit. SoPath allows access from the head node down to the first node with hidden children, but no further. Casting an SoPath to an SoFullPath (which is always guaranteed to be safe) allows you to access hidden children. SoFullPath overrides some SoPath methods to make this possible.
You need SoFullPath, for example, to get the actual tail of the pick path (the geometry node) when picking geometry in node kits. For example:
SoPath* pPath = ... SoNode* pTail = ((SoFullPath*)pPath)->getTail();
NOTE: Applying an action on an SoFullPath may not give the expected result.
When applying an action on an SoFullPath, the "hidden" children will not be traversed. If you want to apply an action on all the children in the path, use the following technique:
SoPath* path = ... SoRef<SoPath> tempPath = ((SoFullPath*)path)->copy(); action.apply( tempPath ); tempPath = NULL;
[head node] | |
[number of remaining indices] | |
[index] | |
&... | |
[index] |
int SoFullPath::getIndexFromTail | ( | int | i | ) | const [inline] |
Returns the index of the i'th node (within its parent) in the chain, counting backward from the tail node. Passing 0 for i returns the index of the tail node.
Reimplemented from SoPath.
int SoFullPath::getInstanceIndexFromTail | ( | int | i | ) | const [inline] |
get instance Index from tail
Reimplemented from SoPath.
int SoFullPath::getLength | ( | ) | const [inline] |
Returns length of path chain (number of nodes).
Reimplemented from SoPath.
SoNode* SoFullPath::getNodeFromTail | ( | int | i | ) | const [inline] |
Returns the i'th node (within its parent) in the chain, counting backward from the tail node. Passing 0 for i returns the tail node.
Reimplemented from SoPath.
SoNode* SoFullPath::getTail | ( | ) | const [inline] |
Returns the last node in a path chain.
Reimplemented from SoPath.
void SoFullPath::pop | ( | ) | [inline] |
friend class SoTempPath [friend] |
Reimplemented from SoPath.