Stores the current coordinates. More...
#include <Inventor/elements/SoCoordinateElement.h>
Public Member Functions | |
int32_t | getNum () const |
SbBool | is3D () const |
const SbVec3f & | get3 (int index) const |
const SbVec4f & | get4 (int index) const |
const SbVec3f * | getCoord3 () const |
const SbVec4f * | getCoord4 () const |
virtual void | print (FILE *fp) const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static int | getClassStackIndex () |
static void | set3 (SoState *state, SoNode *node, int32_t numCoords, const SbVec3f *coords) |
static void | set4 (SoState *state, SoNode *node, int32_t numCoords, const SbVec4f *coords) |
static const SoCoordinateElement * | getInstance (SoState *state) |
static SbVec3f | getDefault3 () |
static SbVec4f | getDefault4 () |
Stores the current coordinates.
This element stores the current coordinates. Coordinates may be specified as 3-D or 4-D vectors. This element remembers the last type of value stored.
This class allows read-only access to the top element in the state to make accessing several values in it more efficient. Individual values must be accessed through this instance.
SoCoordinate3, SoCoordinate4, SoProjection, SoVertexProperty
const SbVec3f& SoCoordinateElement::get3 | ( | int | index | ) | const |
Returns the indexed coordinate from an element as a 3-vector, converting if necessary.
A returned reference may be invalid after the next call to this method or the get4() method.
const SbVec4f& SoCoordinateElement::get4 | ( | int | index | ) | const |
Returns the indexed coordinate from an element as a 4-vector, converting if necessary.
A returned reference may be invalid after the next call to this method or the get3() method.
static int SoCoordinateElement::getClassStackIndex | ( | ) | [static] |
Returns the stack id for this element.
Reimplemented from SoReplacedElement.
static SoType SoCoordinateElement::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoReplacedElement.
const SbVec3f* SoCoordinateElement::getCoord3 | ( | ) | const [inline] |
Returns the array of SbVec3f without any conversion.
The pointer may be NULL if coordinates are specified as 4D vectors.
const SbVec4f* SoCoordinateElement::getCoord4 | ( | ) | const [inline] |
Returns the array of SbVec4f without any conversion.
The pointer may be NULL if coordinates are specified as 3D vectors.
static SbVec3f SoCoordinateElement::getDefault3 | ( | ) | [inline, static] |
Returns the default 3-D coordinate.
static SbVec4f SoCoordinateElement::getDefault4 | ( | ) | [inline, static] |
Returns the default 4-D coordinate.
static const SoCoordinateElement* SoCoordinateElement::getInstance | ( | SoState * | state | ) | [inline, static] |
Returns the top (current) instance of the element in the state.
int32_t SoCoordinateElement::getNum | ( | ) | const [inline] |
Returns the number of coordinate points in an instance.
SbBool SoCoordinateElement::is3D | ( | ) | const [inline] |
Returns TRUE if the coordinates were specified as 3-vectors, FALSE if 4-vectors.
virtual void SoCoordinateElement::print | ( | FILE * | fp | ) | const [virtual] |
Prints element (for debugging).
Reimplemented from SoReplacedElement.
static void SoCoordinateElement::set3 | ( | SoState * | state, | |
SoNode * | node, | |||
int32_t | numCoords, | |||
const SbVec3f * | coords | |||
) | [static] |
Sets the current coordinates in the state as 3-vectors.
static void SoCoordinateElement::set4 | ( | SoState * | state, | |
SoNode * | node, | |||
int32_t | numCoords, | |||
const SbVec4f * | coords | |||
) | [static] |
Sets the current coordinates in the state as 4-vectors.