1SoNodeKitPath(3IV)()                                      SoNodeKitPath(3IV)()
2
3
4

NAME

6       SoNodeKitPath — path that points to a list of hierarchical nodekits
7

INHERITS FROM

9       SoBase > SoPath > SoNodeKitPath
10

SYNOPSIS

12       #include <Inventor/SoNodeKitPath.h>
13
14          Methods from class SoNodeKitPath:
15
16     void                append(SoBaseKit *childKit)
17     void                append(const SoNodeKitPath *fromPath)
18     void                pop()
19     SoNode *            getTail() const
20     SoNode *            getNode(int i) const
21     SoNode *            getNodeFromTail(int i) const
22     int                 getLength() const
23     void                truncate(int start)
24     SbBool              containsNode(const SoNodeKit *nodeKit) const
25     int                 findFork(const SoNodeKitPath *path) const
26     friend int          operator ==(const SoNodeKitPath &p1, const SoNodeKit‐
27                              Path &p2)
28
29          Methods from class SoPath:
30
31     void                setHead(SoNode *node)
32     SoNode *            getHead() const
33     SbBool              containsPath(const SoPath *path) const
34     SoPath *            copy(int startFromNodeIndex = 0, int  numNodes  =  0)
35                              const
36     static SoPath *     getByName(const SbName &name)
37     static int          getByName(const SbName &name, SoPathList &list)
38
39          Methods from class SoBase:
40
41     void                ref()
42     void                unref() const
43     void                unrefNoDelete() const
44     void                touch()
45     static SoType       getClassTypeId()
46     virtual SoType      getTypeId() const
47     SbBool              isOfType(SoType type) const
48     virtual void        setName(const SbName &name)
49     virtual SbName      getName() const
50
51

DESCRIPTION

53       SoNodeKitPath  is  a  subclass of SoPath that lets you look at nodekits
54       below the top nodekit in the path. Since nodekits have hidden children,
55       when  you  call  getTail()  on  a regular path, it returns the top-most
56       nodekit on the path.  This occurs even though the  path  might  contain
57       extra  internal  information  leading to a node far deeper in the scene
58       graph. For example, when picking an object inside  an  SoSceneKit,  the
59       regular  path would end at the scenekit.  But a nodekit path would con‐
60       tinue further down listing the other nodekits below it in the path.
61
62       Intermediary (private) nodes between nodekits are not included  in  the
63       nodekit path.
64
65       Note  that there is no constructor for an SoNodeKitPath, so you can not
66       create one. Rather, you cast an (SoPath *) into an  (SoNodeKitPath  *),
67       which  returns  nodekit-style  values  from  all  the same questions as
68       SoPath.
69
70       Also, some methods of SoPath may not be called on an SoNodeKitPath. Any
71       methods  which  take  a  regular SoNode as an argument (except for set‐
72       Head()) are not accessible,  and  replaced  by  methods  that  take  an
73       SoBaseKit as an argument instead. Methods which allow the programmer to
74       refer to the child index of a node beneath its parent are also inacces‐
75       sible;  since a SoNodeKitPath only shows nodekits and hides any private
76       parts, successive nodekits in the path may not actually be  parent  and
77       child.
78

METHODS

80     void                append(SoBaseKit *childKit)
81          Adds  childKit to end of chain; uses first occurrence of childKit as
82          a part within current last nodekit. If the path is  empty,  this  is
83          equivalent to setHead(childKit).
84
85     void                append(const SoNodeKitPath *fromPath)
86          Adds all nodekits in fromPath's chain to end of chain; the head node
87          of fromPath must be the same as or a child of the current tail node.
88
89     void                pop()
90          Pops the last nodekit off the end of the path.
91
92     SoNode *            getTail() const
93          Return the last nodekit in a path chain. Note that getHead() is  not
94          redefined  from SoPath, since an SoNodeKitPath need not begin with a
95          nodekit; the restriction is placed only on successive nodes  on  the
96          path.
97
98     SoNode *            getNode(int i) const
99          Returns a pointer to the i'th node in the nodekit path.
100
101     SoNode *            getNodeFromTail(int i) const
102          Returns  a  pointer to the i'th nodekit in the chain, counting back‐
103          ward from the tail  nodekit.  Passing  0  for  i  returns  the  tail
104          nodekit.
105
106     int                 getLength() const
107          Returns length of path chain (number of nodekits).
108
109     void                truncate(int start)
110          Truncates  the  path  chain, removing all nodes from index start on.
111          Calling truncate(0)  empties the path entirely.
112
113     SbBool              containsNode(const SoNodeKit *nodeKit) const
114          Returns TRUE if the passed nodekit is found  anywhere  in  the  path
115          chain.
116
117     int                 findFork(const SoNodeKitPath *path) const
118          If  the two paths have different head nodes, this returns -1. Other‐
119          wise, it returns the path chain index of the last nodekit  (starting
120          at the head) that is the same for both paths.
121
122     friend int          operator ==(const SoNodeKitPath &p1, const SoNodeKit‐
123                              Path &p2)
124          Returns TRUE if all node pointers in the two nodekit path chains are
125          equal.
126
127

SEE ALSO

129       SoBaseKit, SoPath, SoRayPickAction, SoSearchAction
130
131
132
133
134                                                          SoNodeKitPath(3IV)()
Impressum