SoShape(3)

πŸ“¦ version 2.5.0, in fedora 43, fedora 44

okay so bestie, sit down, hydrate, because we're about to talk about SoShape(3) πŸ’– β€” the library function manual page for the class that is, and I quote, the superclass for geometry shapes. She's the mom of the whole shape family. The blueprint. The main character that never actually shows up to the party herself (she's abstract, more on that later, and yes it is giving mysterious πŸ’…).


🌸 NAME 🌸

SoShape β€” The SoShape class is the superclass for geometry shapes.

Like. That's it. That's the whole job description. She's the parent class, the vibe-setter, the one all the actual shapes inherit their whole personality from.


✨ SYNOPSIS ✨

#include <Inventor/nodes/SoShape.h>

Inherits SoNode. 🫢

Inherited by SoAsciiText, SoCone, SoCube, SoCylinder, SoImage, SoIndexedNurbsCurve, SoIndexedNurbsSurface, SoNurbsCurve, SoNurbsSurface, SoSphere, SoText2, SoText3, SoVRMLGeometry, and SoVertexShape.

Look at that roster. Literally every shape you've ever loved is on that list. It's giving family reunion and SoShape is the grandma everybody visits. πŸ‘‘


πŸ”Ί Public Types πŸ”Ί

  • enum TriangleShape β€” { TRIANGLE_STRIP, TRIANGLE_FAN, TRIANGLES, POLYGON, QUADS, QUAD_STRIP, POINTS, LINES, LINE_STRIP }

This is the menu of ways you're allowed to glue your vertices together. Every shape has to pick one when it starts drawing. No cap. 🌈

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 }

A whole bitmask family tree of every file format / dialect a node might belong to. These are the values, character for character, don't go editing them: 0x0000, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000. πŸ’…


🌟 Public Member Functions 🌟

  • virtual SoType getTypeId (void) const β€” tells you the exact type of this thing.
  • virtual SbBool affectsState (void) const β€” does it mess with the traversal state? answer: yes or no.
  • virtual void notify (SoNotList *nl) β€” the notifying machine.
  • virtual void getBoundingBox (SoGetBoundingBoxAction *action) β€” go get the bounding box, bestie.
  • virtual void GLRender (SoGLRenderAction *action) β€” the actual render call. the moment we've all been waiting for.
  • virtual void rayPick (SoRayPickAction *action) β€” for when someone clicks on you.
  • virtual void callback (SoCallbackAction *action) β€” fires the callback action.
  • virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f &center)=0 β€” pure virtual β€” every single subclass MUST implement this or she does not compile. no exceptions, no excuses, periodt.
  • virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action) β€” how many lil primitives are you made of.
  • const SoBoundingBoxCache * getBoundingBoxCache (void) const β€” hand over the bounding box cache.

Public Member Functions inherited from SoNode

  • void setOverride (const SbBool state) β€” flip override mode on/off.
  • SbBool isOverride (void) const β€” are we overriding rn?
  • void setNodeType (const NodeType type) β€” assign the node its type.
  • NodeType getNodeType (void) const β€” read back that type.
  • virtual SoNode * copy (SbBool copyconnections=0) const β€” clone her.
  • virtual void doAction (SoAction *action) β€” run an action.
  • virtual void GLRenderBelowPath (SoGLRenderAction *action) β€” render below the path.
  • virtual void GLRenderInPath (SoGLRenderAction *action) β€” render in the path.
  • virtual void GLRenderOffPath (SoGLRenderAction *action) β€” render off the path.
  • virtual void getMatrix (SoGetMatrixAction *action) β€” gimme the matrix.
  • virtual void handleEvent (SoHandleEventAction *action) β€” handle the event.
  • virtual void pick (SoPickAction *action) β€” pick it.
  • virtual void search (SoSearchAction *action) β€” search it.
  • virtual void write (SoWriteAction *action) β€” write it out.
  • virtual void audioRender (SoAudioRenderAction *action) β€” yes, audio. 3D sound. iconic.
  • virtual void grabEventsSetup (void) β€” set up event grabbing.
  • virtual void grabEventsCleanup (void) β€” clean up event grabbing.
  • virtual void startNotify (void) β€” kick off the notify chain.
  • uint32_t getNodeId (void) const β€” get the node's id.
  • virtual SoChildList * getChildren (void) const β€” where the kids at.
  • virtual void writeInstance (SoOutput *out) β€” write this instance.
  • virtual SoNode * addToCopyDict (void) const β€” toss yourself in the copy dictionary.
  • virtual void copyContents (const SoFieldContainer *from, SbBool copyconnections) β€” copy the contents over.
  • virtual SoFieldContainer * copyThroughConnection (void) const β€” copy through a connection.

Public Member Functions inherited from SoFieldContainer

  • void setToDefaults (void) β€” reset everything to default. factory reset energy.
  • SbBool hasDefaultValues (void) const β€” are all the fields still default?
  • SbBool fieldsAreEqual (const SoFieldContainer *container) const β€” do our fields match?
  • void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0) β€” steal their field values (lovingly).
  • SbBool set (const char *const fielddata) β€” set from a field data string.
  • void get (SbString &fielddata) β€” read it back out as a string.
  • virtual int getFields (SoFieldList &l) const β€” fill a list with the fields.
  • virtual int getAllFields (SoFieldList &l) const β€” ALL of them.
  • virtual SoField * getField (const SbName &name) const β€” find a field by name.
  • virtual SoField * getEventIn (const SbName &name) const β€” find an event in by name.
  • virtual SoField * getEventOut (const SbName &name) const β€” find an event out by name.
  • SbBool getFieldName (const SoField *const field, SbName &name) const β€” reverse lookup, field β†’ name.
  • SbBool enableNotify (const SbBool flag) β€” turn notifications on/off.
  • SbBool isNotifyEnabled (void) const β€” are notifications on?
  • SbBool set (const char *fielddata, SoInput *in) β€” set from field data using an SoInput.
  • void get (SbString &fielddata, SoOutput *out) β€” get field data out via an SoOutput.
  • virtual SbBool validateNewFieldValue (SoField *field, void *newval) β€” is this new value even valid, bestie.
  • virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0) β€” add a write reference.
  • SbBool getIsBuiltIn (void) const β€” is this built in?
  • void setUserData (void *userdata) const β€” attach your own lil userdata blob.
  • void * getUserData (void) const β€” and get it back.

