SOVERTEXSHAPE(3iv)

πŸ’– SoVertexShape πŸ’–

okay bestie, welcome to the manual page for SoVertexShape(3IV) β€” yes that's the manual name, we're being fancy today πŸ’… she's the blueprint, the blueprint-est blueprint, and she doesn't even render anything herself. iconic behavior honestly.


🌸 NAME 🌸

SoVertexShape β€” the abstract base class for all vertex-based shape nodes. she's the mom of the whole geometry fam, no cap 🫢


🧬 INHERITS FROM 🧬

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape

look at that bloodline. generational excellence fr fr πŸ‘‘


✨ SYNOPSIS ✨

#include <Inventor/nodes/SoVertexShape.h>

   Fields from class SoVertexShape:

SoSFNode            vertexProperty

   Methods from class SoVertexShape:

static SoType       getClassTypeId()

   Methods from class SoNode:

void                setOverride(SbBool state)
SbBool              isOverride() const
SoNode *            copy(SbBool copyConnections = FALSE) const
virtual SbBool      affectsState() const
static SoNode *     getByName(const SbName &name)
static int          getByName(const SbName &name, SoNodeList &list)

   Methods from class SoFieldContainer:

void                setToDefaults()
SbBool              hasDefaultValues() const
SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
void                copyFieldValues(const SoFieldContainer *fc, SbBool
                         copyConnections = FALSE)
SbBool              set(const char *fieldDataString)
void                get(SbString &fieldDataString)
virtual int         getFields(SoFieldList &resultList) const
virtual SoField *   getField(const SbName &fieldName) const
SbBool              getFieldName(const SoField *field, SbName &fieldName)
                         const
SbBool              isNotifyEnabled() const
SbBool              enableNotify(SbBool flag)

   Methods from class SoBase:

void                ref()
void                unref() const
void                unrefNoDelete() const
void                touch()
virtual SoType      getTypeId() const
SbBool              isOfType(SoType type) const
virtual void        setName(const SbName &name)
virtual SbName      getName() const

like, she inherited SO much. she's carrying the whole family tree on her back and she's doing it in stilettos πŸ’€πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so. this node is the abstract base class for all vertex-based shape (geometry) nodes. she's the repository for convenience functions that her subclasses get to use, and she also hands out a type identifier so you can easily figure out whether a shape is vertex-based or not. very "let me check your vibe real quick" of her 🧚

She's got exactly one public field, and it's the SoVertexProperty field. one field, zero drama, main character energy.

Every subclass of this node draws objects built out of vertices. Here's the tea on how that works:

  • If the vertexProperty field is non-null and there are coordinates in the associated vertex property node, then those coordinates get used. periodt.
  • Otherwise, the objects are drawn using the current coordinates in the state.
  • Either way, the coordinates of the shape get transformed by the current transformation matrix, and drawn with the current light model and drawing style.
⚠️ real talk bestie: subclasses that construct polygons from vertices may not render or pick correctly if any of their polygons are self-intersecting or non-planar. non-planar polygons are giving chaos and the renderer will simply not deal with it 😭

🌈 default texture coordinates (yes she computes them herself) 🌈

All vertex shape subclasses use the bounding box of the shape to determine default texture coordinates. here's the math, and it's actually cute:

  • The longest dimension of the bounding box defines the S coordinates.
  • The next longest defines the T coordinates.
  • The value of the S coordinate ranges from 0 to 1, from one end of the bounding box to the other.
  • The T coordinate ranges between 0 and the ratio of the second greatest dimension of the bounding box to the greatest dimension.

okay ratio queen, we see you πŸ’…


🎯 picking (with SoRayPickAction) 🎯

When a vertex-based shape is picked with an SoRayPickAction, a detail is always returned. like, always always. no empty-handed pick energy here ✨

Which detail you get depends on what the shape is made of:

  • If the shape is composed of faces (such as SoFaceSet or SoTriangleStripSet), an SoFaceDetail is returned.
  • If the shape is composed of line segments (such as SoLineSet), an SoLineDetail is returned.
  • If the shape is composed of points (such as SoPointSet), an SoPointDetail is returned.
πŸ™ˆ heads up: the type of detail returned is not affected by the current drawing style. don't even try it.

πŸ“ž callbacks (with SoCallbackAction) πŸ“ž

Similarly, each class of vertex-based shape invokes appropriate callbacks β€” but only if those callbacks are registered with the SoCallbackAction. she's not gonna call you if you didn't give her your number, bestie.

  • Shapes made of faces invoke triangle callbacks for each generated triangle. (and yes, faces may be triangulated to create these triangles β€” that's the whole trick 🧠)
  • Shapes made of line segments invoke line segment callbacks for each segment.
  • Shapes made of points invoke point callbacks.

🌳 the two subclass branches 🌳

  • The subclass SoIndexedShape is a base class for vertex-based shapes that index into the current set of coordinates.
  • The subclass SoNonIndexedShape is a base class for vertex-based shapes that use the current coordinates in order.

two sisters, two strategies, both slaying πŸ’œ


πŸŽ€ FIELDS πŸŽ€

  • SoSFNode vertexProperty β€” the vertex property node. that's it. that's the field. she's lowkey minimal and we respect it πŸ“

πŸ’… METHODS πŸ’…

  • static SoType getClassTypeId() β€” Returns the type identifier for this class. your girl's ID card, basically πŸͺͺ

πŸ“ FILE FORMAT/DEFAULTS πŸ“

This is an abstract class. There's no format and no defaults to show off here β€” go check the reference page of a derived class for the format and default values. she's abstract, she doesn't do concrete, she's mysterious like that πŸ’€


πŸ‘€ SEE ALSO πŸ‘€

SoIndexedShape, SoNonIndexedShape, SoVertexProperty

go read those next, bestie, they're the ones who actually do the rendering. iykyk 🌟


and that's the whole page!! this was SoVertexShape(3IV) from the SoVertexShape(3IV)() manual page β€” abstract base class energy, vertex-based royalty, and she ate, no crumbs left πŸ‘‘βœ¨ mwah, love u, go build something with vertices πŸ’–πŸ¦‹πŸŒΈ