SoNormalCache(3)
π SoNormalCache π
okay bestie, welcome to SoNormalCache(3) β it lives in the Library Functions Manual and it's literally the class that holds your cached normals. she's giving memory-efficient, she's giving extension-to-the-original-API, she's giving main character. let's go π¦
πΈ NAME πΈ
SoNormalCache β the class used to hold cached normals. that's it. that's the vibe. β¨
π SYNOPSIS π
#include <Inventor/caches/SoNormalCache.h>
she inherits SoCache. family tree matters, periodt. π
β¨ Public Member Functions β¨
SoNormalCache (SoState *const state)
virtual ~SoNormalCache ()
void set (const int num, const SbVec3f *const normals)
void set (SoNormalGenerator *generator)
int getNum (void) const
const SbVec3f * getNormals (void) const
int getNumIndices (void) const
const int32_t * getIndices (void) const
void generatePerVertex (const SbVec3f *const coords, const unsigned int
numcoords, const int32_t *coordindices, const int numcoordindices,
const float crease_angle, const SbVec3f *facenormals=NULL, const int
numfacenormals=-1, const SbBool ccw=TRUE, const SbBool
tristrip=FALSE)
void generatePerFace (const SbVec3f *const coords, const unsigned int
numcoords, const int32_t *coordindices, const int numcoorindices,
const SbBool ccw)
void generatePerFaceStrip (const SbVec3f *const coords, const unsigned
int numcoords, const int32_t *coordindices, const int
numcoorindices, const SbBool ccw)
void generatePerStrip (const SbVec3f *const coords, const unsigned int
numcoords, const int32_t *coordindices, const int numcoorindices,
const SbBool ccw)
void generatePerVertexQuad (const SbVec3f *const coords, const unsigned
int numcoords, const int vPerRow, const int vPerColumn, const SbBool
ccw)
void generatePerFaceQuad (const SbVec3f *const coords, const unsigned
int numcoords, const int vPerRow, const int vPerColumn, const SbBool
ccw)
void generatePerRowQuad (const SbVec3f *const coords, const unsigned int
numcoords, const int vPerRow, const int vPerColumn, const SbBool
ccw)
π Public Member Functions inherited from SoCache π
SoCache (SoState *const state)
void ref (void)
void unref (SoState *state=NULL)
void addElement (const SoElement *const elem)
virtual void addCacheDependency (const SoState *state, SoCache *cache)
virtual SbBool isValid (const SoState *state) const
const SoElement * getInvalidElement (const SoState *const state) const
void invalidate (void)
π§ Additional Inherited Members π§
π«Ά Protected Member Functions inherited from SoCache π«Ά
virtual void destroy (SoState *state)
virtual ~SoCache ()
π Detailed Description π
The SoNormalCache class is used to hold cached normals. yes, again. she said what she said. π
As an extension to the original SGI Open Inventor v2.1 API, it is also possible to generate normals using this class. glow-up behavior only. β¨
It is more powerful and easier to use than the SoNormalGenerator class. she ate. π₯ It is possible to generate normals per vertex with indices (using much less memory than plain per vertex normals), and it contains special methods to generate normals for triangle strips and quads. lowkey iconic. π
π¦ Constructor & Destructor Documentation π¦
β SoNormalCache::SoNormalCache (SoState *const state) β
Contructor with state being the current state.
β SoNormalCache::~SoNormalCache () [virtual] β
Destructor. bye bestie, thanks for the normals π
π Member Function Documentation π
β¨ void SoNormalCache::set (const int num, const SbVec3f *const normals) β¨
Sets an array of normals for this cache. heads up bestie: the normals will not be deleted when the instance is deleted. she's just holding them, not claiming them. π
β¨ void SoNormalCache::set (SoNormalGenerator * generator) β¨
Uses a normal generator in this cache. unlike the above, the normal generator will be deleted when the cache is deleted or reset. so like, she does own this one. π
β¨ int SoNormalCache::getNum (void ) const β¨
Returns the number of normals in the cache. that's the count, bestie. π’
β¨ const SbVec3f * SoNormalCache::getNormals (void ) const β¨
Return a pointer to the normals in this cache. β¨
β¨ int SoNormalCache::getNumIndices (void ) const β¨
Returns the number of indices in this cache. Normals are generated with PER_VERTEX_INDEXED binding. no cap. π
β¨ const int32_t * SoNormalCache::getIndices (void ) const β¨
Returns the normal indices. π
β¨ void SoNormalCache::generatePerVertex (...) β¨
void SoNormalCache::generatePerVertex (const SbVec3f *const coords, const
unsigned int numcoords, const int32_t * vindex, const int numvi, const
float crease_angle, const SbVec3f * facenormals = NULL, const int
numfacenormals = -1, const SbBool ccw = TRUE, const SbBool tristrip =
FALSE)
Generates normals for each vertex for each face. It is possible to specify face normals if these have been calculated somewhere else β otherwise the face normals will be calculated before the vertex normals are calculated. and listen: tristrip should be TRUE if the geometry consists of triangle strips. don't skip that part. π«Ά
β¨ void SoNormalCache::generatePerFace (...) β¨
void SoNormalCache::generatePerFace (const SbVec3f *const coords, const
unsigned int numcoords, const int32_t * cind, const int nv, const SbBool
ccw)
Generates face normals for the faceset defined by coords and cind. πΈ
β¨ void SoNormalCache::generatePerFaceStrip (...) β¨
void SoNormalCache::generatePerFaceStrip (const SbVec3f *const coords, const
unsigned int numcoords, const int32_t * cind, const int nv, const SbBool
ccw)
Generates face normals for triangle strips. πΊ
β¨ void SoNormalCache::generatePerStrip (...) β¨
void SoNormalCache::generatePerStrip (const SbVec3f *const coords, const
unsigned int numcoords, const int32_t * cind, const int nv, const SbBool
ccw)
Generates one normal per triangle strips (avarages all triangle normals). one normal for the whole strip, she's efficient like that. β¨
β¨ void SoNormalCache::generatePerVertexQuad (...) β¨
void SoNormalCache::generatePerVertexQuad (const SbVec3f *const coords,
const unsigned int numcoords, const int vPerRow, const int vPerColumn,
const SbBool ccw)
Generates PER_VERTEX normals for quad data. πͺ
β¨ void SoNormalCache::generatePerFaceQuad (...) β¨
void SoNormalCache::generatePerFaceQuad (const SbVec3f *const coords, const
unsigned int numcoords, const int vPerRow, const int vPerColumn, const
SbBool ccw)
Generates per face normals for quad data. π¦
β¨ void SoNormalCache::generatePerRowQuad (...) β¨
void SoNormalCache::generatePerRowQuad (const SbVec3f *const coords, const
unsigned int numcoords, const int vPerRow, const int vPerColumn, const
SbBool ccw)
Generates per row normals for quad data. β‘οΈ
π Author π
Generated automatically by Doxygen for Coin from the source code. the robots did this one, not me. π€π
and that's the whole page, bestie!! π«Ά this was Coin, Version 3.1.3 β SoNormalCache(3), signed, sealed, cached. slay responsibly. π β¨π
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.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