Open Inventor Reference
SoNode Class Reference

Abstract base class for all database nodes. More...

#include <Inventor/nodes/SoNode.h>

Inheritance diagram for SoNode:
SoFieldContainer SoBase SoBaseColor SoBaseKit SoCallback SoCamera SoClipPlane SoColorIndex SoComplexity SoCoordinate3 SoCoordinate4 SoDrawStyle SoEnvironment SoEventCallback SoFile SoFont SoGroup SoInfo SoLabel SoLight SoLightModel SoMaterial SoMaterialBinding SoNodeKitListPart SoNormal SoNormalBinding SoPackedColor SoPickStyle SoPolygonOffset SoProfile SoProfileCoordinate2 SoProfileCoordinate3 SoShape SoShapeHints SoTexture2 SoTexture2Transform SoTextureCoordinate2 SoTextureCoordinateBinding SoTextureCoordinateFunction SoTransformation SoVertexProperty SoWWWInline

List of all members.

Public Types

enum  Stage { FIRST_INSTANCE, PROTO_INSTANCE, OTHER_INSTANCE }

Public Member Functions

void setOverride (SbBool state)
 Turns override flag on or off.
SbBool isOverride () const
 Returns the state of the override flag.
SoNodecopy (SbBool copyConnections=FALSE) const
 Creates and returns an exact copy of the node.
virtual SbBool affectsState () const
 Returns TRUE if a node has an effect on the state during traversal.
virtual void doAction (SoAction *action)
 This method performs the "typical" operation of a node for any action.
virtual void GLRender (SoGLRenderAction *action)
 These virtual functions implement all of the actions for nodes, Most of the default implementations do nothing.
virtual void callback (SoCallbackAction *action)
virtual void getBoundingBox (SoGetBoundingBoxAction *action)
virtual void getMatrix (SoGetMatrixAction *action)
virtual void handleEvent (SoHandleEventAction *action)
virtual void pick (SoPickAction *action)
virtual void rayPick (SoRayPickAction *action)
virtual void search (SoSearchAction *action)
virtual void write (SoWriteAction *action)
virtual void GLRenderBelowPath (SoGLRenderAction *action)
 These methods make render traversal faster by implementing different rendering paths corresponding to different action path codes.
virtual void GLRenderInPath (SoGLRenderAction *action)
virtual void GLRenderOffPath (SoGLRenderAction *action)
virtual void grabEventsSetup ()
 These virtual functions are called when a node gains or loses status as "grabber" of events (see HandleEventAction::setGrabber()).
virtual void grabEventsCleanup ()
virtual void startNotify ()
 Initiates notification from an instance.
virtual void notify (SoNotList *list)
 Propagates modification notification through an instance.
uint32_t getNodeId () const
 Returns the unique id for a node.
virtual SoChildListgetChildren () const
 Returns pointer to children, or NULL if none.
virtual void writeInstance (SoOutput *out)
 Writes instance to SoOutput. (Used for either stage of writing.)
virtual SoNodeaddToCopyDict () const
 Recursively adds this node and all nodes under it to the copy dictionary.
virtual void copyContents (const SoFieldContainer *fromFC, SbBool copyConnections)
 Copies the contents of the given node into this instance.
virtual SoFieldContainercopyThroughConnection () const
 Copies an instance that is encountered through a field connection.

Static Public Member Functions

static SoType getClassTypeId ()
 Returns type identifier for the SoNode class.
static SoNodegetByName (const SbName &name)
 Returns the last node given the specified name.
static int getByName (const SbName &name, SoNodeList &list)
 Returns the number of nodes with the given name, and adds to list pointers to those nodes.
static void initClass ()
 Initializes base node class.
static void initClasses ()
 Initialize ALL Inventor node classes.
static uint32_t getNextNodeId ()
 Returns the next available unique id.
static int getActionMethodIndex (SoType t)
 Returns the index of this node in the action/method table, given its type.

Protected Member Functions

 SoNode ()
 Constructor, destructor.