Public Member Functions inherited from SoBase

  • void ref (void) const β€” up the refcount.
  • void unref (void) const β€” down the refcount.
  • void unrefNoDelete (void) const β€” down the refcount but don't delete, careful bestie.
  • int32_t getRefCount (void) const β€” what's the count.
  • void touch (void) β€” touch it so everything downstream knows something changed.
  • SbBool isOfType (SoType type) const β€” are you this type?
  • virtual SbName getName (void) const β€” what's your name.
  • virtual void setName (const SbName &newname) β€” change your name.
  • void addAuditor (void *const auditor, const SoNotRec::Type type) β€” add an auditor watching you.
  • void removeAuditor (void *const auditor, const SoNotRec::Type type) β€” remove that auditor.
  • const SoAuditorList & getAuditors (void) const β€” who's watching.
  • SbBool shouldWrite (void) β€” should you be written out?
  • void assertAlive (void) const β€” assert that you are, in fact, alive. (not me needing this fr πŸ™ˆ)

πŸ¦‹ Static Public Member Functions πŸ¦‹

  • static SoType getClassTypeId (void) β€” the class's type id.
  • static void initClass (void) β€” initialize the class.
  • static void getScreenSize (SoState *const state, const SbBox3f &boundingbox, SbVec2s &rectsize) β€” given a state and a bounding box, hand back the screen rect size.
  • static float getDecimatedComplexity (SoState *state, float complexity) β€” the decimated complexity value.

Static Public Member Functions inherited from SoNode

  • static uint32_t getCompatibilityTypes (const SoType &nodetype) β€” compat types bitmask for a node type.
  • static SoType getClassTypeId (void) β€” class type id.
  • static SoNode * getByName (const SbName &name) β€” look up a node by name.
  • static int getByName (const SbName &name, SoNodeList &l) β€” look up all the nodes with that name into a list.
  • static void initClass (void) β€” init.
  • static void initClasses (void) β€” init all the classes. plural. yes ma'am.
  • static uint32_t getNextNodeId (void) β€” grab the next node id.
  • static int getActionMethodIndex (const SoType type) β€” the action method index for a type.
  • static void getBoundingBoxS (SoAction *action, SoNode *node) β€” static bounding box call.
  • static void GLRenderS (SoAction *action, SoNode *node) β€” static GL render call.
  • static void callbackS (SoAction *action, SoNode *node) β€” static callback call.
  • static void getMatrixS (SoAction *action, SoNode *node) β€” static matrix call.
  • static void handleEventS (SoAction *action, SoNode *node) β€” static event handler.
  • static void pickS (SoAction *action, SoNode *node) β€” static pick.
  • static void rayPickS (SoAction *action, SoNode *node) β€” static ray pick.
  • static void searchS (SoAction *action, SoNode *node) β€” static search.
  • static void writeS (SoAction *action, SoNode *node) β€” static write.
  • static void audioRenderS (SoAction *action, SoNode *node) β€” static audio render.
  • static void getPrimitiveCountS (SoAction *action, SoNode *node) β€” static primitive count.

Static Public Member Functions inherited from SoFieldContainer

  • static void initClass (void) β€” init.
  • static SoType getClassTypeId (void) β€” class type id.
  • static void initCopyDict (void) β€” set up the copy dictionary.
  • static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy) β€” register an original β†’ copy pair.
  • static SoFieldContainer * checkCopy (const SoFieldContainer *orig) β€” check the dict for a copy.
  • static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections) β€” find that copy, with or without connections.
  • static void copyDone (void) β€” we're done copying, wrap it up.

Static Public Member Functions inherited from SoBase

  • static void initClass (void) β€” init.
  • static SoType getClassTypeId (void) β€” class type id.
  • static void addName (SoBase *const base, const char *const name) β€” register a name.
  • static void removeName (SoBase *const base, const char *const name) β€” unregister a name.
  • static void incrementCurrentWriteCounter (void) β€” bump the write counter.
  • static void decrementCurrentWriteCounter (void) β€” drop the write counter.
  • static SoBase * getNamedBase (const SbName &name, SoType type) β€” get a named base of a given type.
  • static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type) β€” get all of them into a list.
  • static SbBool read (SoInput *in, SoBase *&base, SoType expectedtype) β€” read a base from input.
  • static void setInstancePrefix (const SbString &c) β€” set the instance prefix string.
  • static void setTraceRefs (SbBool trace) β€” turn ref tracing on/off.
  • static SbBool getTraceRefs (void) β€” is ref tracing on?
  • static SbBool connectRoute (SoInput *in, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname) β€” wire a route from one node's field to another's.
  • static SbBool readRoute (SoInput *in) β€” read a route in.

