64 m_generator->beginLineStrip();
69 m_generator->lineStripVertex( point );
74 m_generator->endLineStrip();
80 m_generator->setupIndexedVertexArray( pointArray );
85 m_generator->lineStripVertex( index );
90 m_generator->setupApproxShapeSize( numVert );
108 void generate(
int startIndex = 0,
bool addToState =
true );
113 return m_generator->getTangents();
118 return m_generator->getNumTangents();
123 return m_generator->getBinding();
141 void set( SoTangentCache* tc );
147 return m_tangElt->
getNum() != 0 ? m_tangElt->
get( index - m_startIndex ) : s_zVers;
156 SoTangentGenerator* m_generator;
void generate()
Calculate the normals once all vertices have been sent.
void beginLineStrip()
Send a line strip's worth of vertices.
void lineStripVertex(const SbVec3f &point)
SoTangentBindingElement::Binding getTangentBinding() const
virtual ~SoTangentBundle()
Class: SoTangentBundle.
bool shouldGenerate(int numNeeded)
void initGenerator(int initialNum=100)
void setupApproxShapeSize(const int32_t numVert)
Resets the approximative number of vertices that we have to generate tangents for.
const SbVec3f & get(int index) const
void set(int32_t numTangents, const SbVec3f *tangents, SoTangentBindingElement::Binding binding, int startIndex=0)
int getStartIndex() const
int getNumGeneratedTangents() const
void setupIndexedVertexArray(const SbVec3f *pointArray)
Specifies a pointer to the array of points that will be used in subsequent calls to polygonVertex(ind...
const SbVec3f * getGeneratedTangents() const
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.