SoPrimitiveVertex(3)
π NAME π
SoPrimitiveVertex β bestie, this is the class that represents a single vertex of a generated primitive. one (1) lil' corner point, holding the whole shape together π
β¨ SYNOPSIS β¨
#include <Inventor/SoPrimitiveVertex.h>
π Public Member Functions π
SoPrimitiveVertex (void)
SoPrimitiveVertex (const SoPrimitiveVertex &pv)
~SoPrimitiveVertex (void)
SoPrimitiveVertex & operator= (const SoPrimitiveVertex &pv)
const SbVec3f & getPoint (void) const
const SbVec3f & getNormal (void) const
const SbVec4f & getTextureCoords (void) const
int getMaterialIndex (void) const
uint32_t getPackedColor (void) const
const SoDetail * getDetail (void) const
void setPoint (const SbVec3f &pt)
void setPoint (float x, float y, float z)
void setNormal (const SbVec3f &n)
void setNormal (float nx, float ny, float nz)
void setTextureCoords (const SbVec2f &tex)
void setTextureCoords (float tx, float ty)
void setTextureCoords (const SbVec3f &tex)
void setTextureCoords (float tx, float ty, float tz)
void setTextureCoords (const SbVec4f &tex)
void setTextureCoords (float tx, float ty, float tz, float tw)
void setMaterialIndex (int index)
void setPackedColor (uint32_t rgba)
void setDetail (SoDetail *d)
π Detailed Description π
okay so. the SoPrimitiveVertex class represents a single vertex of a generated primitive. it's giving "one point, but make it iconic" β¨
so like, instances of SoPrimitiveVertex get constructed when you're generating primitive data β primarily during an SoCallbackAction traversal. and depending on the context, that vertex could be:
- a single 3D point π¦
- one of the two vertices in a line βοΈ
- or one of the three vertices in a triangle πΊ
no cap, that's the whole vibe of it.
π Constructor & Destructor Documentation π
π«Ά SoPrimitiveVertex::SoPrimitiveVertex (void )
Default constructor, bestie β it sets up a "void" instance. blank canvas energy π¨
πΈ SoPrimitiveVertex::SoPrimitiveVertex (const SoPrimitiveVertex & pv)
Copy constructor. it does a shallow copy. that's it, that's the tea π΅
See also: SoPrimitiveVertex::operator=()
π¦ SoPrimitiveVertex::~SoPrimitiveVertex (void )
Destructor. heads up: the detail instance is owned by client code and will not be destructed here. so likeβ¦ you're responsible for it, bestie π
β Member Function Documentation β
π« SoPrimitiveVertex & SoPrimitiveVertex::operator= (const SoPrimitiveVertex & pv)
Copy operator.
when pv gets copied into this instance, a shallow copy is made. i.e., only the reference to the detail instance is copied (if any), not the detail itself. so don't come for me when you two are sharing the same detail, that's literally by design π
π const SbVec3f & SoPrimitiveVertex::getPoint (void ) const [inline]
Returns vertex coordinates, positioned in object space.
π const SbVec3f & SoPrimitiveVertex::getNormal (void ) const [inline]
Returns the normal vector, oriented in object space.
π const SbVec4f & SoPrimitiveVertex::getTextureCoords (void ) const [inline]
Returns texture coordinates for the vertex, specified in object space.
π int SoPrimitiveVertex::getMaterialIndex (void ) const [inline]
Returns the index of the vertex into the currently active material, if any. (if there's not one, well. there's not one π)
π uint32_t SoPrimitiveVertex::getPackedColor (void ) const [inline]
Returns the RGBA packed color for the given vertex. slay π
Since: Coin 3.0
π const SoDetail * SoPrimitiveVertex::getDetail (void ) const [inline]
Returns a pointer to the detail instance with more information about the vertex. but ngl, a detail instance may not be available, and if so, NULL is returned. so check before you dereference, bestie π
π void SoPrimitiveVertex::setPoint (const SbVec3f & pt) [inline]
Used internally from library client code setting up an SoPrimitiveVertex instance. iykyk π«Ά
π void SoPrimitiveVertex::setPoint (float x, float y, float z) [inline]
Used internally from library client code setting up an SoPrimitiveVertex instance. iykyk π«Ά
π void SoPrimitiveVertex::setNormal (const SbVec3f & n) [inline]
Used internally from library client code setting up an SoPrimitiveVertex instance. iykyk π«Ά
π void SoPrimitiveVertex::setNormal (float nx, float ny, float nz) [inline]
Used internally from library client code setting up an SoPrimitiveVertex instance. iykyk π«Ά
π void SoPrimitiveVertex::setTextureCoords (const SbVec2f & texcoords) [inline]
Used internally from library client code setting up an SoPrimitiveVertex instance.
convenience function, okurrr? it will fill in 0 and 1 in the last two texture coordinates in the internal SbVec4f texture coordinate instance. so you don't have to β¨
π void SoPrimitiveVertex::setTextureCoords (float tx, float ty) [inline]
Used internally from library client code setting up an SoPrimitiveVertex instance.
convenience function again π
it will fill in 0 and 1 in the last two texture coordinates in the internal SbVec4f texture coordinate instance.
π void SoPrimitiveVertex::setTextureCoords (const SbVec3f & texcoords) [inline]
Convenience function. will fill in 1 in the last coordinate.
Note: 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
π void SoPrimitiveVertex::setTextureCoords (float tx, float ty, float tz) [inline]
Convenience function. will fill in 1 in the last coordinate.
Note: this function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. Since: Coin 2.5
π void SoPrimitiveVertex::setTextureCoords (const SbVec4f & texcoords) [inline]
Used internally from library client code setting up an SoPrimitiveVertex instance. iykyk π«Ά
π void SoPrimitiveVertex::setTextureCoords (float tx, float ty, float tz, float tw) [inline]
Used internally from library client code setting up an SoPrimitiveVertex instance.
Note: this function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. Since: Coin 2.5
π void SoPrimitiveVertex::setMaterialIndex (int index) [inline]
Used internally from library client code setting up an SoPrimitiveVertex instance. iykyk π«Ά
π void SoPrimitiveVertex::setPackedColor (uint32_t rgba) [inline]
Used internally from library client code setting up an SoPrimitiveVertex instance. iykyk π«Ά
π void SoPrimitiveVertex::setDetail (SoDetail * detail) [inline]
Used internally from library client code setting up an SoPrimitiveVertex instance.
IMPORTANT, bestie: note that it is the client's responsibility to do the deallocation of the detail instance after the SoPrimitiveVertex instance has gone out of scope. so like, you have to free it. not me reminding you, it's the docs reminding you π
π Author π
Generated automatically by Doxygen for Coin from the source code. (the robots wrote it, we just made it cute π)
and that's the whole page, bestie!! π this was Version 4.0.10, dated Thu Jun 25 2026 00:00:00, and it's the SoPrimitiveVertex(3) manual β literally iconic, ate, no crumbs, periodt. go forth and set your vertices πΈβ¨
π¦ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms