#include <Inventor/bundles/SoBundle.h>
#include <Inventor/elements/SoNormalElement.h>
#include <Inventor/elements/SoNormalBindingElement.h>
#include <Inventor/misc/SoNormalGenerator.h>
Go to the source code of this file.
Functions | |
virtual | ~SoNormalBundle () |
SbBool | shouldGenerate (int numNeeded) |
void | initGenerator (int initialNum=100) |
void | beginPolygon () |
Send a polygon's worth of vertices. | |
void | polygonVertex (const SbVec3f &point) |
void | endPolygon () |
void | triangle (const SbVec3f &p1, const SbVec3f &p2, const SbVec3f &p3) |
Send a triangle. | |
void | setupIndexedVertexArray (const SbVec3f *pointArray) |
Specifies a pointer to the array of points that will be used in subsequent calls to polygonVertex(index) and triangle(index1,index2,index3). | |
void | polygonVertex (const int32_t index) |
Send a polygon's worth of vertices using indexed vertices. | |
void | triangle (const int32_t index1, const int32_t index2, const int32_t index3) |
Send a triangle using indexed vertices. | |
void | setupIndexedConnectivity (const int32_t *connectivityArray) |
Specifies a per-vertex connectivity array. | |
void | setupApproxShapeSize (const int32_t numVert, const int32_t numFace) |
Resets the approximative number of vertices and faces that we have to generate normals for. | |
void | generate (int startIndex=0, SbBool addToState=TRUE) |
const SbVec3f * | getGeneratedNormals () const |
int | getNumGeneratedNormals () const |
SoNormalBindingElement::Binding | getNormalBinding () const |
void | set (int32_t numNormals, const SbVec3f *normals, const SoNormalBindingElement::Binding binding, const int startIndex=0) |
void | set (SoNormalCache *nc) |
const SbVec3f & | get (int index) const |
virtual void | send (int index) const |
int | numNormalCrack () const |
int | getStartIndex () const |
void beginPolygon | ( | ) |
Send a polygon's worth of vertices.
Begin a polygon, send as many vertices as you want, and then end the polygon.
Definition at line 104 of file SoNormalBundle.h.
void endPolygon | ( | ) |
Definition at line 108 of file SoNormalBundle.h.
const SbVec3f & get | ( | int | index | ) | const |
Definition at line 179 of file SoNormalBundle.h.
const SbVec3f * getGeneratedNormals | ( | ) | const |
Definition at line 148 of file SoNormalBundle.h.
SoNormalBindingElement::Binding getNormalBinding | ( | ) | const |
Definition at line 152 of file SoNormalBundle.h.
int getNumGeneratedNormals | ( | ) | const |
Definition at line 150 of file SoNormalBundle.h.
int getStartIndex | ( | ) | const |
Definition at line 190 of file SoNormalBundle.h.
void initGenerator | ( | int | initialNum = 100 | ) |
int numNormalCrack | ( | ) | const |
Definition at line 187 of file SoNormalBundle.h.
void polygonVertex | ( | const int32_t | pointIndex | ) |
Send a polygon's worth of vertices using indexed vertices.
NOTE: must be called after setupIndexedVertexArray().
Definition at line 120 of file SoNormalBundle.h.
void polygonVertex | ( | const SbVec3f & | point | ) |
Definition at line 106 of file SoNormalBundle.h.
|
virtual |
void set | ( | int32_t | numNormals, |
const SbVec3f * | normals, | ||
const SoNormalBindingElement::Binding | binding, | ||
const int | startIndex = 0 |
||
) |
void set | ( | SoNormalCache * | nc | ) |
void setupApproxShapeSize | ( | const int32_t | approxNumVertices, |
const int32_t | approxNumFaces | ||
) |
Resets the approximative number of vertices and faces that we have to generate normals for.
These correspond to the same parameters in the constructor, but allows setting them after creation.
Note: Must be called before first call to polygonVertex or triangle calls..
Definition at line 126 of file SoNormalBundle.h.
void setupIndexedConnectivity | ( | const int32_t * | connectivityArray | ) |
Specifies a per-vertex connectivity array.
This array should be dimensioned the number of vertices, and represent a double link list of connectivity for each vertex.
Definition at line 124 of file SoNormalBundle.h.
void setupIndexedVertexArray | ( | const SbVec3f * | pointArray | ) |
Specifies a pointer to the array of points that will be used in subsequent calls to polygonVertex(index) and triangle(index1,index2,index3).
Using this mode allows reusing vertices, avoiding data copy and increasing performance. IMPORTANT NOTE:
Definition at line 118 of file SoNormalBundle.h.
SbBool shouldGenerate | ( | int | numNeeded | ) |
void triangle | ( | const int32_t | index1, |
const int32_t | index2, | ||
const int32_t | index3 | ||
) |
Send a triangle using indexed vertices.
NOTE: must be called after setupIndexedVertexArray().
Definition at line 122 of file SoNormalBundle.h.
Send a triangle.
Definition at line 112 of file SoNormalBundle.h.
|
virtual |