SOPRIMITIVEVERTEX(3iv)
π
SoPrimitiveVertex β straight from the 3IV manual, bestie β¨
πΈ NAME πΈ
SoPrimitiveVertex β the lil glow-up that represents a vertex of a generated primitive π
𧬠INHERITS FROM π§¬
SoPrimitiveVertex
(no cap, that's literally what it says β it inherits from itself, main character energy fr fr π)
β¨ SYNOPSIS β¨
Drop this include in and you're in business:
#include <Inventor/SoPrimitiveVertex.h>
These are the methods living in class SoPrimitiveVertex, exactly as written:
SoPrimitiveVertex()
SoPrimitiveVertex(const SoPrimitiveVertex &pv)
~SoPrimitiveVertex()
const SbVec3f & getPoint() const
const SbVec3f & getNormal() const
const SbVec4f & getTextureCoords() const
int getMaterialIndex() const
const SoDetail * getDetail() const
SoPrimitiveVertex & operator =(const SoPrimitiveVertex &pv)
π DESCRIPTION π
okay so. An SoPrimitiveVertex is the whole vibe of a vertex β like a triangle vertex, a line segment vertex, or a point vertex β one of those primitives that's getting generated by an SoCallbackAction. π¦
It's carrying around:
- an object-space point
- a normal
- texture coordinates
- a material index
- and a pointer to an instance of an
SoDetailsubclass π
That detail might hold even more tea about the vertexβ¦ or it might just be a NULL pointer if there's no such info. It's giving "mystery box, possibly empty." π
Lowkey important: instances of SoPrimitiveVertex are typically created on the stack by shape classes while they're generating primitives. So if you're someone who wants to save them as return values from SoCallbackAction? Bestie, you should probably make copies of them. Do not just hold onto the original. π
π οΈ METHODS π οΈ
SoPrimitiveVertex()SoPrimitiveVertex(const SoPrimitiveVertex &pv)~SoPrimitiveVertex()
Constructors and destructor, the whole trilogy π¬ Heads up though: copying a primitive vertex copies the detail pointer, not the detail itself. That's the rule, periodt.
const SbVec3f & getPoint() constconst SbVec3f & getNormal() constconst SbVec4f & getTextureCoords() const
These three hand you the surface point, the normal, and the texture coordinates β all in object space. Obsessed with a clean return tbh.
int getMaterialIndex() const
Returns the index into the current set of materials of the material that's active at the vertex. iykyk π§
const SoDetail * getDetail() const
Returns the detail that gives you more info about the vertex. And bestie, real talk: this pointer may be NULL if there is no more info. Always check it. π
SoPrimitiveVertex & operator =(const SoPrimitiveVertex &pv)
Copies the given vertex. But β say it with me β just the pointer to the detail gets copied, not the detail itself. Same energy as the copy constructor, no surprises. β¨
π friendly reminder from the group chat: stack-allocated vertices + wanting to keep them = make a copy. The detail pointer is not the detail. That's the whole plot. π«Ά
mwah π that's the page β the footer tags it as SoPrimitiveVertex(3IV)() (the date slot is just vibing empty, iconic of it) and the header matches, so we're fully synced, slay, bye bestie ππ
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms