55#ifndef _SO_COORDINATE_ELEMENT
56#define _SO_COORDINATE_ELEMENT
101 bool is3D()
const {
return coordsAre3D; }
#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.
Element that stores the current coordinates.
static SbVec3f getDefault3()
Returns the default 3-D or 4-D coordinate.
const SbVec4f & get4(int index) const
virtual void init(SoState *state)
Initializes element.
static void initClass()
Initializes the SoCoordinateElement class.
static const SoCoordinateElement * getInstance(SoState *state)
Returns the top (current) instance of the element in the state.
virtual ~SoCoordinateElement()
int32_t getNum() const
Returns the number of coordinate points in an instance.
static void set4(SoState *state, SoNode *node, int32_t numCoords, const SbVec4f *coords)
virtual void print(FILE *fp) const
Prints element (for debugging)
bool is3D() const
Returns TRUE if the coordinates were specified as 3-vectors, FALSE if 4-vectors.
static void set3(SoState *state, SoNode *node, int32_t numCoords, const SbVec3f *coords)
Sets the current coordinates in the state as 3-vectors or 4-vectors.
static SbVec4f getDefault4()
const SbVec3f & get3(int index) const
Returns the indexed coordinate from an element as a 3- or 4-vector, converting if necessary.
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.
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.