SoArray(3)
π SoArray π
okay so this is the SoArray(3) manual page, straight out of the Library Functions Manual. Bestie, it's a group node and it's lowkey iconic β let's get into it π
π NAME π
SoArray β The SoArray class is a group node for setting up regular arrays of subgraphs.
β¨ SYNOPSIS β¨
#include <Inventor/nodes/SoArray.h>
Inherits SoGroup.
πΈ Public Types πΈ
enum Origin { FIRST, CENTER, LAST }
π¦ Public Types inherited from SoNode π¦
enum NodeType { INVENTOR = 0x0000, VRML1 = 0x0001, VRML2 = 0x0002, INVENTOR_1 = 0x0004, INVENTOR_2_0 = 0x0008, INVENTOR_2_1 = 0x0010, INVENTOR_2_5 = 0x0020, INVENTOR_2_6 = 0x0040, COIN_1_0 = 0x0080, COIN_2_0 = 0x0100, EXTENSION = 0x0200, COIN_2_2 = 0x0400, COIN_2_3 = 0x0800, COIN_2_4 = 0x1000, INVENTOR_5_0 = 0x2000, COIN_2_5 = 0x4000 }
π Public Member Functions π
virtual SoType getTypeId (void) constSoArray (void)virtual SbBool affectsState (void) constvirtual void doAction (SoAction *action)virtual void callback (SoCallbackAction *action)virtual void GLRender (SoGLRenderAction *action)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)virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)virtual void audioRender (SoAudioRenderAction *action)
π«Ά Public Member Functions inherited from SoGroup π«Ά
SoGroup (void)SoGroup (int nchildren)virtual void addChild (SoNode *node)virtual void insertChild (SoNode *child, int newchildindex)virtual SoNode * getChild (int index) constvirtual int findChild (const SoNode *node) constvirtual int getNumChildren (void) constvirtual void removeChild (int childindex)virtual void removeChild (SoNode *child)virtual void removeAllChildren (void)virtual void replaceChild (int index, SoNode *newchild)virtual void replaceChild (SoNode *oldchild, SoNode *newchild)virtual void write (SoWriteAction *action)virtual SoChildList * getChildren (void) const
π Public Member Functions inherited from SoNode π
void setOverride (const SbBool state)SbBool isOverride (void) constvoid setNodeType (const NodeType type)NodeType getNodeType (void) constvirtual SoNode * copy (SbBool copyconnections=0) constvirtual void GLRenderBelowPath (SoGLRenderAction *action)virtual void GLRenderInPath (SoGLRenderAction *action)virtual void GLRenderOffPath (SoGLRenderAction *action)virtual void rayPick (SoRayPickAction *action)virtual void grabEventsSetup (void)virtual void grabEventsCleanup (void)virtual void startNotify (void)virtual void notify (SoNotList *l)uint32_t getNodeId (void) constvirtual void writeInstance (SoOutput *out)virtual SoNode * addToCopyDict (void) constvirtual SoFieldContainer * copyThroughConnection (void) const
π Public Member Functions inherited from SoFieldContainer π
void setToDefaults (void)SbBool hasDefaultValues (void) constSbBool fieldsAreEqual (const SoFieldContainer *container) constvoid copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0)SbBool set (const char *const fielddata)void get (SbString &fielddata)virtual int getFields (SoFieldList &l) constvirtual int getAllFields (SoFieldList &l) constvirtual SoField * getField (const SbName &name) constvirtual SoField * getEventIn (const SbName &name) constvirtual SoField * getEventOut (const SbName &name) constSbBool getFieldName (const SoField *const field, SbName &name) constSbBool enableNotify (const SbBool flag)SbBool isNotifyEnabled (void) constSbBool set (const char *fielddata, SoInput *in)void get (SbString &fielddata, SoOutput *out)virtual SbBool validateNewFieldValue (SoField *field, void *newval)virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0)SbBool getIsBuiltIn (void) constvoid setUserData (void *userdata) constvoid * getUserData (void) const
π Public Member Functions inherited from SoBase π
void ref (void) constvoid unref (void) constvoid unrefNoDelete (void) constint32_t getRefCount (void) constvoid touch (void)SbBool isOfType (SoType type) constvirtual SbName getName (void) constvirtual void setName (const SbName &newname)void addAuditor (void *const auditor, const SoNotRec::Type type)void removeAuditor (void *const auditor, const SoNotRec::Type type)const SoAuditorList & getAuditors (void) constSbBool shouldWrite (void)void assertAlive (void) const
β Static Public Member Functions β
static SoType getClassTypeId (void)static void initClass (void)
π Static Public Member Functions inherited from SoGroup π
static SoType getClassTypeId (void)static void initClass (void)
π Static Public Member Functions inherited from SoNode π
static uint32_t getCompatibilityTypes (const SoType &nodetype)static SoType getClassTypeId (void)static SoNode * getByName (const SbName &name)static int getByName (const SbName &name, SoNodeList &l)static void initClass (void)static void initClasses (void)static uint32_t getNextNodeId (void)static int getActionMethodIndex (const SoType type)static void getBoundingBoxS (SoAction *action, SoNode *node)static void GLRenderS (SoAction *action, SoNode *node)static void callbackS (SoAction *action, SoNode *node)static void getMatrixS (SoAction *action, SoNode *node)static void handleEventS (SoAction *action, SoNode *node)static void pickS (SoAction *action, SoNode *node)static void rayPickS (SoAction *action, SoNode *node)static void searchS (SoAction *action, SoNode *node)static void writeS (SoAction *action, SoNode *node)static void audioRenderS (SoAction *action, SoNode *node)static void getPrimitiveCountS (SoAction *action, SoNode *node)
π§ Static Public Member Functions inherited from SoFieldContainer π§
static void initClass (void)static SoType getClassTypeId (void)static void initCopyDict (void)static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy)static SoFieldContainer * checkCopy (const SoFieldContainer *orig)static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections)static void copyDone (void)
π« Static Public Member Functions inherited from SoBase π«
static void initClass (void)static SoType getClassTypeId (void)static void addName (SoBase *const base, const char *const name)static void removeName (SoBase *const base, const char *const name)static void incrementCurrentWriteCounter (void)static void decrementCurrentWriteCounter (void)static SoBase * getNamedBase (const SbName &name, SoType type)static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type)static SbBool read (SoInput *in, SoBase *&base, SoType expectedtype)static void setInstancePrefix (const SbString &c)static void setTraceRefs (SbBool trace)static SbBool getTraceRefs (void)static SbBool connectRoute (SoInput *in, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)static SbBool readRoute (SoInput *in)
π Public Attributes π
SoSFEnum originSoSFShort numElements1SoSFShort numElements2SoSFShort numElements3SoSFVec3f separation1SoSFVec3f separation2SoSFVec3f separation3
π Protected Member Functions π
virtual const SoFieldData * getFieldData (void) constvirtual ~SoArray ()
π‘οΈ Protected Member Functions inherited from SoGroup π‘οΈ
virtual ~SoGroup ()virtual SbBool readInstance (SoInput *in, unsigned short flags)virtual SbBool readChildren (SoInput *in)virtual void copyContents (const SoFieldContainer *from, SbBool copyconnections)
π‘οΈ Protected Member Functions inherited from SoNode π‘οΈ
SoNode (void)virtual ~SoNode ()
π‘οΈ Protected Member Functions inherited from SoFieldContainer π‘οΈ
SoFieldContainer (void)~SoFieldContainer ()
π‘οΈ Protected Member Functions inherited from SoBase π‘οΈ
SoBase (void)virtual ~SoBase ()virtual void destroy (void)SbBool hasMultipleWriteRefs (void) constSbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) constvoid writeFooter (SoOutput *out) constvirtual const char * getFileFormatName (void) const
π Static Protected Member Functions π
static const SoFieldData ** getFieldDataPtr (void)
π Static Protected Member Functions inherited from SoGroup π
static const SoFieldData ** getFieldDataPtr (void)
π Static Protected Member Functions inherited from SoNode π
static const SoFieldData ** getFieldDataPtr (void)static void setNextActionMethodIndex (int index)static int getNextActionMethodIndex (void)static void incNextActionMethodIndex (void)static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask)
π Static Protected Member Functions inherited from SoBase π
static uint32_t getCurrentWriteCounter (void)static void staticDataLock (void)static void staticDataUnlock (void)
𧬠Additional Inherited Members π§¬
Protected Types inherited from SoBase:
enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }
Protected Attributes inherited from SoGroup:
SoChildList * children
Protected Attributes inherited from SoNode:
uint32_t uniqueId
Protected Attributes inherited from SoFieldContainer:
SbBool isBuiltIn
Static Protected Attributes inherited from SoNode:
static uint32_t nextUniqueId = 0static int nextActionMethodIndex = 0
π Detailed Description π
The SoArray class is a group node for setting up regular arrays of subgraphs. periodt.
SoArray presents a convenient way of duplicating a node (typically a shape node) or a complete subgraph in 1 to 3 dimensions. β¨
The child node or subgraph can only be translated by regular offsets for all dimensions.
For more flexible functionality for duplication of geometry, see the SoMultipleCopy group node, which can do general transformations (including rotation and scaling) for its child. π
FILE FORMAT/DEFAULTS:
Array {
origin FIRST
numElements1 1
numElements2 1
numElements3 1
separation1 1 0 0
separation2 0 1 0
separation3 0 0 1
}
π See also π
SoMultipleCopy
π§© Member Enumeration Documentation π§©
enum SoArray::Origin
The possible settings for the SoArray::origin field. π
ποΈ Constructor & Destructor Documentation ποΈ
SoArray::SoArray (void )
Constructor. π
References numElements1, numElements2, numElements3, origin, separation1, separation2, separation3, and SoArray().
Referenced by getFieldData(), and SoArray().
SoArray::~SoArray () [protected], [virtual]
Destructor. π«Ά
to be continued, bestie β there's more of this page coming π
π Member Function Documentation π
Okay bestie, this is the part where we go function by function, and I'm gonna hold your hand through every single one. No skipping, no skimming, we're doing all of them. π«Ά
SoType SoArray::getTypeId(void) const β [virtual] π
Returns the type identification of an object derived from a class inheriting SoBase. This is what does your run-time type checking and your "downward" casting, iykyk.
Usage example, and yes this is verbatim, don't @ me:
void foo(SoNode * node)
{
if (node->getTypeId() == SoFile::getClassTypeId()) {
SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type
}
else if (node->getTypeId().isOfType(SoGroup::getClassTypeId())) {
SoGroup * group = (SoGroup *)node; // safe downward cast, knows the type
}
}
So for all you application programmers who wanna extend the library with new nodes, engines, nodekits, draggers or whatever else β this method needs to be overridden in all subclasses. It's typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through, for instance, Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on. β¨
For more info on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups.
Reimplemented from SoGroup.
const SoFieldData * SoArray::getFieldData(void) const β [protected], [virtual] π
Returns a pointer to the class-wide field data storage object for this instance. If there are no fields present, it returns NULL. That's it, that's the whole vibe.
Reimplemented from SoGroup.
References SoArray().
SbBool SoArray::affectsState(void) const β [virtual] π¦
Returns TRUE if the node could have any effect on the state during traversal.
If it returns FALSE, no data in the traversal-state will change from the pre-traversal state to the post-traversal state. The SoSeparator node will for instance return FALSE, since it pushes and pops the state before and after traversal of its children. All SoShape nodes will also return FALSE, because just pushing out geometry data to the rendering engine won't affect the actual rendering state. Facts are facts. π
The default method returns TRUE, on a "better safe than sorry" philosophy. Iconic honestly.
Reimplemented from SoNode.
void SoArray::doAction(SoAction * action) β [virtual] π₯
This function performs the typical operation of a node for any action. It's the main character of this whole file, fr fr.
Reimplemented from SoGroup.
References SoGroup::doAction(), SoAction::getState(), numElements1, numElements2, numElements3, origin, SoState::pop(), SoState::push(), separation1, separation2, and separation3.
Referenced by audioRender(), callback(), getPrimitiveCount(), GLRender(), and pick().
void SoArray::callback(SoCallbackAction * action) β [virtual] π
Action method for SoCallbackAction.
It simply updates the state according to how the node behaves for the render action, so you, the application programmer, can use the SoCallbackAction for extracting information about the scene graph. Very demure, very mindful. πΈ
Reimplemented from SoGroup.
References doAction().
void SoArray::GLRender(SoGLRenderAction * action) β [virtual] π
Action method for the SoGLRenderAction.
This is called during rendering traversals. Nodes influencing the rendering state in any way, or who wanna throw geometry primitives at OpenGL, override this method. Go off, geometry. π
Reimplemented from SoGroup.
References doAction().
void SoArray::pick(SoPickAction * action) β [virtual] π―
Action method for SoPickAction.
Does the common processing for SoPickAction action instances.
Reimplemented from SoGroup.
References doAction().
void SoArray::getBoundingBox(SoGetBoundingBoxAction * action) β [virtual] π¦
Action method for the SoGetBoundingBoxAction.
Calculates bounding box and center coordinates for the node and modifies the values of the action to encompass the bounding box for this node, and to shift the center point for the scene more towards the one for this node.
Nodes influencing how geometry nodes calculate their bounding box also override this method to change the relevant state variables.
Reimplemented from SoGroup.
References SbXfBox3f::extendBy(), SoGroup::getBoundingBox(), SoGetBoundingBoxAction::getCenter(), SoAction::getState(), SoGetBoundingBoxAction::getXfBoundingBox(), SbMatrix::identity(), SoGetBoundingBoxAction::isCenterSet(), SbBox3f::isEmpty(), SbBox3f::makeEmpty(), numElements1, numElements2, numElements3, origin, SoState::pop(), SoDebugError::postInfo(), SoState::push(), SoGetBoundingBoxAction::resetCenter(), separation1, separation2, separation3, SoGetBoundingBoxAction::setCenter(), SbXfBox3f::setTransform(), SbMatrix::setTranslate(), and SbXfBox3f::transform(). That's the whole list, bestie, I counted. π
void SoArray::handleEvent(SoHandleEventAction * action) β [virtual] π
Action method for SoHandleEventAction.
Inspects the event data from action, and processes it if it's something which this node should react to.
Nodes influencing relevant state variables for how event handling is done also override this method.
Reimplemented from SoGroup.
References SoGroup::handleEvent(), and SoNode::handleEvent().
void SoArray::getMatrix(SoGetMatrixAction * action) β [virtual] π§
Action method for SoGetMatrixAction.
Updates action by accumulating with the transformation matrix of this node (if any). If there's no matrix, well, nothing to accumulate, move along. β¨
Reimplemented from SoGroup.
References SoGroup::getMatrix().
void SoArray::search(SoSearchAction * action) β [virtual] π
Action method for SoSearchAction.
Compares the search criteria from the action to see if this node is a match. Searching is done by matching up all criteria set up in the SoSearchAction β if any of the requested criteria is a miss, the search is not deemed successful for the node. So like, one wrong criterion and it's over for you. π
See also: SoSearchAction
Reimplemented from SoGroup.
References SoAction::getState(), SoState::pop(), SoState::push(), and SoGroup::search().
void SoArray::getPrimitiveCount(SoGetPrimitiveCountAction * action) β [virtual] π’
Action method for the SoGetPrimitiveCountAction.
Calculates the number of triangle, line segment and point primitives for the node and adds these to the counters of the action.
Nodes influencing how geometry nodes calculate their primitive count also override this method to change the relevant state variables.
Reimplemented from SoGroup.
References doAction().
void SoArray::audioRender(SoAudioRenderAction * action) β [virtual] π
Action method for SoAudioRenderAction.
Does the common processing for SoAudioRenderAction action instances.
Reimplemented from SoGroup.
References doAction().
π Member Data Documentation π
These are the actual data members, the little fields that make the whole array situation happen. Defaults included, don't skip 'em.
SoSFEnum SoArray::origin
Where the origin of the array should be set, ie how the array elements will be distributed from the local origo.
Default value is SoArray::FIRST. π
Referenced by doAction(), getBoundingBox(), and SoArray().
SoSFShort SoArray::numElements1
Number of duplicates for each X axis row. Default 1.
Referenced by doAction(), getBoundingBox(), and SoArray().
SoSFShort SoArray::numElements2
Number of duplicates for each Y axis row. Default 1.
Referenced by doAction(), getBoundingBox(), and SoArray().
SoSFShort SoArray::numElements3
Number of duplicates for each Z axis row. Default 1.
Referenced by doAction(), getBoundingBox(), and SoArray().
SoSFVec3f SoArray::separation1
Distance in current units between the center point of each element along the X axis. Default [1.0, 0.0, 0.0].
Referenced by doAction(), getBoundingBox(), and SoArray().
SoSFVec3f SoArray::separation2
Distance in current units between the center point of each element along the Y axis. Default [0.0, 1.0, 0.0].
Referenced by doAction(), getBoundingBox(), and SoArray().
SoSFVec3f SoArray::separation3
Distance in current units between the center point of each element along the Z axis. Default [0.0, 0.0, 1.0].
Referenced by doAction(), getBoundingBox(), and SoArray().
π Author π
Generated automatically by Doxygen for Coin from the source code. Not a human, not a vibe, just a doc generator doing its thing. π«Ά
And that's a wrap, bestie! This was Coin Version 2.5.0, page SoArray(3), and you made it all the way to the end like the absolute legend you are. Slay, periodt, go build something cute with it. πβ¨ππ¦
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms