The sonormalbundle class simplifies normal handling. this class is currently not used in coin but is provided for api compatibility.
Inherits SoBundle.
SoNormalBundle (SoAction *action, SbBool forrendering)
~SoNormalBundle ()
SbBool shouldGenerate (int numneeded)
void initGenerator (int initnum=100)
void beginPolygon (void)
void polygonVertex (const SbVec3f &v)
void endPolygon (void)
void triangle (const SbVec3f &p1, const SbVec3f &p2, const SbVec3f &p3)
void generate (int startindex=0, SbBool addtostate=TRUE)
const SbVec3f * getGeneratedNormals (void) const
int getNumGeneratedNormals (void) const
void set (int32_t num, const SbVec3f *normals)
const SbVec3f & get (int index) const
void send (int index) const
SoNormalGenerator * generator
The SoNormalBundle class simplifies normal handling.
This class is currently not used in Coin but is provided for API compatibility.
Constructor.
Destructor.
Returns FALSE if there are normals on the state. Otherwise initGenerator() is called with numneeded as argument, and TRUE is returned.
Initializes the normal generator. initnum is a hint that should contain the approximate number of normals to be generated.
Start polygon specification. Call polygonVertex() for each vertex in the polygon, and then endPolygon() to close the polygon.
See also:
polygonVertex(), endPolygon()
Call for each vertex in a polygon.
See also:
beginPolygon(), endPolygon()
Call to close a polygon.
See also:
beginPolygon(), polygonVertex()
Convenience method to specify a triangle. p1, p2, and p3 are the triangles vertices.
Generate normals for the shape. startindex should always be 0 (the SoNonIndexedShape::startIndex field is obsoleted). addtostate should be true if the generated normals should be pushed onto the current state.
Returns the number of generated normals.
Returns a pointer to the generated normals.
Can be used by nodes that generate their own normals. The state will be updated with the new normals, and the state will be popped again when the SoNormalBundle destructor is called.
Returns the index'th normal from the state.
Send the index'th normal to OpenGL.
Generated automatically by Doxygen for Coin from the source code.