virtual ~SoNode ()

Static Protected Member Functions

static const SoFieldData ** getFieldDataPtr ()
 This is used by the field-inheritence mechanism, hidden in the SoSubNode macros.

Protected Attributes

uint32_t uniqueId
 Unique id for this node.

Static Protected Attributes

static uint32_t nextUniqueId
 Next available unique id.
static int nextActionMethodIndex
 Next index into the action method table.

Detailed Description

This is the abstract base class from which all scene graph node classes are derived.

Action Behavior
SoSearchAction
If the node pointer, type, or name matches the search criteria, returns a path to the node.
SoWriteAction
Writes the contents of the node to the current SoOutput.
See Also
SoPath, SoAction, SoNodeKit

Definition at line 103 of file SoNode.h.


Member Enumeration Documentation

Enumerator:
FIRST_INSTANCE 

First real instance being constructed.

PROTO_INSTANCE 

Prototype instance being constructed.

OTHER_INSTANCE 

Subsequent instance being constructed.

Definition at line 174 of file SoNode.h.


Constructor & Destructor Documentation

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

Member Function Documentation

virtual SoNode* SoNode::addToCopyDict ( ) const [virtual]

Returns the copy of this node.

Reimplemented in SoUnknownNode, and SoBaseKit.

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

The default method returns TRUE. Node classes (such as SoSeparator) that isolate their effects from the rest of the graph override this method to return FALSE.

Reimplemented in SoArray, SoMultipleCopy, SoSeparator, SoShape, SoSwitch, SoInteractionKit, SoNodeKitListPart, SoSceneKit, and SoSeparatorKit.

SoNode* SoNode::copy ( SbBool  copyConnections = FALSE) const

If the node is a group, it copies the children as well. If copyConnections is TRUE (it is FALSE by default), any connections to (but not from) fields of the node are copied, as well. Note that multiple references to a node under the node to be copied will result in multiple references to the copy of that node.

virtual void SoNode::copyContents ( const SoFieldContainer fromFC,
SbBool  copyConnections 
) [virtual]
virtual SoFieldContainer* SoNode::copyThroughConnection ( ) const [virtual]

Reimplemented from SoFieldContainer.

static int SoNode::getActionMethodIndex ( SoType  t) [inline, static]

Definition at line 206 of file SoNode.h.

References SoType::getData().

static SoNode* SoNode::getByName ( const SbName name) [static]

A node's name can be set using SoBase::setName(). Returns the number of nodes with the given name, and adds to list pointers to those nodes.

static int SoNode::getByName ( const SbName name,
SoNodeList list 
) [static]

A node's name can be set using SoBase::setName().

virtual SoChildList* SoNode::getChildren ( ) const [virtual]
static SoType SoNode::getClassTypeId ( ) [inline, static]

Reimplemented from SoFieldContainer.

Definition at line 114 of file SoNode.h.

static const SoFieldData** SoNode::getFieldDataPtr ( ) [inline, static, protected]

Definition at line 224 of file SoNode.h.

static uint32_t SoNode::getNextNodeId ( ) [inline, static]

Definition at line 196 of file SoNode.h.

uint32_t SoNode::getNodeId ( ) const [inline]

Definition at line 193 of file SoNode.h.

virtual void SoNode::GLRenderBelowPath ( SoGLRenderAction action) [virtual]

The SoNode methods just call GLRender.

Reimplemented in SoAnnotation, SoLocateHighlight, SoLOD, and SoSeparator.

virtual void SoNode::GLRenderInPath ( SoGLRenderAction action) [virtual]

Reimplemented in SoAnnotation, SoLocateHighlight, SoLOD, and SoSeparator.

virtual void SoNode::GLRenderOffPath ( SoGLRenderAction action) [virtual]

Reimplemented in SoLOD, and SoSeparator.

virtual void SoNode::grabEventsCleanup ( ) [virtual]

Reimplemented in SoDragger.

virtual void SoNode::grabEventsSetup ( ) [virtual]

