Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoTangentBundle.h File Reference

Go to the source code of this file.

Functions

virtual ~SoTangentBundle ()
 Class: SoTangentBundle.
 
bool shouldGenerate (int numNeeded)
 
void initGenerator (int initialNum=100)
 
void beginLineStrip ()
 Send a line strip's worth of vertices.
 
void lineStripVertex (const SbVec3f &point)
 
void endLineStrip ()
 
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 lineStripVertex (const int32_t index)
 Send a line strip's worth of vertices using indexed vertices.
 
void setupApproxShapeSize (const int32_t numVert)
 Resets the approximative number of vertices that we have to generate tangents for.
 
void generate (int startIndex=0, bool addToState=true)
 
const SbVec3fgetGeneratedTangents () const
 
int getNumGeneratedTangents () const
 
SoTangentBindingElement::Binding getTangentBinding () const
 
void set (int32_t numTangents, const SbVec3f *tangents, SoTangentBindingElement::Binding binding, int startIndex=0)
 
void set (SoTangentCache *tc)
 
const SbVec3fget (int index) const
 
int getStartIndex () const
 

Function Documentation

◆ beginLineStrip()

void beginLineStrip ( )

Send a line strip's worth of vertices.

Begin a strip, send as many vertices as you want, and then end the strip.

Definition at line 62 of file SoTangentBundle.h.

◆ endLineStrip()

void endLineStrip ( )

Definition at line 72 of file SoTangentBundle.h.

◆ generate()

void generate ( int  startIndex = 0,
bool  addToState = true 
)

◆ get()

const SbVec3f & get ( int  index) const

Definition at line 145 of file SoTangentBundle.h.

◆ getGeneratedTangents()

const SbVec3f * getGeneratedTangents ( ) const

Definition at line 111 of file SoTangentBundle.h.

◆ getNumGeneratedTangents()

int getNumGeneratedTangents ( ) const

Definition at line 116 of file SoTangentBundle.h.

◆ getStartIndex()

int getStartIndex ( ) const

Definition at line 150 of file SoTangentBundle.h.

◆ getTangentBinding()

SoTangentBindingElement::Binding getTangentBinding ( ) const

Definition at line 121 of file SoTangentBundle.h.

◆ initGenerator()

void initGenerator ( int  initialNum = 100)

◆ lineStripVertex() [1/2]

void lineStripVertex ( const int32_t  pointIndex)

Send a line strip's worth of vertices using indexed vertices.


NOTE: must be called after setupIndexedVertexArray().

Definition at line 83 of file SoTangentBundle.h.

◆ lineStripVertex() [2/2]

void lineStripVertex ( const SbVec3f point)

Definition at line 67 of file SoTangentBundle.h.

◆ set() [1/2]

void set ( int32_t  numTangents,
const SbVec3f tangents,
SoTangentBindingElement::Binding  binding,
int  startIndex = 0 
)

◆ set() [2/2]

void set ( SoTangentCache *  tc)

◆ setupApproxShapeSize()

void setupApproxShapeSize ( int32_t  approxNumVertices)

Resets the approximative number of vertices that we have to generate tangents 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 88 of file SoTangentBundle.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 78 of file SoTangentBundle.h.

◆ shouldGenerate()

bool shouldGenerate ( int  numNeeded)

◆ ~SoTangentBundle()

virtual ~SoTangentBundle ( )
virtual

Class: SoTangentBundle.

Bundle that allows shapes to deal with tangents and tangent bindings more easily. This class provides a fairly simple interface to tangent handling, including tangent generation.