1SoSeparator(3IV)()                                          SoSeparator(3IV)()
2
3
4

NAME

6       SoSeparator — group node that saves and restores traversal state
7

INHERITS FROM

9       SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator
10

SYNOPSIS

12       #include <Inventor/nodes/SoSeparator.h>
13
14     enum CacheEnabled {
15          SoSeparator::OFF    Never build a cache
16          SoSeparator::ON     Always try to build a cache
17          SoSeparator::AUTO   Decide whether to cache based on some heuristic
18     }
19
20          Fields from class SoSeparator:
21
22     SoSFEnum            renderCaching
23     SoSFEnum            boundingBoxCaching
24     SoSFEnum            renderCulling
25     SoSFEnum            pickCulling
26
27          Methods from class SoSeparator:
28
29                         SoSeparator()
30                         SoSeparator(int nChildren)
31     static void         setNumRenderCaches(int howMany)
32     static int          getNumRenderCaches()
33     static SoType       getClassTypeId()
34
35          Methods from class SoGroup:
36
37     void                addChild(SoNode *child)
38     void                insertChild(SoNode *child, int newChildIndex)
39     SoNode *            getChild(int index) const
40     int                 findChild(const SoNode *child) const
41     int                 getNumChildren() const
42     void                removeChild(int index)
43     void                removeChild(SoNode *child)
44     void                removeAllChildren()
45     void                replaceChild(int index, SoNode *newChild)
46     void                replaceChild(SoNode *oldChild, SoNode *newChild)
47
48          Methods from class SoNode:
49
50     void                setOverride(SbBool state)
51     SbBool              isOverride() const
52     SoNode *            copy(SbBool copyConnections = FALSE) const
53     virtual SbBool      affectsState() const
54     static SoNode *     getByName(const SbName &name)
55     static int          getByName(const SbName &name, SoNodeList &list)
56
57          Methods from class SoFieldContainer:
58
59     void                setToDefaults()
60     SbBool              hasDefaultValues() const
61     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
62     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
63                              copyConnections = FALSE)
64     SbBool              set(const char *fieldDataString)
65     void                get(SbString &fieldDataString)
66     virtual int         getFields(SoFieldList &resultList) const
67     virtual SoField *   getField(const SbName &fieldName) const
68     SbBool              getFieldName(const SoField *field, SbName &fieldName)
69                              const
70     SbBool              isNotifyEnabled() const
71     SbBool              enableNotify(SbBool flag)
72
73          Methods from class SoBase:
74
75     void                ref()
76     void                unref() const
77     void                unrefNoDelete() const
78     void                touch()
79     virtual SoType      getTypeId() const
80     SbBool              isOfType(SoType type) const
81     virtual void        setName(const SbName &name)
82     virtual SbName      getName() const
83
84

DESCRIPTION

86       This  group  node  performs a push (save) of the traversal state before
87       traversing its children and a pop (restore) after traversing them. This
88       isolates  the  separator's children from the rest of the scene graph. A
89       separator can include lights, cameras, coordinates, normals,  bindings,
90       and  all  other  properties.  Separators are relatively inexpensive, so
91       they can be used freely within scenes.
92
93       The SoSeparator node provides caching of  state  during  rendering  and
94       bounding  box  computation.  This feature can be enabled by setting the
95       renderCaching and boundingBoxCaching fields. By default, these are  set
96       to  AUTO,  which  means  that Inventor decides whether to build a cache
97       based on internal heuristics.
98
99       Separators can also  perform  culling  during  rendering  and  picking.
100       Culling  skips  over  traversal of the separator's children if they are
101       not going to be rendered or picked, based on the comparison of the sep‐
102       arator's  bounding  box  with  the current view volume. Culling is con‐
103       trolled by the renderCulling and pickCulling fields. These are also set
104       to  AUTO  by default; however, render culling can be expensive (and can
105       interfere with render caching), so the AUTO heuristics  leave  it  dis‐
106       abled unless specified otherwise.
107

FIELDS

109     SoSFEnum            renderCaching
110          Whether to cache during rendering traversal.
111
112     SoSFEnum            boundingBoxCaching
113          Whether to cache during bounding box traversal.
114
115     SoSFEnum            renderCulling
116          Whether to cull during rendering traversal.
117
118     SoSFEnum            pickCulling
119          Whether to cull during picking traversal.
120
121

METHODS

123                         SoSeparator()
124          Creates a separator node with default settings.
125
126                         SoSeparator(int nChildren)
127          Constructor that takes approximate number of children.
128
129     static void         setNumRenderCaches(int howMany)
130          By  default, each separator node maintains 2 render caches. (This is
131          to allow two different representations, such  as  filled  and  wire-
132          frame, to both be cached.) The setNumRenderCaches() method  sets the
133          number of render caches each separator will have. Each render  cache
134          uses  memory,  so  increasing  this  number  may increase the memory
135          requirements of the application. This method affects only separators
136          that  are  created after it is called, not separators that were cre‐
137          ated before. Setting the number of caches  to  0  turns  off  render
138          caching globally from then on.
139
140     static int          getNumRenderCaches()
141          Returns the current number of render caches.
142
143     static SoType       getClassTypeId()
144          Returns type identifier for this class.
145
146

ACTION BEHAVIOR

148       SoGLRenderAction,  SoCallbackAction,  SoGetBoundingBoxAction,  SoGetMa‐
149       trixAction, SoHandleEventAction, SoRayPickAction, SoSearchAction
150          Saves the current  traversal  state,  traverses  all  children,  and
151          restores the previous traversal state.
152
153

FILE FORMAT/DEFAULTS

155       Separator {
156          renderCaching       AUTO
157          boundingBoxCaching  AUTO
158          renderCulling       AUTO
159          pickCulling         AUTO
160     }
161

SEE ALSO

163       SoSelection, SoTransformSeparator
164
165
166
167
168                                                            SoSeparator(3IV)()
Impressum