The default methods do nothing.

Reimplemented in SoDragger.

static void SoNode::initClass ( ) [static]

Reimplemented from SoFieldContainer.

Reimplemented in SoUpgrader, SoV1CustomNode, SoAnnotation, SoArray, SoAsciiText, SoBaseColor, SoBlinker, SoCallback, SoCamera, SoClipPlane, SoColorIndex, SoComplexity, SoCone, SoCoordinate3, SoCoordinate4, SoCube, SoCylinder, SoDirectionalLight, SoDrawStyle, SoEnvironment, SoEventCallback, SoFaceSet, SoFile, SoFont, SoFontStyle, SoGroup, SoIndexedFaceSet, SoIndexedLineSet, SoIndexedNurbsCurve, SoIndexedNurbsSurface, SoIndexedShape, SoIndexedTriangleSet, SoIndexedTriangleStripSet, SoInfo, SoLabel, SoLevelOfDetail, SoLight, SoLightModel, SoLinearProfile, SoLineSet, SoLocateHighlight, SoLOD, SoMaterial, SoMaterialBinding, SoMatrixTransform, SoMultipleCopy, SoNonIndexedShape, SoNormal, SoNormalBinding, SoNurbsCurve, SoNurbsProfile, SoNurbsSurface, SoOrthographicCamera, SoPackedColor, SoPathSwitch, SoPendulum, SoPerspectiveCamera, SoPickStyle, SoPointLight, SoPointSet, SoProfile, SoProfileCoordinate2, SoProfileCoordinate3, SoQuadMesh, SoResetTransform, SoRotation, SoRotationXYZ, SoRotor, SoScale, SoSeparator, SoShape, SoShapeHints, SoShuttle, SoSphere, SoSpotLight, SoSwitch, SoText2, SoText3, SoTexture2, SoTexture2Transform, SoTextureCoordinate2, SoTextureCoordinateBinding, SoTextureCoordinateDefault, SoTextureCoordinateEnvironment, SoTextureCoordinateFunction, SoTextureCoordinatePlane, SoTransform, SoTransformation, SoTransformSeparator, SoTranslation, SoTriangleStripSet, SoUnits, SoVertexProperty, SoVertexShape, SoWWWAnchor, SoWWWInline, SoUnknownNode, SoCenterballDragger, SoDirectionalLightDragger, SoDragger, SoDragPointDragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger, SoTranslate2Dragger, SoCenterballManip, SoDirectionalLightManip, SoHandleBoxManip, SoJackManip, SoPointLightManip, SoSpotLightManip, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, SoTransformerManip, SoTransformManip, SoInteractionKit, SoAntiSquish, SoSelection, SoSurroundScale, SoPolygonOffset, SoAppearanceKit, SoBaseKit, SoCameraKit, SoLightKit, SoNodeKitListPart, SoSceneKit, SoSeparatorKit, SoShapeKit, and SoWrapperKit.

static void SoNode::initClasses ( ) [static]

Reimplemented in SoUpgrader, and SoDragger.

SbBool SoNode::isOverride ( ) const [inline]

Definition at line 111 of file SoNode.h.

virtual void SoNode::notify ( SoNotList list) [virtual]

Reimplemented from SoFieldContainer.

Reimplemented in SoBlinker, SoIndexedShape, SoSeparator, and SoVertexShape.

void SoNode::setOverride ( SbBool  state)
virtual void SoNode::startNotify ( ) [virtual]

Reimplemented from SoBase.

virtual void SoNode::write ( SoWriteAction action) [virtual]
virtual void SoNode::writeInstance ( SoOutput out) [virtual]

Reimplemented from SoFieldContainer.


Member Data Documentation

int SoNode::nextActionMethodIndex [static, protected]

Definition at line 237 of file SoNode.h.

uint32_t SoNode::nextUniqueId [static, protected]

Definition at line 234 of file SoNode.h.

Definition at line 231 of file SoNode.h.


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