Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoNormalBundle.h File Reference

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 SbVec3fgetGeneratedNormals () 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 SbVec3fget (int index) const
 
virtual void send (int index) const
 
int numNormalCrack () const
 
int getStartIndex () const
 

Function Documentation

◆ beginPolygon()

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.

◆ endPolygon()

void endPolygon ( )

Definition at line 108 of file SoNormalBundle.h.

◆ generate()

void generate ( int  startIndex = 0,
SbBool  addToState = TRUE 
)

◆ get()

const SbVec3f & get ( int  index) const

Definition at line 179 of file SoNormalBundle.h.

◆ getGeneratedNormals()

const SbVec3f * getGeneratedNormals ( ) const

Definition at line 148 of file SoNormalBundle.h.

◆ getNormalBinding()

SoNormalBindingElement::Binding getNormalBinding ( ) const

Definition at line 152 of file SoNormalBundle.h.

◆ getNumGeneratedNormals()

int getNumGeneratedNormals ( ) const

Definition at line 150 of file SoNormalBundle.h.

◆ getStartIndex()

int getStartIndex ( ) const

Definition at line 190 of file SoNormalBundle.h.

◆ initGenerator()

void initGenerator ( int  initialNum = 100)

◆ numNormalCrack()

int numNormalCrack ( ) const

Definition at line 187 of file SoNormalBundle.h.

◆ polygonVertex() [1/2]

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.

◆ polygonVertex() [2/2]

void polygonVertex ( const SbVec3f point)

Definition at line 106 of file SoNormalBundle.h.

◆ send()

virtual void send ( int  index) const
virtual

◆ set() [1/2]

void set ( int32_t  numNormals,
const SbVec3f normals,
const SoNormalBindingElement::Binding  binding,
const int  startIndex = 0 
)

◆ set() [2/2]

void set ( SoNormalCache *  nc)

◆ setupApproxShapeSize()

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.

◆ setupIndexedConnectivity()

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.

◆ setupIndexedVertexArray()

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:

  • This function should be called before any call to polygonVertex/triangle functions.
  • The data should remain valid until generate() has ended.
  • Once setupIndexedVertexArray has been called, only "by index" functions are valid.

Definition at line 118 of file SoNormalBundle.h.

◆ shouldGenerate()

SbBool shouldGenerate ( int  numNeeded)

◆ triangle() [1/2]

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.

◆ triangle() [2/2]

void triangle ( const SbVec3f p1,
const SbVec3f p2,
const SbVec3f p3 
)

Send a triangle.

Definition at line 112 of file SoNormalBundle.h.

◆ ~SoNormalBundle()

virtual ~SoNormalBundle ( )
virtual