πŸŽ€ Protected Member Functions πŸŽ€

  • virtual const SoFieldData * getFieldData (void) const β€” the field data.
  • SoShape (void) β€” the constructor. protected, so you can't just go newing up an SoShape yourself, bestie. she's abstract. respect the mystery. ✨
  • virtual ~SoShape () β€” and the destructor.
  • float getComplexityValue (SoAction *action) β€” grab the complexity value for this action.
  • virtual void generatePrimitives (SoAction *action)=0 β€” pure virtual again β€” subclasses must implement it. this is the "actually make the geometry" homework.
  • virtual SbBool shouldGLRender (SoGLRenderAction *action) β€” should we render or not.
  • void beginSolidShape (SoGLRenderAction *action) β€” open a solid shape.
  • void endSolidShape (SoGLRenderAction *action) β€” close it.
  • void GLRenderBoundingBox (SoGLRenderAction *action) β€” render just the bounding box.
  • SbBool shouldPrimitiveCount (SoGetPrimitiveCountAction *action) β€” should we be counting primitives.
  • SbBool shouldRayPick (SoRayPickAction *const action) β€” should we ray pick.
  • void computeObjectSpaceRay (SoRayPickAction *const action) β€” compute the ray in object space.
  • void computeObjectSpaceRay (SoRayPickAction *const action, const SbMatrix &matrix) β€” same, but with a matrix.
  • virtual SoDetail * createTriangleDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3, SoPickedPoint *pp) β€” build the detail record for a picked triangle.
  • virtual SoDetail * createLineSegmentDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, SoPickedPoint *pp) β€” and for a picked line segment.
  • virtual SoDetail * createPointDetail (SoRayPickAction *action, const SoPrimitiveVertex *v, SoPickedPoint *pp) β€” and for a picked point.
  • void invokeTriangleCallbacks (SoAction *const action, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2, const SoPrimitiveVertex *const v3) β€” fire off the triangle callbacks.
  • void invokeLineSegmentCallbacks (SoAction *const action, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2) β€” fire off the line segment callbacks.
  • void invokePointCallbacks (SoAction *const action, const SoPrimitiveVertex *const v) β€” fire off the point callbacks.
  • void beginShape (SoAction *const action, const TriangleShape shapetype, SoDetail *const detail=NULL) β€” start a shape with a given TriangleShape and optional detail.
  • void shapeVertex (const SoPrimitiveVertex *const v) β€” feed it a vertex.
  • void endShape (void) β€” close the shape.
  • void generateVertex (SoPrimitiveVertex *const pv, const SbVec3f &point, const SbBool useTexFunc, const SoTextureCoordinateElement *const tce, const float s, const float t, const SbVec3f &normal) β€” build a vertex, with s, t texture coords.
  • void generateVertex (SoPrimitiveVertex *const pv, const SbVec3f &point, const SbBool useTexFunc, const SoTextureCoordinateElement *const tce, const float s, const float t, const float r, const SbVec3f &normal) β€” the 3-coordinate overload: s, t, and r. extra dimension, extra slay.
  • SbBool startVertexArray (SoGLRenderAction *action, const SoCoordinateElement *coords, const SbVec3f *pervertexnormals, const SbBool texpervertex, const SbBool colorpervertex) β€” start the vertex array with coords, per-vertex normals, and flags for per-vertex texture and color.
  • void finishVertexArray (SoGLRenderAction *action, const SbBool vbo, const SbBool normpervertex, const SbBool texpervertex, const SbBool colorpervertex) β€” finish it up, vbo and all.

Protected Member Functions inherited from SoNode

  • SoNode (void) β€” constructor.
  • virtual ~SoNode () β€” destructor.
  • virtual SbBool readInstance (SoInput *in, unsigned short flags) β€” read an instance from input.

Protected Member Functions inherited from SoFieldContainer

  • SoFieldContainer (void) β€” constructor.
  • ~SoFieldContainer () β€” destructor.

Protected Member Functions inherited from SoBase

  • SoBase (void) β€” constructor.
  • virtual ~SoBase () β€” destructor.
  • virtual void destroy (void) β€” the actual destroy step.
  • SbBool hasMultipleWriteRefs (void) const β€” multiple write refs? πŸ‘€
  • SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) const β€” write the header, with isgroup and isengine.
  • void writeFooter (SoOutput *out) const β€” write the footer.
  • virtual const char * getFileFormatName (void) const β€” what file format is this.

🌈 Static Protected Member Functions 🌈

  • static const SoFieldData ** getFieldDataPtr (void) β€” pointer to the field data pointer. yes it's a double pointer. she's fancy like that. πŸ’…

Static Protected Member Functions inherited from SoNode

  • static const SoFieldData ** getFieldDataPtr (void) β€” same deal.
  • static void setNextActionMethodIndex (int index) β€” set the next action method index.
  • static int getNextActionMethodIndex (void) β€” get it.
  • static void incNextActionMethodIndex (void) β€” increment it.
  • static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask) β€” set the compatibility bitmask for a node type.

and that's the whole synopsis bestie, every single signature accounted for 🫢 stay tuned because there's so much more coming β€” the description, the actual ✨lore✨, all of it. don't go anywhere πŸ’–

✨ Static Protected Member Functions inherited from SoBase ✨

Okay so these are the static protected member functions that SoShape inherited from SoBase. They're lowkey internal, but here's the lineup bestie:

  • static uint32_t getCurrentWriteCounter (void) β€” it's giving counter energy πŸ’…
  • static void staticDataLock (void) β€” locking the static data, no cap πŸ”’
  • static void staticDataUnlock (void) β€” and unlocking it, periodt πŸ”“

🫢 Friends 🫢

These are the friend classes. They get special access, iykyk:

  • class soshape_primdata
  • class so_generate_prim_private

🌸 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 the SoShape class is literally the superclass for geometry shapes. πŸ‘‘

The node types which have actual geometry to render inherits this class. For convenience, the SoShape class contains various common code used by the subclasses. It's giving main character energy, holding all the shared code so the subclasses can shine. πŸ’–


πŸ” Member Enumeration Documentation πŸ”

enum SoShape::TriangleShape

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. So like, not for you unless you're deep in the code. πŸ™ˆ


πŸŽ€ Constructor & Destructor Documentation πŸŽ€

SoShape::SoShape (void ) [protected]

Constructor. Just doing constructor things. ✨

References SoShape().

Referenced by computeBBox(), getFieldData(), and SoShape().

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

Destructor. It's the end, bestie. πŸ’€


πŸ’… Member Function Documentation πŸ’…

SoType SoShape::getTypeId (void ) const [virtual]

Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and "downward" casting.

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.

Reimplemented in:

  • SoAsciiText
  • SoCone
  • SoCube
  • SoCylinder
  • SoFaceSet
  • SoImage
  • SoIndexedFaceSet
  • SoIndexedLineSet
  • SoIndexedNurbsCurve
  • SoIndexedNurbsSurface
  • SoIndexedShape
  • SoIndexedTriangleStripSet
  • SoLineSet
  • SoMarkerSet
  • SoNonIndexedShape
  • SoNurbsCurve
  • SoNurbsSurface
  • SoPointSet
  • SoQuadMesh
  • SoSphere
  • SoText2
  • SoText3
  • SoTriangleStripSet
  • SoVertexShape
  • SoVRMLBox
  • SoVRMLCone
  • SoVRMLCylinder
  • SoVRMLElevationGrid
  • SoVRMLExtrusion
  • SoVRMLGeometry
  • SoVRMLIndexedFaceSet
  • SoVRMLIndexedLine
  • SoVRMLIndexedLineSet
  • SoVRMLIndexedShape
  • SoVRMLPointSet
  • SoVRMLSphere
  • SoVRMLText
  • SoVRMLVertexLine
  • SoVRMLVertexPoint
  • SoVRMLVertexShape

