23#include <Inventor/bundles/SoBundle.h>
24#include <Inventor/elements/SoTangentElement.h>
25#include <Inventor/elements/SoTangentBindingElement.h>
26#include <Inventor/misc/SoTangentGenerator.h>
44 virtual ~SoTangentBundle();
47 bool shouldGenerate(
int numNeeded );
51 void initGenerator(
int initialNum = 100 );
64 m_generator->beginLineStrip();
67 void lineStripVertex(
const SbVec3f& point )
69 m_generator->lineStripVertex( point );
74 m_generator->endLineStrip();
78 void setupIndexedVertexArray(
const SbVec3f* pointArray )
80 m_generator->setupIndexedVertexArray( pointArray );
83 void lineStripVertex(
const int32_t index )
85 m_generator->lineStripVertex( index );
88 void setupApproxShapeSize(
const int32_t numVert )
90 m_generator->setupApproxShapeSize( numVert );
108 void generate(
int startIndex = 0,
bool addToState =
true );
111 const SbVec3f* getGeneratedTangents()
const
113 return m_generator->getTangents();
116 int getNumGeneratedTangents()
const
118 return m_generator->getNumTangents();
123 return m_generator->getBinding();
141 void set( SoTangentCache* tc );
145 const SbVec3f& get(
int index )
const
147 return m_tangElt->
getNum() != 0 ? m_tangElt->
get( index - m_startIndex ) : s_zVers;
150 int getStartIndex()
const
156 SoTangentGenerator* m_generator;
Abstract base class for all actions.
Abstract base class for all database nodes.
Binding
The choice of values is for compatibility with Open Inventor 2.0 binary format files:
Allows read-only access to the top element in the state.
int32_t getNum() const
Returns the number of tangent vectors in an instance.
const SbVec3f & get(int index) const
Returns the indexed tangent from an element.