SoNodeKitPath(3IV)
SoNodeKitPath (SoNkitPath) - path that points to a list of hierarchical nodekits
Showing IRIX 6.5.30 (default release). Added in IRIX 6.5.22.
NAME SoNodeKitPath (SoNkitPath) - path that points to a list of hierarchical nodekits INHERITS FROM SoBase > SoPath > SoNodeKitPath SYNOPSIS #include <Inventor_c/SoNodeKitPath.h> typedef SoNodeKitPath SoNkitPath Functions from class SoNodeKitPath: void SoNkitPathAppend(SoNkitPath *this, SoBaseKit *childKit) void SoNkitPathAppendPath(SoNkitPath *this, const SoNodeKitPath *fromPath) void SoNkitPathPop(SoNkitPath *this) SoNode * SoNkitPathGetTail(const SoNkitPath *this) SoNode * SoNkitPathGetNode(const SoNkitPath *this, int i) SoNode * SoNkitPathGetNodeFromTail(const SoNkitPath *this, int i) int SoNkitPathGetLen(const SoNkitPath *this) void SoNkitPathTruncate(SoNkitPath *this, int start) SbBool SoNkitPathContainsNode(const SoNkitPath *this, const SoNodeKit *nodeKit) int SoNkitPathFindFork(const SoNkitPath *this, const SoNodeKitPath *path) int SoNkitPathIsEq(SoNkitPath *this, const SoNodeKitPath *p1, const SoNodeKitPath *p2) Functions from class SoPath: void SoNkitPathSetHead(SoNkitPath *this, SoNode *node) SoNode * SoNkitPathGetHead(const SoNkitPath *this) SbBool SoNkitPathContainsPath(const SoNkitPath *this, const SoPath *path) SoPath * SoNkitPathCopy(const SoNkitPath *this, int startFromNodeIndex = 0, int numNodes = 0) SoPath * SoNkitPathGetByName(const char *name) int SoNkitPathGetByNameList(const char *name, SoPathList *list) Functions from class SoBase: void SoNkitPathRef(SoNkitPath *this) void SoNkitPathUnref(const SoNkitPath *this) void SoNkitPathUnrefNoDelete(const SoNkitPath *this) void SoNkitPathTouch(SoNkitPath *this) SoType SoNkitPathGetClassTypeId() SoType SoNkitPathGetTypeId(const SoNkitPath *this) SbBool SoNkitPathIsOfType(const SoNkitPath *this, SoType type) void SoNkitPathSetName(SoNkitPath *this, const char *name) SbName SoNkitPathGetName(const SoNkitPath *this) DESCRIPTION SoNodeKitPath is a subclass of SoPath that lets you look at nodekits below the top nodekit in the path. Since nodekits have hidden children, when you call SoPathGetTail() on a regular path, it returns the top-most nodekit on the path. This occurs even though the path might contain extra internal information leading to a node far deeper in the scene graph. For example, when picking an object inside an SoSceneKit, the regular path would end at the scenekit. But a nodekit path would continue further down listing the other nodekits below it in the path. Intermediary (private) nodes between nodekits are not included in the nodekit path. Note that there is no constructor for an SoNodeKitPath, so you can not create one. Rather, you cast an (SoPath *) into an (SoNodeKitPath *), which returns nodekit-style values from all the same questions as SoPath. Also, some methods of SoPath may not be called on an SoNodeKitPath. Any methods which take a regular SoNode as an argument (except for setHead()) are not accessible, and replaced by methods that take an SoBaseKit as an argument instead. Methods which allow the programmer to refer to the child index of a node beneath its parent are also inaccessible; since a SoNodeKitPath only shows nodekits and hides any private parts, successive nodekits in the path may not actually be parent and child. FUNCTIONS void SoNkitPathAppend(SoNkitPath *this, SoBaseKit *childKit) Adds childKit to end of chain; uses first occurrence of childKit as a part within current last nodekit. If the path is empty, this is equivalent to SoNkitPathSetHead(childKit). void SoNkitPathAppendPath(SoNkitPath *this, const SoNodeKitPath *fromPath) Adds all nodekits in fromPath's chain to end of chain; the head node of fromPath must be the same as or a child of the current tail node. void SoNkitPathPop(SoNkitPath *this) Pops the last nodekit off the end of the path. SoNode * SoNkitPathGetTail(const SoNkitPath *this) Return the last nodekit in a path chain. Note that SoNkitPathGetHead() is not redefined from SoPath, since an SoNodeKitPath need not begin with a nodekit; the restriction is placed only on successive nodes on the path. SoNode * SoNkitPathGetNode(const SoNkitPath *this, int i) Returns a pointer to the i'th node in the nodekit path. SoNode * SoNkitPathGetNodeFromTail(const SoNkitPath *this, int i) Returns a pointer to the i'th nodekit in the chain, counting backward from the tail nodekit. Passing 0 for i returns the tail nodekit. int SoNkitPathGetLen(const SoNkitPath *this) Returns length of path chain (number of nodekits). void SoNkitPathTruncate(SoNkitPath *this, int start) Truncates the path chain, removing all nodes from index start on. Calling SoNkitPathTruncate(0) empties the path entirely. SbBool SoNkitPathContainsNode(const SoNkitPath *this, const SoNodeKit *nodeKit) Returns TRUE if the passed nodekit is found anywhere in the path chain. int SoNkitPathFindFork(const SoNkitPath *this, const SoNodeKitPath *path) If the two paths have different head nodes, this returns -1. Otherwise, it returns the path chain index of the last nodekit (starting at the head) that is the same for both paths. int SoNkitPathIsEq(SoNkitPath *this, const SoNodeKitPath *p1, const SoNodeKitPath *p2) Returns TRUE if all node pointers in the two nodekit path chains are equal. SEE ALSO SoBaseKit, SoPath, SoRayPickAction, SoSearchAction