Open Inventor Reference
SoArray Class Reference

Group node that creates a regular IxJxK array of copies of its children. More...

#include <Inventor/nodes/SoArray.h>

Inheritance diagram for SoArray:
SoGroup SoNode SoFieldContainer SoBase

List of all members.

Public Types

enum  Origin { FIRST, CENTER, LAST }
 Array origin: More...

Public Member Functions

 SoArray ()
 Creates an array node with default settings.
virtual SbBool affectsState () const
 Overrides default method on SoNode to return FALSE since arrays are effectively separators.
virtual void doAction (SoAction *action)
 Implement actions.
virtual void callback (SoCallbackAction *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 pick (SoPickAction *action)
virtual void getBoundingBox (SoGetBoundingBoxAction *action)
virtual void handleEvent (SoHandleEventAction *action)
virtual void getMatrix (SoGetMatrixAction *action)
virtual void search (SoSearchAction *action)

Static Public Member Functions

static void initClass ()
 Initializes base node class.

Public Attributes

SoSFVec3f separation1
 Separation vector in 1st direction.
SoSFVec3f separation2
 Separation vector in 2nd direction.
SoSFVec3f separation3
 Separation vector in 3rd direction.
SoSFEnum origin
 Base point.
Fields
SoSFShort numElements1
 Number of elements in 1st direction.
SoSFShort numElements2
 Number of elements in 2nd direction.
SoSFShort numElements3
 Number of elements in 3rd direction.

Protected Member Functions

virtual ~SoArray ()

Detailed Description

This group node traverses its children, in order, several times, creating a regular 3D array of copies of them. The number of copies in each of the three directions is specified by fields, as are the vectors used to separate the copies in each of the three dimensions.

For example, an SoArray node can be used to create a 2x3x4 array of copies of its children, where the separation vectors between adjacent copies in the three array dimensions are (1,2,3), (-4,-5,-6), and (7,8,9), respectively. The base point of the array can be set to one of several values, as described in the origin field.

Copies are traversed so that the first dimension cycles most quickly, followed by the second, and then the third. This order is important because SoArray sets the current switch value to N before traversing the children for the Nth time (for use with inherited switch values - see SoSwitch).

File Format/Default
Action Behavior
SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction
Traverses all children for each array element, saving and restoring state before and after each traversal.
SoSearchAction
Traverses all children once, setting the inherited switch value to SO_SWITCH_ALL first.
See Also
SoMultipleCopy, SoSwitch

Definition at line 116 of file SoArray.h.


Member Enumeration Documentation

Enumerator:
FIRST 

Origin at first element.

CENTER 

Origin at center of elements.

LAST 

Origin at last element.

Definition at line 138 of file SoArray.h.


Constructor & Destructor Documentation

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

Member Function Documentation

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

Reimplemented from SoNode.

virtual void SoArray::callback ( SoCallbackAction action) [virtual]

Reimplemented from SoGroup.

virtual void SoArray::doAction ( SoAction action) [virtual]

Reimplemented from SoGroup.

virtual void SoArray::getBoundingBox ( SoGetBoundingBoxAction action) [virtual]

Reimplemented from SoGroup.

virtual void SoArray::getMatrix ( SoGetMatrixAction action) [virtual]

Reimplemented from SoGroup.

virtual void SoArray::GLRender ( SoGLRenderAction action) [virtual]

Reimplemented from SoGroup.

virtual void SoArray::handleEvent ( SoHandleEventAction action) [virtual]

Reimplemented from SoGroup.

static void SoArray::initClass ( ) [static]

Reimplemented from SoGroup.

virtual void SoArray::pick ( SoPickAction action) [virtual]

Reimplemented from SoGroup.

virtual void SoArray::search ( SoSearchAction action) [virtual]

Reimplemented from SoGroup.


Member Data Documentation

Definition at line 125 of file SoArray.h.

Definition at line 127 of file SoArray.h.

Definition at line 129 of file SoArray.h.

Definition at line 144 of file SoArray.h.

Definition at line 133 of file SoArray.h.

Definition at line 134 of file SoArray.h.

Definition at line 135 of file SoArray.h.


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