| 1 |
NAME SoSeparator SoSep SO_SEP_ { |
| 2 |
group node that saves and restores traversal state |
| 3 |
} |
| 4 |
|
| 5 |
INCLUDE nodes/SoSeparator.h |
| 6 |
|
| 7 |
DESC { |
| 8 |
This group node performs a push (save) of the traversal state before |
| 9 |
traversing its children and a pop (restore) after traversing them. |
| 10 |
This isolates the separator's children from the rest of the scene |
| 11 |
graph. A separator can include lights, cameras, coordinates, normals, |
| 12 |
bindings, and all other properties. Separators are relatively |
| 13 |
inexpensive, so they can be used freely within scenes. |
| 14 |
\p |
| 15 |
The \cSoSeparator\. node provides caching of state during rendering |
| 16 |
and bounding box computation. This feature can be enabled by setting |
| 17 |
the \vrenderCaching\. and \vboundingBoxCaching\. fields. By default, |
| 18 |
these are set to \kAUTO\., which means that Inventor decides whether |
| 19 |
to build a cache based on internal heuristics. |
| 20 |
\p |
| 21 |
Separators can also perform culling during rendering and picking. |
| 22 |
Culling skips over traversal of the separator's children if they are |
| 23 |
not going to be rendered or picked, based on the comparison of the |
| 24 |
separator's bounding box with the current view volume. Culling is |
| 25 |
controlled by the \vrenderCulling\. and \vpickCulling\. fields. These |
| 26 |
are also set to \kAUTO\. by default; however, render culling can be |
| 27 |
expensive (and can interfere with render caching), so the \kAUTO\. |
| 28 |
heuristics leave it disabled unless specified otherwise. |
| 29 |
} |
| 30 |
|
| 31 |
ENUM CacheEnabled { |
| 32 |
OFF "Never build a cache", |
| 33 |
ON "Always try to build a cache", |
| 34 |
AUTO "Decide whether to cache based on some heuristic" |
| 35 |
} |
| 36 |
|
| 37 |
FIELD renderCaching { Whether to cache during rendering traversal. } |
| 38 |
FIELD boundingBoxCaching { Whether to cache during bounding box traversal. } |
| 39 |
FIELD renderCulling { Whether to cull during rendering traversal. } |
| 40 |
FIELD pickCulling { Whether to cull during picking traversal. } |
| 41 |
|
| 42 |
METHOD "" SoSeparator() { |
| 43 |
Creates a separator node with default settings. |
| 44 |
} |
| 45 |
|
| 46 |
METHOD CreateN SoSeparator(int nChildren) { |
| 47 |
Constructor that takes approximate number of children. |
| 48 |
} |
| 49 |
|
| 50 |
METHOD "" static void setNumRenderCaches(int howMany) { |
| 51 |
By default, each separator node maintains 2 render caches. (This is to |
| 52 |
allow two different representations, such as filled and wire-frame, to |
| 53 |
both be cached.) The |
| 54 |
\+\msetNumRenderCaches()\. method\. |
| 55 |
\-\mSoSepSetNumRenderCaches()\. function\. |
| 56 |
sets the number of render caches each separator will have. Each render |
| 57 |
cache uses memory, so increasing this number may increase the memory |
| 58 |
requirements of the application. This method affects only separators |
| 59 |
that are created after it is called, not separators that were created |
| 60 |
before. Setting the number of caches to 0 turns off render caching |
| 61 |
globally from then on. |
| 62 |
} |
| 63 |
|
| 64 |
METHOD "" static int getNumRenderCaches() { |
| 65 |
Returns the current number of render caches. |
| 66 |
} |
| 67 |
|
| 68 |
METHOD "" static SoType getClassTypeId() { |
| 69 |
Returns type identifier for this class. |
| 70 |
} |
| 71 |
|
| 72 |
ACTION SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, |
| 73 |
SoGetMatrixAction, SoHandleEventAction, SoRayPickAction, |
| 74 |
SoSearchAction { |
| 75 |
Saves the current traversal state, traverses all children, and |
| 76 |
restores the previous traversal state. |
| 77 |
} |
| 78 |
|
| 79 |
ALSO { SoSelection, SoTransformSeparator } |