23#include <Inventor/SbLinear.h>
24#include <Inventor/elements/SoReplacedElement.h>
25#include <Inventor/errors/SoDebugError.h>
56 return getConstElement<SoTangentElement>( state );
72 if ( index < 0 || index >= m_numTangents )
76 "Index (%d) is out of range 0 - %d",
77 index, m_numTangents - 1 );
79 return s_defaultTangent;
81 return m_tangents[index];
87 virtual void print( FILE* fp )
const;
91 virtual void init(
SoState* state );
95 static void initClass();
96 static void exitClass();
99 int32_t m_numTangents;
109 static SbVec3f s_defaultTangent;
static void post(const char *methodName, const char *formatString ...)
Posts an error.
Abstract base class for all database nodes.
Abstract base class for each state element whose value is replaced whenever it is set.
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.
static void set(SoState *state, SoNode *node, int32_t numTangents, const SbVec3f *tangents)
Sets the current tangents.
virtual void print(FILE *fp) const
Prints element (for debugging).
static const SoTangentElement * getInstance(SoState *state)
Returns the top (current) instance of the element in the state.