Open Inventor Reference
SoSeparatorKit Class Reference

Separator nodekit class. More...

#include <Inventor/nodekits/SoSeparatorKit.h>

Inheritance diagram for SoSeparatorKit:
SoBaseKit SoNode SoFieldContainer SoBase SoShapeKit SoWrapperKit

List of all members.

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

SoFieldSensorfieldSensor
 This sensor will watch the topSeparator part.
SoSeparatoroldTopSep

Detailed Description

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.

Parts
pickStyle
An SoPickStyle property node that can be used to set the picking style of its children. This part is NULL by default, but is created automatically if necessary.
appearance
An SoAppearanceKit nodekit which can be used to set the appearance properties of its children. This part is NULL by default, but is created automatically if necessary.
units
An SoUnits node which can be used to set the types of units, (e.g., feet), of its children. This part is NULL by default, but is created automatically if necessary.
transform
An SoTransform node which can be used to set the overall position, orientation, and scale of its children. This part is NULL by default, but is created automatically if necessary.
texture2Transform
An SoTexture2Transform node which can be used to apply a transformation to any textures used by its children. This part is NULL by default, but is created automatically if necessary.
childList
This part contains the children nodekits of this SoSeparatorKit. This part is a list part and can have multiple children. This part is 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.
See Also
SoAppearanceKit, SoBaseKit, SoCameraKit, SoLightKit, SoNodeKit, SoNodeKitDetail, SoNodeKitListPart, SoNodeKitPath, SoNodekitCatalog, SoSceneKit, SoShapeKit, SoWrapperKit

Definition at line 133 of file SoSeparatorKit.h.


Member Enumeration Documentation

Enumerator:
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.


Constructor & Destructor Documentation

SoSeparatorKit::SoSeparatorKit ( )
virtual SoSeparatorKit::~SoSeparatorKit ( ) [protected, virtual]

Member Function Documentation

virtual SbBool SoSeparatorKit::affectsState ( ) const [virtual]

Reimplemented from SoNode.

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.


Member Data Documentation

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.

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.

Definition at line 211 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.


The documentation for this class was generated from the following file: