55#ifndef _SO_NORMAL_ELEMENT
56#define _SO_NORMAL_ELEMENT
101 if (index < 0 || index >= numNormals)
103 "Index (%d) is out of range 0 - %d",
104 index, numNormals - 1);
106 return normals[index];
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
#define SO_ELEMENT_HEADER(className)
This one is for non-abstract element classes.
static void post(const char *methodName, const char *formatString ...)
Posts an error.
static const SoElement * getConstElement(SoState *state, int stackIndex)
Returns a read-only pointer to the top instance in the given element stack.
Abstract base class for all database nodes.
Element that stores the current surface normals.
int32_t getNum() const
Returns the number of normal vectors in an instance.
static const SoNormalElement * getInstance(SoState *state)
Returns the top (current) instance of the element in the state.
static void initClass()
Initializes the SoNormalElement class.
virtual void print(FILE *fp) const
Prints element (for debugging)
static void set(SoState *state, SoNode *node, int32_t numNormals, const SbVec3f *normals)
Sets the current normals.
const SbVec3f & get(int index) const
Returns the indexed normal from an element.
virtual void init(SoState *state)
Initializes element.
virtual ~SoNormalElement()
This is the abstract base class for each state element whose value is replaced whenever it is set.
An SoState collects and holds state while traversing a scene graph.