Debian Codegraph @

doc/man/man3/ivm/general/SoNodeKitPath.ivm

raw
1 NAME SoNodeKitPath SoNkitPath "" { path that points to a list of hierarchical nodekits }
2
3 INCLUDE SoNodeKitPath.h
4
5 DESC {
6 \cSoNodeKitPath\. is a subclass of \cSoPath\. that lets you
7 look at nodekits below the top nodekit in the path. Since nodekits have
8 hidden children, when you call \m\+getTail()\.\-SoPathGetTail()\.\. on
9 a regular path, it returns the top-most
10 nodekit on the path. This occurs even though the path might contain extra
11 internal information leading to a node far deeper in the scene graph.
12 For example, when picking an object inside an \cSoSceneKit\., the
13 \eregular\. path would end at the scenekit. But a \enodekit\.
14 path would
15 continue further down listing the other nodekits below it in the path.
16 \p
17 Intermediary (private) nodes between nodekits are not included in the
18 nodekit path.
19 \p
20 Note that there is no constructor for an \cSoNodeKitPath\., so
21 you can not create one. Rather, you cast an \c(SoPath *)\. into
22 an \c(SoNodeKitPath *)\., which returns nodekit-style values from all
23 the same questions as \cSoPath\..
24 \p
25 Also, some methods of \cSoPath\. may not be called on an \cSoNodeKitPath\..
26 Any methods which take a regular \cSoNode\. as an argument (except for
27 \msetHead()\.) are not accessible, and replaced by methods that take an
28 \cSoBaseKit\. as an argument instead. Methods which allow the programmer to
29 refer to the child index of a node beneath its parent are also inaccessible;
30 since a \cSoNodeKitPath\. only shows nodekits and hides any private parts,
31 successive nodekits in the path may not actually be parent and child.
32 }
33
34 METHOD "" void append(SoBaseKit *childKit) {
35 Adds \achildKit\. to end of chain; uses first occurrence of \achildKit\.
36 as a part within current last nodekit. If the path is empty, this is
37 equivalent to
38 \+\msetHead(childKit)\..\.
39 \-\mSoNkitPathSetHead(childKit)\..\.
40 }
41
42 METHOD AppendPath void append(const SoNodeKitPath *fromPath) {
43 Adds all nodekits in \afromPath\.'s chain to end of chain; the head node
44 of \afromPath\. must be the same as or a child of the current tail node.
45 }
46
47 METHOD "" void pop() {
48 Pops the last nodekit off the end of the path.
49 }
50
51 METHOD "" SoNode * getTail() const {
52 Return the last nodekit in a path chain. Note that
53 \m\+getHead()\.\-SoNkitPathGetHead()\.\. is not redefined from \cSoPath\.,
54 since an \cSoNodeKitPath\. need not begin with a nodekit; the restriction is
55 placed only on successive nodes on the path.
56 }
57
58 METHOD "" SoNode * getNode(int i) const {
59 Returns a pointer to the \ai\.'th node in the nodekit path.
60 }
61
62
63 METHOD "" SoNode * getNodeFromTail(int i) const {
64 Returns a pointer to the \ai\.'th nodekit
65 in the chain, counting backward from
66 the tail nodekit. Passing 0 for \ai\. returns the tail nodekit.
67 }
68
69 METHOD getLen int getLength() const {
70 Returns length of path chain (number of nodekits).
71 }
72
73 METHOD "" void truncate(int start) {
74 Truncates the path chain, removing all nodes from index \astart\. on.
75 Calling
76 \+\mtruncate(0)\.\.
77 \-\mSoNkitPathTruncate(0)\.\.
78 empties the path entirely.
79 }
80
81 METHOD "" SbBool containsNode(const SoNodeKit *nodeKit) const {
82 Returns TRUE if the passed nodekit is found anywhere in the path chain.
83 }
84
85 METHOD "" int findFork(const SoNodeKitPath *path) const {
86 If the two paths have different head nodes, this returns -1.
87 Otherwise, it returns the path chain index of the last nodekit (starting
88 at the head) that is the same for both paths.
89 }
90
91 METHOD "" friend int operator ==(const SoNodeKitPath &p1,
92 const SoNodeKitPath &p2) {
93 Returns TRUE if all node pointers in the two nodekit path chains are equal.
94 }
95
96 METHOD AppendInd hidden void append(int childIndex) {}
97 METHOD AppendNode hidden void append(SoNode *childNode) {}
98 METHOD AppendPath hidden void append(const SoPath *fromPath) {}
99 METHOD "" hidden void push(int childIndex) {}
100 METHOD getInd hidden int getIndex(int i) const {}
101 METHOD GetIndFromTail hidden int getIndexFromTail(int i) const {}
102
103 ALSO { SoBaseKit, SoPath, SoRayPickAction, SoSearchAction }