SoNormalCache(3)
β¨ NAME β¨
SoNormalCache β bestie, this class has ONE job and it's holding onto cached normals. That's the whole personality. No notes. π
This is the SoNormalCache(3) page from the Coin manual (section 3, iykyk), so that's where you'd go hunting for it on your system. π«Ά
π¦ SYNOPSIS π¦
#include <Inventor/caches/SoNormalCache.h>
It inherits SoCache, so it's got that whole cache-family inheritance situation going on. Family business. π
π 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 π
SoNormalCache is the class that holds your cached normals. That's the whole vibe. π
As a lil extension on top of the original SGI Open Inventor v2.1 API, you can also generate normals with this class. Glow-up behavior. β¨
It's more powerful and easier to use than the SoNormalGenerator class β lowkey it ate. You can generate normals per vertex with indices (which uses way less memory than plain per-vertex normals, no cap π§ ), and it's got special methods just for generating normals for triangle strips and quads. Specialized queen. π
π CONSTRUCTOR & DESTRUCTOR DOCUMENTATION π
SoNormalCache::SoNormalCache (SoState *const state)
Constructor, with state being the current state. You gotta hand it the state, that's the entry fee. ποΈ
SoNormalCache::~SoNormalCache () [virtual]
Destructor. Say bye bestie. π
π MEMBER FUNCTION DOCUMENTATION π
void SoNormalCache::set (const int num, const SbVec3f *const normals)
Sets an array of normals for this cache. Heads up though β the normals will not be deleted when the instance is deleted. So that memory is yours to deal with, fr fr. π
void SoNormalCache::set (SoNormalGenerator * generator)
Uses a normal generator in this cache. This one's different from the other set: the normal generator will be deleted when the cache is deleted or reset. It's not your problem, she handles it. π
int SoNormalCache::getNum (void ) const
Returns the number of normals in the cache. Just a count. Very demure. π
const SbVec3f * SoNormalCache::getNormals (void ) const
Returns a pointer to the normals in this cache. Here, take the pointer. π«΄
int SoNormalCache::getNumIndices (void ) const
Returns the number of indices in this cache. Oh and important β normals are generated with PER_VERTEX_INDEXED binding. Remember that. π
const int32_t * SoNormalCache::getIndices (void ) const
Returns the normal indices. That's it, that's the function. π¦
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. You can specify face normals if you already calculated them somewhere else β otherwise the face normals get calculated first, before the vertex normals get calculated. Order matters, bestie. β¨ And tristrip should be TRUE if the geometry consists of triangle strips. Don't forget or it'll be giving chaos. π
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 (const SbVec3f *const coords, const unsigned int numcoords, const int32_t * cind, const int nv, const SbBool ccw)
Generates face normals for triangle strips. Strips get their own special treatment, as they should. π
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 strip β and it averages all the triangle normals to get it. Math girlies rise. π₯
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. Quads deserve love too. π
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 (const SbVec3f *const coords, const unsigned int numcoords, const int vPerRow, const int vPerColumn, const SbBool ccw)
Generates per row normals for quad data. Row by row, iconic behavior. β
πΈ AUTHOR πΈ
Generated automatically by Doxygen for Coin from the source code. (Not a human author moment, it's a robot-authored banger. π€β¨)
Version 4.0.10 Β· Thu Jun 25 2026 00:00:00 Β· SoNormalCache(3)
That's the whole page bestie β normals cached, indices returned, quads fully respected. Go forth and render something gorgeous. π¦π periodt.
π¦ 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