Open Inventor Reference
|
Separator nodekit class. More...
#include <Inventor/nodekits/SoSeparatorKit.h>
Public Types | |
enum | CacheEnabled { OFF, ON, AUTO } |
Possible values for caching. More... | |
Public Member Functions | |
SoSeparatorKit () | |
Constructor. | |
virtual SbBool | affectsState () const |
Overrides default method on SoNode. | |
Static Public Member Functions | |
static void | initClass () |
Initializes base node class. | |
Public Attributes | |
Fields | |
SoSFEnum | renderCaching |
Set render caching mode. Default is AUTO . | |
SoSFEnum | boundingBoxCaching |
Set bounding box caching mode. | |
SoSFEnum | renderCulling |
Set render culling mode. | |
SoSFEnum | pickCulling |
Set pick culling mode. Default is AUTO . | |
Protected Member Functions | |
virtual SbBool | setUpConnections (SbBool onOff, SbBool doItAlways=FALSE) |
detach/attach any sensors, callbacks, and/or field connections. | |
virtual void | setDefaultOnNonWritingFields () |
Called by the SoBaseKit::write() method. | |
void | connectSeparatorFields (SoSeparator *dest, SbBool onOff) |
virtual | ~SoSeparatorKit () |
Static Protected Member Functions | |
static void | fieldSensorCB (void *, SoSensor *) |
Protected Attributes | |
SoFieldSensor * | fieldSensor |
This sensor will watch the topSeparator part. | |
SoSeparator * | oldTopSep |
A nodekit that is used for creating nodekit hierarchies. SoSeparatorKit contains a transform part, a childList part, and a few others in its catalog. The transform part (an SoTransform node) affects all of the children in the childList
. Each of these children must be an SoSeparatorKit or from a class that is derived from SoSeparatorKit (e.g., SoShapeKit and SoWrapperKit). Since all members of the childList are in turn SoSeparatorKits, and each contains a transform, these nested lists allow you to create a hierarchy of motion, in which each transform affects an entire subgraph of nodekits.
The other parts added to the catalog for the SoSeparatorKit are pickStyle, appearance, units and texture2Transform. Furthermore, since SoSeparator is derived from SoBaseKit, it inherits the callbackList part. This is a list of SoCallback and/or SoEventCallback nodes which enable the SoSeparatorKit to perform special callbacks whenever an action is applied to it.
By creating the pickStyle part, a user can alter the pick style for the entire nodekit hierarchy. The appearance part is an SoAppearanceKit nodekit. Note that all parts contained in the SoAppearanceKit catalog can be accessed as if they were part of the SoSeparatorKit. For example:
myMtl = mySepKit->getPart("material",TRUE)
and
mySepKit->setPart("material",myMtl)
See SoBaseKit for further explanation.
NULL
by default, but is created automatically if necessary. NULL
by default, but is created automatically if necessary. NULL
by default, but is created automatically if necessary. NULL
by default, but is created automatically if necessary. NULL
by default, but is created automatically if necessary. NULL
by default, but is created automatically when the first child is added to the childList. Also, when asked to build a member of the childList, the separatorKit will build an SoShapeKit by default. So if the childList part is NULL, and you call: getPart("childList[0]", TRUE), the separator kit will create the childList and add an SoShapeKit as the new element in the list.Definition at line 133 of file SoSeparatorKit.h.
OFF |
Never build or use a cache. |
ON |
Always try to build a cache. |
AUTO |
Decide based on some heuristic. |
Definition at line 149 of file SoSeparatorKit.h.
SoSeparatorKit::SoSeparatorKit | ( | ) |
virtual SoSeparatorKit::~SoSeparatorKit | ( | ) | [protected, virtual] |
void SoSeparatorKit::connectSeparatorFields | ( | SoSeparator * | dest, |
SbBool | onOff | ||
) | [protected] |
static void SoSeparatorKit::fieldSensorCB | ( | void * | , |
SoSensor * | |||
) | [static, protected] |
static void SoSeparatorKit::initClass | ( | ) | [static] |
Reimplemented from SoBaseKit.
Reimplemented in SoShapeKit, and SoWrapperKit.
virtual void SoSeparatorKit::setDefaultOnNonWritingFields | ( | ) | [protected, virtual] |
Calls setDefault(TRUE) on the topSeparator. Note that this may be overriden later by basekit if, for example, topSeparator lies on a path that is being written out.
Reimplemented from SoBaseKit.
Reimplemented in SoShapeKit.
virtual SbBool SoSeparatorKit::setUpConnections | ( | SbBool | onOff, |
SbBool | doItAlways = FALSE |
||
) | [protected, virtual] |
Called by: start/end of SoBaseKit::readInstance and on new copy by: start/end of SoBaseKit::copy. Classes that redefine must call setUpConnections(TRUE,TRUE) at end of constructor. Returns the state of the node when this was called.
Reimplemented from SoBaseKit.
Default is ON
. Setting this value to AUTO
is equivalent to ON
(automatic culling is not implemented.)
Definition at line 164 of file SoSeparatorKit.h.
SoFieldSensor* SoSeparatorKit::fieldSensor [protected] |
If the part changes to a new node, then the fields of the old part will be disconnected and the fields of the new part will be connected. Connections are made from/to the renderCaching, boundingBoxCaching, renderCulling and pickCulling fields. This way, the SoSeparatorKit can be treated from the outside just like a regular SoSeparator node. Setting the fields will affect caching and culling, even though the topSeparator takes care of it. oldTopSep keeps track of the part for comparison.
Definition at line 209 of file SoSeparatorKit.h.
SoSeparator* SoSeparatorKit::oldTopSep [protected] |
Definition at line 211 of file SoSeparatorKit.h.
Definition at line 172 of file SoSeparatorKit.h.
Definition at line 159 of file SoSeparatorKit.h.
Default is OFF
. Setting this value to AUTO
is equivalent to ON
(automatic culling is not implemented.)
Definition at line 169 of file SoSeparatorKit.h.