.TH "SoNormalCache" 3 "Tue Jun 23 2026 23:48:38" "Version 4.0.10" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoNormalCache \- The \fBSoNormalCache\fP class is used to hold cached normals\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBSoCache\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSoNormalCache\fP (\fBSoState\fP *const state)" .br .ti -1c .RI "virtual \fB~SoNormalCache\fP ()" .br .ti -1c .RI "void \fBset\fP (const int num, const \fBSbVec3f\fP *const normals)" .br .ti -1c .RI "void \fBset\fP (\fBSoNormalGenerator\fP *generator)" .br .ti -1c .RI "int \fBgetNum\fP (void) const" .br .ti -1c .RI "const \fBSbVec3f\fP * \fBgetNormals\fP (void) const" .br .ti -1c .RI "int \fBgetNumIndices\fP (void) const" .br .ti -1c .RI "const int32_t * \fBgetIndices\fP (void) const" .br .ti -1c .RI "void \fBgeneratePerVertex\fP (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int32_t *coordindices, const int numcoordindices, const float crease_angle, const \fBSbVec3f\fP *facenormals=NULL, const int numfacenormals=\-1, const SbBool ccw=TRUE, const SbBool tristrip=FALSE)" .br .ti -1c .RI "void \fBgeneratePerFace\fP (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int32_t *coordindices, const int numcoorindices, const SbBool ccw)" .br .ti -1c .RI "void \fBgeneratePerFaceStrip\fP (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int32_t *coordindices, const int numcoorindices, const SbBool ccw)" .br .ti -1c .RI "void \fBgeneratePerStrip\fP (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int32_t *coordindices, const int numcoorindices, const SbBool ccw)" .br .ti -1c .RI "void \fBgeneratePerVertexQuad\fP (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int vPerRow, const int vPerColumn, const SbBool ccw)" .br .ti -1c .RI "void \fBgeneratePerFaceQuad\fP (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int vPerRow, const int vPerColumn, const SbBool ccw)" .br .ti -1c .RI "void \fBgeneratePerRowQuad\fP (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int vPerRow, const int vPerColumn, const SbBool ccw)" .br .in -1c Public Member Functions inherited from \fBSoCache\fP .in +1c .ti -1c .RI "\fBSoCache\fP (\fBSoState\fP *const state)" .br .ti -1c .RI "void \fBref\fP (void)" .br .ti -1c .RI "void \fBunref\fP (\fBSoState\fP *state=NULL)" .br .ti -1c .RI "void \fBaddElement\fP (const \fBSoElement\fP *const elem)" .br .ti -1c .RI "virtual void \fBaddCacheDependency\fP (const \fBSoState\fP *state, \fBSoCache\fP *cache)" .br .ti -1c .RI "virtual SbBool \fBisValid\fP (const \fBSoState\fP *state) const" .br .ti -1c .RI "const \fBSoElement\fP * \fBgetInvalidElement\fP (const \fBSoState\fP *const state) const" .br .ti -1c .RI "void \fBinvalidate\fP (void)" .br .in -1c .SS "Additional Inherited Members" Protected Member Functions inherited from \fBSoCache\fP .in +1c .ti -1c .RI "virtual void \fBdestroy\fP (\fBSoState\fP *state)" .br .ti -1c .RI "virtual \fB~SoCache\fP ()" .br .in -1c .SH "Detailed Description" .PP The \fBSoNormalCache\fP class is used to hold cached normals\&. As an extension to the original SGI Open Inventor v2\&.1 API, it is also possible to generate normals using this class\&. .PP It is more powerful and easier to use than the \fBSoNormalGenerator\fP class\&. 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\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoNormalCache::SoNormalCache (\fBSoState\fP *const state)" Constructor with \fIstate\fP being the current state\&. .SS "SoNormalCache::~SoNormalCache ()\fR [virtual]\fP" Destructor .SH "Member Function Documentation" .PP .SS "void SoNormalCache::set (const int num, const \fBSbVec3f\fP *const normals)" Sets an array of normals for this cache\&. The normals will not be deleted when the instance is deleted\&. .SS "void SoNormalCache::set (\fBSoNormalGenerator\fP * generator)" Uses a normal generator in this cache\&. The normal generator will be deleted when the cache is deleted or reset\&. .SS "int SoNormalCache::getNum (void ) const" Returns the number of normals in the cache\&. .SS "const \fBSbVec3f\fP * SoNormalCache::getNormals (void ) const" Return a pointer to the normals in this cache\&. .SS "int SoNormalCache::getNumIndices (void ) const" Returns the number of indices in this cache\&. Normals are generated with PER_VERTEX_INDEXED binding\&. .SS "const int32_t * SoNormalCache::getIndices (void ) const" Returns the normal indices\&. .SS "void SoNormalCache::generatePerVertex (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int32_t * vindex, const int numvi, const float crease_angle, const \fBSbVec3f\fP * facenormals = \fRNULL\fP, const int numfacenormals = \fR\-1\fP, const SbBool ccw = \fRTRUE\fP, const SbBool tristrip = \fRFALSE\fP)" 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\&. \fItristrip\fP should be \fRTRUE\fP if the geometry consists of triangle strips\&. .SS "void SoNormalCache::generatePerFace (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int32_t * cind, const int nv, const SbBool ccw)" Generates face normals for the faceset defined by \fIcoords\fP and \fIcind\fP\&. .SS "void SoNormalCache::generatePerFaceStrip (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int32_t * cind, const int nv, const SbBool ccw)" Generates face normals for triangle strips\&. .SS "void SoNormalCache::generatePerStrip (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int32_t * cind, const int nv, const SbBool ccw)" Generates one normal per triangle strips (averages all triangle normals)\&. .SS "void SoNormalCache::generatePerVertexQuad (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int vPerRow, const int vPerColumn, const SbBool ccw)" Generates PER_VERTEX normals for quad data\&. .SS "void SoNormalCache::generatePerFaceQuad (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int vPerRow, const int vPerColumn, const SbBool ccw)" Generates per face normals for quad data\&. .SS "void SoNormalCache::generatePerRowQuad (const \fBSbVec3f\fP *const coords, const unsigned int numcoords, const int vPerRow, const int vPerColumn, const SbBool ccw)" Generates per row normals for quad data\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.