Referenced by SoCallbackAction::invokeLineSegmentCallbacks(), SoCallbackAction::invokePointCallbacks(), SoCallbackAction::invokeTriangleCallbacks(), and SoCallbackAction::shouldGeneratePrimitives().

That's a lot of names, but we got them all. πŸ’…

const SoFieldData * SoShape::getFieldData (void ) const [protected], [virtual]

Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.

Reimplemented from SoFieldContainer.

Reimplemented in:

  • SoAsciiText
  • SoCone
  • SoCube
  • SoCylinder
  • SoFaceSet
  • SoImage
  • SoIndexedFaceSet
  • SoIndexedLineSet
  • SoIndexedNurbsCurve
  • SoIndexedNurbsSurface
  • SoIndexedShape
  • SoIndexedTriangleStripSet
  • SoLineSet
  • SoMarkerSet
  • SoNonIndexedShape
  • SoNurbsCurve
  • SoNurbsSurface
  • SoPointSet
  • SoQuadMesh
  • SoSphere
  • SoText2
  • SoText3
  • SoTriangleStripSet
  • SoVertexShape
  • SoVRMLBox
  • SoVRMLCone
  • SoVRMLCylinder
  • SoVRMLElevationGrid
  • SoVRMLExtrusion
  • SoVRMLGeometry
  • SoVRMLIndexedFaceSet
  • SoVRMLIndexedLine
  • SoVRMLIndexedLineSet
  • SoVRMLIndexedShape
  • SoVRMLPointSet
  • SoVRMLSphere
  • SoVRMLText
  • SoVRMLVertexLine
  • SoVRMLVertexPoint
  • SoVRMLVertexShape

References SoShape().

SbBool SoShape::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.

Reimplemented from SoNode.

void SoShape::notify (SoNotList * l) [virtual]

Notifies all auditors for this instance when changes are made.

Reimplemented from SoNode.

Reimplemented in:

  • SoAsciiText
  • SoImage
  • SoText3
  • SoVertexShape
  • SoVRMLElevationGrid
  • SoVRMLExtrusion
  • SoVRMLGeometry
  • SoVRMLIndexedLine
  • SoVRMLIndexedShape
  • SoVRMLText
  • SoVRMLVertexLine
  • SoVRMLVertexPoint
  • SoVRMLVertexShape

References SoNode::notify().

Referenced by SoAsciiText::notify(), SoImage::notify(), SoText3::notify(), SoVertexShape::notify(), and SoVRMLGeometry::notify().

void SoShape::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.

Reimplemented in:

  • SoIndexedLineSet
  • SoIndexedNurbsCurve
  • SoLineSet
  • SoNurbsCurve
  • SoPointSet
  • SoVRMLIndexedLineSet
  • SoVRMLPointSet
  • SoVRMLVertexLine
  • SoVRMLVertexPoint
  • SoVRMLVertexShape

References SoGetBoundingBoxAction::extendBy(), SbBox3f::isEmpty(), and SoGetBoundingBoxAction::setCenter().

Referenced by SoIndexedNurbsCurve::getBoundingBox(), and SoNurbsCurve::getBoundingBox().

void SoShape::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.

Reimplemented in:

  • SoAsciiText
  • SoCone
  • SoCube
  • SoCylinder
  • SoFaceSet
  • SoImage
  • SoIndexedFaceSet
  • SoIndexedLineSet
  • SoIndexedNurbsCurve
  • SoIndexedNurbsSurface
  • SoIndexedTriangleStripSet
  • SoLineSet
  • SoMarkerSet
  • SoNurbsCurve
  • SoNurbsSurface
  • SoPointSet
  • SoQuadMesh
  • SoSphere
  • SoText2
  • SoText3
  • SoTriangleStripSet
  • SoVRMLBox
  • SoVRMLCone
  • SoVRMLCylinder
  • SoVRMLElevationGrid
  • SoVRMLExtrusion
  • SoVRMLIndexedFaceSet
  • SoVRMLIndexedLineSet
  • SoVRMLPointSet
  • SoVRMLSphere
  • SoVRMLText
  • SoVRMLVertexLine
  • SoVRMLVertexPoint
  • SoVRMLVertexShape

References SoVertexProperty::doAction(), generatePrimitives(), SoAction::getState(), SoBase::isOfType(), SoState::pop(), SoState::push(), and shouldGLRender().

void SoShape::rayPick (SoRayPickAction * action) [virtual]

Calculates picked point based on primitives generated by subclasses.

Reimplemented from SoNode.

Reimplemented in:

  • SoCone
  • SoCube
  • SoCylinder
  • SoImage
  • SoIndexedNurbsCurve
  • SoIndexedNurbsSurface
  • SoNurbsCurve
  • SoNurbsSurface
  • SoSphere
  • SoText2
  • SoVRMLBox
  • SoVRMLCone
  • SoVRMLCylinder
  • SoVRMLElevationGrid
  • SoVRMLSphere

References computeObjectSpaceRay(), generatePrimitives(), SoAction::getState(), and shouldRayPick().

Referenced by SoIndexedNurbsCurve::rayPick(), SoIndexedNurbsSurface::rayPick(), SoNurbsCurve::rayPick(), and SoNurbsSurface::rayPick().

void SoShape::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.

Reimplemented from SoNode.

Reimplemented in:

  • SoVRMLVertexLine
  • SoVRMLVertexPoint
  • SoVRMLVertexShape

References generatePrimitives(), and SoCallbackAction::shouldGeneratePrimitives().

virtual void SoShape::computeBBox (SoAction * action, SbBox3f & box, SbVec3f & center) [pure virtual]

Implemented by SoShape subclasses to let the SoShape superclass know the exact size and weighted center point of the shape's bounding box.

The bounding box and center point should be calculated and returned in the local coordinate system.

The method implements action behavior for shape nodes for SoGetBoundingBoxAction. It is invoked from SoShape::getBoundingBox(). (Subclasses should not override SoNode::getBoundingBox().)

The box parameter sent in is guaranteed to be an empty box, while center is undefined upon function entry.

Implemented in:

  • SoAsciiText
  • SoCone
  • SoCube
  • SoCylinder
  • SoFaceSet
  • SoImage
  • SoIndexedNurbsCurve
  • SoIndexedNurbsSurface
  • SoIndexedShape
  • SoLineSet
  • SoNurbsCurve
  • SoNurbsSurface
  • SoPointSet
  • SoQuadMesh
  • SoSphere
  • SoText2
  • SoText3
  • SoTriangleStripSet
  • SoVRMLBox
  • SoVRMLCone
  • SoVRMLCylinder
  • SoVRMLElevationGrid
  • SoVRMLExtrusion
  • SoVRMLIndexedLine
  • SoVRMLIndexedShape
  • SoVRMLSphere
  • SoVRMLText
  • SoVRMLVertexPoint

References getBoundingBoxCache(), getComplexityValue(), getDecimatedComplexity(), getScreenSize(), and SoShape().

void SoShape::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.

Reimplemented in:

  • SoAsciiText
  • SoCone
  • SoCube
  • SoCylinder
  • SoFaceSet
  • SoImage
  • SoIndexedFaceSet
  • SoIndexedLineSet
  • SoIndexedNurbsCurve
  • SoIndexedNurbsSurface
  • SoIndexedTriangleStripSet
  • SoLineSet
  • SoMarkerSet
  • SoNurbsCurve
  • SoNurbsSurface
  • SoPointSet
  • SoQuadMesh
  • SoSphere
  • SoText2
  • SoText3
  • SoTriangleStripSet
  • SoVRMLBox
  • SoVRMLCone
  • SoVRMLCylinder
  • SoVRMLElevationGrid
  • SoVRMLExtrusion
  • SoVRMLIndexedFaceSet
  • SoVRMLIndexedLineSet
  • SoVRMLSphere
  • SoVRMLText
  • SoVRMLVertexPoint

References generatePrimitives(), and shouldPrimitiveCount().

  • SoIndexedNurbsCurve::getPrimitiveCount()
  • SoIndexedNurbsSurface::getPrimitiveCount()
  • SoNurbsCurve::getPrimitiveCount()
  • SoNurbsSurface::getPrimitiveCount()
  • SoText3::getPrimitiveCount()

🌸 void SoShape::getScreenSize (SoState *const state, const SbBox3f & boundingbox, SbVec2s & rectsize) [static]

okay so this is a lil convenience function bestie πŸ’– it hands you back the size of a boundingbox projected onto the screen. That's it, that's the whole job. It's useful for SCREEN_SPACE complexity geometry, so if you're doing the screen-space thing, this is your girl.

References: SbBox2f::extendBy(), SbBox3f::getBounds(), SbBox2f::getSize(), SbBox2f::makeEmpty(), SbMatrix::multVecMatrix(), and SbVec3f::setValue().

Referenced by: computeBBox(), SoLevelOfDetail::doAction(), and getComplexityValue().


πŸŽ€ float SoShape::getDecimatedComplexity (SoState * state, float complexity) [static]

Not implemented in Coin. πŸ™ˆ Should probably have been private in TGS Inventor API, ngl. That's the whole tea.

Referenced by: computeBBox().


πŸ¦‹ const SoBoundingBoxCache * SoShape::getBoundingBoxCache (void ) const

Returns the bounding box cache for this shape, bestie. Heads up though: it might return NULL if no bounding box cache has been created yet. And if it's not NULL, the caller must check that the cache is valid before using it β€” you can do that with SoCache::isValid().

This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. πŸ’…

Since: Coin 2.0

Referenced by: computeBBox().


✨ float SoShape::getComplexityValue (SoAction * action) [protected]

Returns the complexity value that subclasses should use. It considers complexity type. For OBJECT_SPACE complexity this will be a number between 0 and 1. For SCREEN_SPACE complexity it is a number from 0 and up. πŸ“ˆ

References: getScreenSize(), and SoAction::getState().

Referenced by: computeBBox(), SoCone::generatePrimitives(), SoCylinder::generatePrimitives(), SoSphere::generatePrimitives(), SoVRMLCone::generatePrimitives(), SoVRMLCylinder::generatePrimitives(), SoVRMLSphere::generatePrimitives(), SoCone::getPrimitiveCount(), SoCylinder::getPrimitiveCount(), SoSphere::getPrimitiveCount(), SoVRMLCone::getPrimitiveCount(), SoVRMLCylinder::getPrimitiveCount(), SoVRMLSphere::getPrimitiveCount(), SoCone::GLRender(), SoCylinder::GLRender(), SoSphere::GLRender(), SoVRMLCone::GLRender(), SoVRMLCylinder::GLRender(), and SoVRMLSphere::GLRender().


πŸ”₯ virtual void SoShape::generatePrimitives (SoAction * action) [protected], [pure virtual]

This method implements action behavior for shape nodes for SoCallbackAction. It gets invoked from SoShape::callback().

⚠️ Subclasses should not override SoNode::callback().

The subclass implementations use the convenience methods SoShape::beginShape(), SoShape::shapeVertex(), and SoShape::endShape(), with SoDetail instances, to pass the primitives making up the shape back to the caller. 🫢

Implemented in: SoAsciiText, SoCone, SoCube, SoCylinder, SoFaceSet, SoImage, SoIndexedFaceSet, SoIndexedNurbsCurve, SoIndexedNurbsSurface, SoIndexedTriangleStripSet, SoLineSet, SoNurbsCurve, SoNurbsSurface, SoPointSet, SoQuadMesh, SoSphere, SoText2, SoText3, SoTriangleStripSet, SoVRMLBox, SoVRMLCone, SoVRMLCylinder, SoVRMLElevationGrid, SoVRMLExtrusion, SoVRMLIndexedFaceSet, SoVRMLIndexedLineSet, SoVRMLPointSet, SoVRMLSphere, and SoVRMLText.

References: beginShape(), beginSolidShape(), computeObjectSpaceRay(), createLineSegmentDetail(), createPointDetail(), createTriangleDetail(), endShape(), endSolidShape(), finishVertexArray(), generateVertex(), GLRenderBoundingBox(), invokeLineSegmentCallbacks(), invokePointCallbacks(), invokeTriangleCallbacks(), shapeVertex(), shouldGLRender(), shouldPrimitiveCount(), shouldRayPick(), and startVertexArray().

Referenced by: callback(), getPrimitiveCount(), GLRender(), rayPick(), and shouldGLRender().


πŸ’… SbBool SoShape::shouldGLRender (SoGLRenderAction * action) [protected], [virtual]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. iykyk 🫣

Reimplemented in: SoVertexShape, SoVRMLGeometry, SoVRMLVertexLine, SoVRMLVertexPoint, and SoVRMLVertexShape.

References: generatePrimitives(), SoGLRenderAction::getCacheContext(), SoAction::getCurPath(), SoPath::getHead(), SbPList::getLength(), SoAction::getState(), GLRenderBoundingBox(), SoGLRenderAction::handleTransparency(), SbMatrix::inverse(), SoFieldContainer::isBuiltIn, SoState::isCacheOpen(), SbMatrix::multLeft(), SoState::pop(), SoState::push(), and SoBase::touch().

Referenced by: generatePrimitives(), SoAsciiText::GLRender(), SoCone::GLRender(), SoCube::GLRender(), SoCylinder::GLRender(), SoImage::GLRender(), SoIndexedNurbsCurve::GLRender(), SoIndexedNurbsSurface::GLRender(), SoNurbsCurve::GLRender(), SoNurbsSurface::GLRender(), GLRender(), SoSphere::GLRender(), SoText2::GLRender(), SoText3::GLRender(), SoVertexShape::shouldGLRender(), SoVRMLGeometry::shouldGLRender(), and SoVRMLVertexShape::shouldGLRender().


🌈 void SoShape::beginSolidShape (SoGLRenderAction * action) [protected]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

References: SoAction::getState(), and SoState::push().

Referenced by: generatePrimitives().


⭐ void SoShape::endSolidShape (SoGLRenderAction * action) [protected]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

References: SoAction::getState(), and SoState::pop().

Referenced by: generatePrimitives().


πŸŽ€ void SoShape::GLRenderBoundingBox (SoGLRenderAction * action) [protected]

Renders a bounding box. That's literally it, bestie. πŸ“¦

References: SbBox3f::getMax(), SbBox3f::getMin(), and SoAction::getState().

Referenced by: generatePrimitives(), and shouldGLRender().


🧚 SbBool SoShape::shouldPrimitiveCount (SoGetPrimitiveCountAction * action) [protected]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Referenced by: generatePrimitives(), SoCone::getPrimitiveCount(), SoCube::getPrimitiveCount(), SoCylinder::getPrimitiveCount(), SoFaceSet::getPrimitiveCount(), SoImage::getPrimitiveCount(), SoIndexedFaceSet::getPrimitiveCount(), SoIndexedLineSet::getPrimitiveCount(), SoIndexedTriangleStripSet::getPrimitiveCount(), SoLineSet::getPrimitiveCount(), SoMarkerSet::getPrimitiveCount(), SoPointSet::getPrimitiveCount(), SoQuadMesh::getPrimitiveCount(), getPrimitiveCount(), SoSphere::getPrimitiveCount(), SoText2::getPrimitiveCount(), SoTriangleStripSet::getPrimitiveCount(), SoVRMLBox::getPrimitiveCount(), SoVRMLCone::getPrimitiveCount(), SoVRMLCylinder::getPrimitiveCount(), SoVRMLElevationGrid::getPrimitiveCount(), SoVRMLIndexedFaceSet::getPrimitiveCount(), SoVRMLIndexedLineSet::getPrimitiveCount(), SoVRMLSphere::getPrimitiveCount(), and SoVRMLVertexPoint::getPrimitiveCount().


πŸ’œ SbBool SoShape::shouldRayPick (SoRayPickAction *const action) [protected]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

References: SoAction::getState().

Referenced by: generatePrimitives(), SoCone::rayPick(), SoCube::rayPick(), SoCylinder::rayPick(), SoImage::rayPick(), SoIndexedNurbsCurve::rayPick(), SoIndexedNurbsSurface::rayPick(), SoNurbsCurve::rayPick(), SoNurbsSurface::rayPick(), rayPick(), SoSphere::rayPick(), SoText2::rayPick(), SoVRMLBox::rayPick(), SoVRMLCone::rayPick(), SoVRMLCylinder::rayPick(), and SoVRMLSphere::rayPick().


πŸ“ void SoShape::computeObjectSpaceRay (SoRayPickAction *const action) [protected]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

References: SoRayPickAction::setObjectSpace().

Referenced by: generatePrimitives(), SoImage::rayPick(), and rayPick().


πŸ“ void SoShape::computeObjectSpaceRay (SoRayPickAction *const action, const SbMatrix & matrix) [protected]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

References: SoRayPickAction::setObjectSpace().


πŸ‘‘ SoDetail * SoShape::createTriangleDetail (SoRayPickAction * action, const SoPrimitiveVertex * v1, const SoPrimitiveVertex * v2, const SoPrimitiveVertex * v3, SoPickedPoint * pp) [protected], [virtual]

Will create triangle detail for a SoPickedPoint. This method will only be called internally, when generatePrimitives() is used for picking (i.e. when SoShape::rayPick() is not overridden).

This method returns NULL in Open Inventor, and subclasses will need to override this method to create details for a SoPickedPoint.

This is not necessary with Coin. Of course, if you choose to override it, it will work in the same way as Open Inventor. πŸ’–

For this to work, you must supply a face or line detail when generating primitives. If you supply NULL for the detail argument in SoShape::beginShape(), you'll have to override this method.

Reimplemented in: SoAsciiText, SoIndexedNurbsSurface, SoNurbsSurface, SoText3, and SoVRMLExtrusion.

References: SoDebugError::postInfo().

Referenced by: generatePrimitives(), and invokeTriangleCallbacks().


🌸 SoDetail * SoShape::createLineSegmentDetail (SoRayPickAction * action, const SoPrimitiveVertex * v1, const SoPrimitiveVertex * v2, SoPickedPoint * pp) [protected], [virtual]

Will create line detail for a SoPickedPoint. This method will only be called internally, when generatePrimitives() is used for picking (i.e. when SoShape::rayPick() is not overridden).

This method returns NULL in Open Inventor, and subclasses will need to override this method to create details for a SoPickedPoint.

This is not necessary with Coin. Of course, if you choose to override it, it will work in the same way as Open Inventor.

For this to work, you must supply a face or line detail when generating primitives. If you supply NULL for the detail argument in SoShape::beginShape(), you'll have to override this method.

Reimplemented in: SoIndexedNurbsCurve, and SoNurbsCurve.

References: SoDebugError::postInfo().

Referenced by: generatePrimitives(), and invokeLineSegmentCallbacks().


🌈 SoDetail * SoShape::createPointDetail (SoRayPickAction * action, const SoPrimitiveVertex * v, SoPickedPoint * pp) [protected], [virtual]

Will create point detail for a SoPickedPoint. This method will only be called internally, when generatePrimitives() is used for picking (i.e. when SoShape::rayPick() is not overridden).

This method returns NULL in Open Inventor, and subclasses will need to override this method to create details for a SoPickedPoint.

This is not necessary with Coin. Of course, if you choose to override it, it will work in the same way as Open Inventor. 🫢

For this to work, you must supply a point detail in the SoPrimitiveVertex in generatePrimitives().

References: SoDetail::copy(), and SoPrimitiveVertex::getDetail().

Referenced by generatePrimitives(), and invokePointCallbacks().

void SoShape::invokeTriangleCallbacks [protected]

void SoShape::invokeTriangleCallbacks (SoAction *const action, const
    SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2, const
    SoPrimitiveVertex *const v3)

Okay so bestie, this one is internal library tea β˜• β€” it's not likely to be of interest to the application programmer. Periodt.

References: SoRayPickAction::addIntersection(), createTriangleDetail(), SoPrimitiveVertex::getMaterialIndex(), SoPrimitiveVertex::getNormal(), SoPrimitiveVertex::getPoint(), SoAction::getState(), SoPrimitiveVertex::getTextureCoords(), SoAction::getTypeId(), SbVec3f::getValue(), SbVec4f::getValue(), SoGetPrimitiveCountAction::incNumTriangles(), SoRayPickAction::intersect(), SoCallbackAction::invokeTriangleCallbacks(), SoRayPickAction::isBetweenPlanes(), SoType::isDerivedFrom(), SbVec3f::normalize(), SoPickedPoint::setDetail(), SoPickedPoint::setMaterialIndex(), SoPickedPoint::setObjectNormal(), and SoPickedPoint::setObjectTextureCoords().

Referenced by: generatePrimitives().


void SoShape::invokeLineSegmentCallbacks [protected]

void SoShape::invokeLineSegmentCallbacks (SoAction *const action, const
    SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2)

Same vibe check: this API member is internal to the library, so it's not likely to be of interest to the application programmer. No cap. ✨

References: SoRayPickAction::addIntersection(), createLineSegmentDetail(), SoPrimitiveVertex::getMaterialIndex(), SoPrimitiveVertex::getNormal(), SoPrimitiveVertex::getPoint(), SoPrimitiveVertex::getTextureCoords(), SoAction::getTypeId(), SbVec3f::getValue(), SbVec4f::getValue(), SoGetPrimitiveCountAction::incNumLines(), SoRayPickAction::intersect(), SoCallbackAction::invokeLineSegmentCallbacks(), SoRayPickAction::isBetweenPlanes(), SoType::isDerivedFrom(), SbVec3f::normalize(), SoPickedPoint::setDetail(), SoPickedPoint::setMaterialIndex(), SoPickedPoint::setObjectNormal(), and SoPickedPoint::setObjectTextureCoords().

Referenced by: generatePrimitives().


void SoShape::invokePointCallbacks [protected]

void SoShape::invokePointCallbacks (SoAction *const action, const
    SoPrimitiveVertex *const v)

Yep, another internal-only one β€” not likely to be of interest to the application programmer. πŸ’…

References: SoRayPickAction::addIntersection(), createPointDetail(), SoPrimitiveVertex::getMaterialIndex(), SoPrimitiveVertex::getNormal(), SoPrimitiveVertex::getPoint(), SoPrimitiveVertex::getTextureCoords(), SoAction::getTypeId(), SbVec3f::getValue(), SbVec4f::getValue(), SoGetPrimitiveCountAction::incNumPoints(), SoRayPickAction::intersect(), SoCallbackAction::invokePointCallbacks(), SoRayPickAction::isBetweenPlanes(), SoType::isDerivedFrom(), SoPickedPoint::setDetail(), SoPickedPoint::setMaterialIndex(), SoPickedPoint::setObjectNormal(), and SoPickedPoint::setObjectTextureCoords().

Referenced by: generatePrimitives().


void SoShape::beginShape [protected]

void SoShape::beginShape (SoAction *const action, const TriangleShape
    shapetype, SoDetail *const detail = NULL)

Okay bestie, this is where the main character energy kicks in ✨. This method is used to generate primitives for a shape. It's typically called from a node's generatePrimitives() method. And if you have your own shape and want to write a generatePrimitives() method for that shape, it's probably a good idea to take a peek in the generatePrimitives() method for a similar shape in Coin. πŸ‘‘

generatePrimitives() can contain several beginShape()/endShape() sequences. shapeVertex() is used for each vertex between beginShape() and endShape(). For instance, to generate primitives for a triangle you'd do something like this:

SoPrimitiveVertex vertex;

this->beginShape(action, SoShape::POLYGON);
vertex.setPoint(SbVec3f(0.0f, 0.0f, 0.0f));
this->shapeVertex(&vertex);
vertex.setPoint(SbVec3f(1.0f, 0.0f, 0.0f));
this->shapeVertex(&vertex);
vertex.setPoint(SbVec3f(1.0f, 1.0f, 0.0f));
this->shapeVertex(&vertex);
this->endShape();

Note that the SoPrimitiveVertex instance can simply be placed on the stack and not allocated. SoShape will copy the needed information when you call shapeVertex(). 🫢

