SoVRMLShape(3)
π SoVRMLShape(3) β Library Functions Manual π
okay so bestie, welcome to SoVRMLShape(3), the little icon of a class that holds geometry and geometry appearance nodes. that's the whole vibe. she's a node, she holds stuff, she makes it look good. β¨
πΈ NAME πΈ
SoVRMLShape β the class that holds geometry and geometry appearance nodes. that's it, that's her whole job description, and she ate. π
π SYNOPSIS π
#include <Inventor/VRMLnodes/SoVRMLShape.h>
she inherits SoNode. classic lineage, main character energy from the jump. π
β Public Types β
enum CacheEnabled { OFF, ON, AUTO }
π¦ 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 π
the girlies she brings to the party herself:
virtual SoType getTypeId (void) const
virtual SbBool affectsState (void) const
virtual void doAction (SoAction *action)
virtual void callback (SoCallbackAction *action)
virtual void GLRender (SoGLRenderAction *action)
virtual void getBoundingBox (SoGetBoundingBoxAction *action)
virtual void rayPick (SoRayPickAction *action)
virtual void search (SoSearchAction *action)
virtual void write (SoWriteAction *action)
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)
virtual SoChildList * getChildren (void) const
virtual void notify (SoNotList *list)
virtual void copyContents (const SoFieldContainer *from, SbBool
copyConn)
π Public Member Functions inherited from SoNode π
void setOverride (const SbBool state)
SbBool isOverride (void) const
void setNodeType (const NodeType type)
NodeType getNodeType (void) const
virtual SoNode * copy (SbBool copyconnections=0) const
virtual void GLRenderBelowPath (SoGLRenderAction *action)
virtual void GLRenderInPath (SoGLRenderAction *action)
virtual void GLRenderOffPath (SoGLRenderAction *action)
virtual void getMatrix (SoGetMatrixAction *action)
virtual void handleEvent (SoHandleEventAction *action)
virtual void pick (SoPickAction *action)
virtual void audioRender (SoAudioRenderAction *action)
virtual void grabEventsSetup (void)
virtual void grabEventsCleanup (void)
virtual void startNotify (void)
uint32_t getNodeId (void) const
virtual void writeInstance (SoOutput *out)
virtual SoNode * addToCopyDict (void) const
virtual SoFieldContainer * copyThroughConnection (void) const
π«Ά Public Member Functions inherited from SoFieldContainer π«Ά
void setToDefaults (void)
SbBool hasDefaultValues (void) const
SbBool fieldsAreEqual (const SoFieldContainer *container) const
void copyFieldValues (const SoFieldContainer *container, SbBool
copyconnections=0)
SbBool set (const char *const fielddata)
void get (SbString &fielddata)
virtual int getFields (SoFieldList &l) const
virtual int getAllFields (SoFieldList &l) const
virtual SoField * getField (const SbName &name) const
virtual SoField * getEventIn (const SbName &name) const
virtual SoField * getEventOut (const SbName &name) const
SbBool getFieldName (const SoField *const field, SbName &name) const
SbBool enableNotify (const SbBool flag)
SbBool isNotifyEnabled (void) const
SbBool 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) const
void setUserData (void *userdata) const
void * getUserData (void) const
π Public Member Functions inherited from SoBase π
void ref (void) const
void unref (void) const
void unrefNoDelete (void) const
int32_t getRefCount (void) const
void touch (void)
SbBool isOfType (SoType type) const
virtual SbName getName (void) const
virtual 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) const
SbBool shouldWrite (void)
void assertAlive (void) const
β¨ Static Public Member Functions β¨
static SoType getClassTypeId (void)
static void initClass (void)
static void setNumRenderCaches (int num)
static int getNumRenderCaches (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 π
the actual fields she's serving, bestie β this is the moment:
SoSFNode appearance
SoSFNode geometry
SoSFEnum renderCaching
SoSFEnum boundingBoxCaching
π§ Protected Member Functions π§
virtual const SoFieldData * getFieldData (void) const
πΈ Protected Member Functions inherited from SoNode πΈ
SoNode (void)
virtual ~SoNode ()
virtual SbBool readInstance (SoInput *in, unsigned short flags)
πΈ 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) const
SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine)
const
void writeFooter (SoOutput *out) const
virtual const char * getFileFormatName (void) const
π Static Protected Member Functions π
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 SoNode π
uint32_t uniqueId
π Protected Attributes inherited from SoFieldContainer π
SbBool isBuiltIn
π Static Protected Attributes inherited from SoNode π
static uint32_t nextUniqueId = 0
static int nextActionMethodIndex = 0
π« Detailed Description π«
okay so SoVRMLShape is the class that holds geometry and geometry appearance nodes. that's the tagline. love that for her. π
now listen, the detailed class documentation here is taken verbatim from the VRML97 standard (ISO/IEC 14772-1:1997). it is copyright The Web3D Consortium, and is used by permission of the Consortium. so credit where credit is due, bestie β we did not write this part, the Consortium did, and we're quoting it exactly:
Shape {
exposedField SFNode appearance NULL
exposedField SFNode geometry NULL
}
so the Shape node has two fields β appearance and geometry β and they're the ones used to create rendered objects in the world. π
the appearance field holds an SoVRMLAppearance node, and that's what specifies the visual attributes (like, y'know, material and texture) that get applied to the geometry. the geometry field holds a geometry node. whatever geometry node you put in there gets rendered with whatever appearance node you specified, applied on top. β¨
if you want more info, go read section 4.6.3, Shapes and geometry (http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/concepts.html#4.6.3), and also go read SoVRMLAppearance. those two are the receipts.
section 4.14, Lighting model (http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/concepts.html#4.14) has all the details of the VRML lighting model and how Appearance nodes and geometry nodes interact with each other. π
π¨ and this one matters: if thegeometryfield isNULL, the object is not drawn. not a bug, not a glitch, that's just the rules. so if your thing is invisible, checkgeometryfirst, bestie. π
π₯ Member Enumeration Documentation π₯
π¦ enum SoVRMLShape::CacheEnabled π¦
used to enumerate cache strategies. yes, the name is doing a lot of work, but she's honest about it. π
Enumerator
OFFβ never cache. like, ever. she said no. πONβ always cache. no thoughts, just caching. πAUTOβ use heuristics to try to figure out the optimal caching policy. the smart one. the main character. π
π« MEMBER FUNCTION DOCUMENTATION π«
SoType SoVRMLShape::getTypeId (void ) const [virtual]
okay so bestie, this one hands you back the type identification of any object derived from a class that inherits SoBase. it's literally the whole reason run-time type checking and "downward" casting are a thing β¨ iykyk
Usage example:
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
}
}
For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. This is 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 information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups. π«Ά
Implements SoBase.
const SoFieldData * SoVRMLShape::getFieldData (void ) const [protected], [virtual]
gives you a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL. that's it, that's the vibe πΈ
Reimplemented from SoFieldContainer.
SbBool SoVRMLShape::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, as it pushes and pops the state before and after traversal of its children. All SoShape nodes will also return FALSE, as just pushing out geometry data to the rendering engine won't affect the actual rendering state.
The default method returns TRUE, on a "better safe than sorry" philosophy. no cap, it's just being careful π
Reimplemented from SoNode.
void SoVRMLShape::doAction (SoAction * action) [virtual]
This function performs the typical operation of a node for any action.
Reimplemented from SoNode.
References: appearance, getChildren(), SoAction::getPathCode(), SoAction::getState(), SoState::isElementEnabled(), SoState::pop(), SoState::push(), SoChildList::traverse(), and SoChildList::traverseInPath().
Referenced by: callback(), getPrimitiveCount(), rayPick(), and search().
void SoVRMLShape::callback (SoCallbackAction * action) [virtual]
Action method for SoCallbackAction.
Simply updates the state according to how the node behaves for the render action, so the application programmer can use the SoCallbackAction for extracting information about the scene graph. it's giving "let me peek at the scene graph real quick" π
Reimplemented from SoNode.
References: doAction().
void SoVRMLShape::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 wants to throw geometry primitives at OpenGL overrides this method. π¨
Reimplemented from SoNode.
References: SoGLRenderAction::abortNow(), SoNode::affectsState(), appearance, SbPList::getArrayPtr(), getChildren(), SoAction::getCurPathCode(), SbPList::getLength(), SoAction::getPathCode(), SoAction::getState(), SoNode::GLRender(), SoAction::hasTerminated(), SoState::pop(), SoAction::popCurPath(), SoAction::popPushCurPath(), SoState::push(), SoAction::pushCurPath(), and SoNode::SoNode().
void SoVRMLShape::getBoundingBox (SoGetBoundingBoxAction * action) [virtual]
Action method for the SoGetBoundingBoxAction.
Calculates bounding box and center coordinates for 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 calculates their bounding box also overrides this method to change the relevant state variables.
Reimplemented from SoNode.
References: getChildren(), SoAction::getPathCode(), SoAction::getState(), SoState::pop(), SoState::push(), SoChildList::traverse(), and SoChildList::traverseInPath().
void SoVRMLShape::rayPick (SoRayPickAction * action) [virtual]
Action method for SoRayPickAction.
Checks the ray specification of the action and tests for intersection with the data of the node. π―
Nodes influencing relevant state variables for how picking is done also overrides this method.
Reimplemented from SoNode.
References: doAction().
void SoVRMLShape::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. π
See also
SoSearchAction
Reimplemented from SoNode.
References: doAction(), SoSearchAction::isFound(), and SoNode::search().
void SoVRMLShape::write (SoWriteAction * action) [virtual]
Action method for SoWriteAction.
Writes out a node object, and any connected nodes, engines etc, if necessary. βοΈ
Reimplemented from SoNode.
References: boundingBoxCaching, renderCaching, and SoNode::write().
void SoVRMLShape::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 calculates their primitive count also overrides this method to change the relevant state variables.
Reimplemented from SoNode.
References: doAction().
SoChildList * SoVRMLShape::getChildren (void ) const [virtual]
Returns list of children for this node. π§
Reimplemented from SoNode.
References: SoVRMLParent::updateChildList().
Referenced by: doAction(), getBoundingBox(), and GLRender().
void SoVRMLShape::notify (SoNotList * l) [virtual]
Notifies all auditors for this instance when changes are made. π£
Reimplemented from SoNode.
References: SoNotList::getLastField(), SoField::getTypeId(), and SoNode::notify().
void SoVRMLShape::copyContents (const SoFieldContainer * from, SbBool copyconnections) [virtual]
Makes a deep copy of all data of from into this instance, except external scenegraph references if copyconnections is FALSE.
This is the protected method that should be overridden by extension node / engine / dragger / whatever subclasses which needs to account for internal data that are not handled automatically.
For copying nodes from application code, you should not invoke this function directly, but rather call the SoNode::copy() function:
SoNode * mynewnode = templatenode->copy();
The same also goes for engines.
Make sure that when you override the copyContents() method in your extension class that you also make it call upwards to it's parent superclass in the inheritance hierarchy, as copyContents() in for instance SoNode and SoFieldContainer does important work. It should go something like this:
void
MyCoinExtensionNode::copyContents(const SoFieldContainer * from,
SbBool copyconnections)
{
// let parent superclasses do their thing (copy fields, copy
// instance name, etc etc)
SoNode::copyContents(from, copyconnections);
// [..then copy internal data..]
}
Reimplemented from SoNode.
References: SoNode::copyContents(), and SoFieldContainer::SoFieldContainer().
π MEMBER DATA DOCUMENTATION π
SoSFNode SoVRMLShape::appearance
Can store an SoVRMLAppearance node, or NULL.
Referenced by: doAction(), and GLRender().
SoSFNode SoVRMLShape::geometry
Can store any SoVRMLGeometry subclass, or NULL. π
SoSFEnum SoVRMLShape::renderCaching
Render caching strategy. Default value is AUTO.
Referenced by: write().
SoSFEnum SoVRMLShape::boundingBoxCaching
Bounding box caching strategy. Default value is AUTO.
Referenced by: write().
π AUTHOR π
Generated automatically by Doxygen for Coin from the source code.
okay bestie that's the whole page, you ate that π this was Coin, Version 2.5.0, page SoVRMLShape(3) β go forth and slay your scene graph, periodt π
π
π¦ 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