Before calling shapeVertex(), you can set extra information for the SoPrimitiveVertex, including normal, material index, and texture coordinates. 🌸

This method is slightly different from its counterpart from the original Open Inventor library, as this method has an SoDetail as the last argument, and not an SoFaceDetail. This is because we accept more TriangleShape types, and the detail might be a SoFaceDetail or a SoLineDetail. There is no use sending in a SoPointDetail, as nothing will be done with it. πŸ’€

Referenced by: SoAsciiText::generatePrimitives(), SoFaceSet::generatePrimitives(), SoImage::generatePrimitives(), SoIndexedFaceSet::generatePrimitives(), SoIndexedTriangleStripSet::generatePrimitives(), SoLineSet::generatePrimitives(), SoPointSet::generatePrimitives(), SoQuadMesh::generatePrimitives(), generatePrimitives(), SoTriangleStripSet::generatePrimitives(), SoVRMLElevationGrid::generatePrimitives(), SoVRMLExtrusion::generatePrimitives(), SoVRMLIndexedFaceSet::generatePrimitives(), SoVRMLIndexedLineSet::generatePrimitives(), SoVRMLPointSet::generatePrimitives(), and SoVRMLText::generatePrimitives().


void SoShape::shapeVertex [protected]

void SoShape::shapeVertex (const SoPrimitiveVertex *const v)

This method is used while generating primitives for a shape. See beginShape() for more details. πŸ¦‹

See also: beginShape(), endShape()

Referenced by: SoAsciiText::generatePrimitives(), SoFaceSet::generatePrimitives(), SoImage::generatePrimitives(), SoIndexedFaceSet::generatePrimitives(), SoIndexedTriangleStripSet::generatePrimitives(), SoLineSet::generatePrimitives(), SoPointSet::generatePrimitives(), SoQuadMesh::generatePrimitives(), generatePrimitives(), SoTriangleStripSet::generatePrimitives(), SoVRMLElevationGrid::generatePrimitives(), SoVRMLExtrusion::generatePrimitives(), SoVRMLIndexedFaceSet::generatePrimitives(), SoVRMLIndexedLineSet::generatePrimitives(), SoVRMLPointSet::generatePrimitives(), SoVRMLText::generatePrimitives(), and generateVertex().


void SoShape::endShape [protected]

void SoShape::endShape (void )

This method is used while generating primitives for a shape. See beginShape() for more details. πŸ’–

See also: beginShape(), shapeVertex()

Referenced by: SoAsciiText::generatePrimitives(), SoFaceSet::generatePrimitives(), SoImage::generatePrimitives(), SoIndexedFaceSet::generatePrimitives(), SoIndexedTriangleStripSet::generatePrimitives(), SoLineSet::generatePrimitives(), SoPointSet::generatePrimitives(), SoQuadMesh::generatePrimitives(), generatePrimitives(), SoTriangleStripSet::generatePrimitives(), SoVRMLElevationGrid::generatePrimitives(), SoVRMLExtrusion::generatePrimitives(), SoVRMLIndexedFaceSet::generatePrimitives(), SoVRMLIndexedLineSet::generatePrimitives(), SoVRMLPointSet::generatePrimitives(), and SoVRMLText::generatePrimitives().


void SoShape::generateVertex [protected] (2D version)

void SoShape::generateVertex (SoPrimitiveVertex *const pv, const SbVec3f &
    point, const SbBool usetexfunc, const SoTextureCoordinateElement *const
    tce, const float s, const float t, const SbVec3f & normal)

Convenience function which sets up an SoPrimitiveVertex, and sends it using the SoShape::shapeVertex() function. 2D version ✨

References: generateVertex().

Referenced by: generatePrimitives(), and generateVertex().


void SoShape::generateVertex [protected] (3D version)

void SoShape::generateVertex (SoPrimitiveVertex *const pv, const SbVec3f &
    point, const SbBool usetexfunc, const SoTextureCoordinateElement *const
    tce, const float s, const float t, const float r, const SbVec3f &
    normal)

Convenience function which sets up an SoPrimitiveVertex, and sends it using the SoShape::shapeVertex() function. 3D version. 🌈

This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. iykyk ✨

Since: Coin 2.0

References: SoPrimitiveVertex::setNormal(), SoPrimitiveVertex::setPoint(), SoPrimitiveVertex::setTextureCoords(), SbVec4f::setValue(), and shapeVertex().


SbBool SoShape::startVertexArray [protected]

SbBool SoShape::startVertexArray (SoGLRenderAction * action, const
    SoCoordinateElement * coords, const SbVec3f * pervertexnormals, const
    SbBool texpervertex, const SbBool colorpervertex)

Convenience method that enables vertex arrays and/or VBOs. Returns TRUE if VBO is used. πŸ”₯

See also: finishVertexArray()

Since: Coin 2.5

References: SoGLRenderAction::getCacheContext(), and SoAction::getState().

Referenced by: generatePrimitives(), SoIndexedFaceSet::GLRender(), SoIndexedLineSet::GLRender(), SoPointSet::GLRender(), SoVRMLIndexedFaceSet::GLRender(), SoVRMLIndexedLineSet::GLRender(), and SoVRMLPointSet::GLRender().


void SoShape::finishVertexArray [protected]

void SoShape::finishVertexArray (SoGLRenderAction * action, const SbBool
    vbo, const SbBool normpervertex, const SbBool texpervertex, const SbBool
    colorpervertex)

Should be called after rendering with vertex arrays. This method will disable arrays and VBOs enabled in the startVertexArray() function. πŸ’…

See also: startVertexArray()

Since: Coin 2.5

References: SoAction::getState().

Referenced by: generatePrimitives(), SoIndexedFaceSet::GLRender(), SoIndexedLineSet::GLRender(), SoPointSet::GLRender(), SoVRMLIndexedFaceSet::GLRender(), SoVRMLIndexedLineSet::GLRender(), and SoVRMLPointSet::GLRender().


Author

Generated automatically by Doxygen for Coin from the source code. πŸ€–πŸ’–

And that's the whole page, bestie! This iconic manual page is from Coin, Version 2.5.0, for SoShape(3). Slay. πŸ’…βœ¨
πŸ“¦ where this page comes from