Open Inventor Reference
|
Element that stores the current coordinates. More...
#include <Inventor/elements/SoCoordinateElement.h>
Public Member Functions | |
virtual void | init (SoState *state) |
Initializes element. | |
int32_t | getNum () const |
Returns the number of coordinate points in an instance. | |
SbBool | is3D () const |
Returns TRUE if the coordinates were specified as 3-vectors, FALSE if 4-vectors. | |
const SbVec3f & | get3 (int index) const |
Returns the indexed coordinate from an element as a 3- or 4-vector, converting if necessary. | |
const SbVec4f & | get4 (int index) const |
virtual void | print (FILE *fp) const |
Prints element (for debugging) | |
Static Public Member Functions | |
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 void | set4 (SoState *state, SoNode *node, int32_t numCoords, const SbVec4f *coords) |
static const SoCoordinateElement * | getInstance (SoState *state) |
Returns the top (current) instance of the element in the state. | |
static SbVec3f | getDefault3 () |
Returns the default 3-D or 4-D coordinate. | |
static SbVec4f | getDefault4 () |
static void | initClass () |
Initializes the SoCoordinateElement class. | |
Protected Member Functions | |
virtual | ~SoCoordinateElement () |
Protected Attributes | |
int32_t | numCoords |
const SbVec3f * | coords3 |
const SbVec4f * | coords4 |
SbBool | coordsAre3D |
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.
Definition at line 77 of file SoCoordinateElement.h.
virtual SoCoordinateElement::~SoCoordinateElement | ( | ) | [protected, virtual] |
const SbVec3f& SoCoordinateElement::get3 | ( | int | index | ) | const |
A returned reference may be invalid after the next call to either of these methods.
const SbVec4f& SoCoordinateElement::get4 | ( | int | index | ) | const |
static SbVec3f SoCoordinateElement::getDefault3 | ( | ) | [inline, static] |
Definition at line 110 of file SoCoordinateElement.h.
static SbVec4f SoCoordinateElement::getDefault4 | ( | ) | [inline, static] |
Definition at line 111 of file SoCoordinateElement.h.
static const SoCoordinateElement* SoCoordinateElement::getInstance | ( | SoState * | state | ) | [inline, static] |
Definition at line 92 of file SoCoordinateElement.h.
References SoElement::getConstElement().
int32_t SoCoordinateElement::getNum | ( | ) | const [inline] |
Definition at line 97 of file SoCoordinateElement.h.
virtual void SoCoordinateElement::init | ( | SoState * | state | ) | [virtual] |
Reimplemented from SoReplacedElement.
static void SoCoordinateElement::initClass | ( | ) | [static] |
Reimplemented from SoReplacedElement.
Reimplemented in SoGLCoordinateElement.
SbBool SoCoordinateElement::is3D | ( | ) | const [inline] |
Definition at line 101 of file SoCoordinateElement.h.
virtual void SoCoordinateElement::print | ( | FILE * | fp | ) | const [virtual] |
Reimplemented from SoReplacedElement.
static void SoCoordinateElement::set3 | ( | SoState * | state, |
SoNode * | node, | ||
int32_t | numCoords, | ||
const SbVec3f * | coords | ||
) | [static] |
static void SoCoordinateElement::set4 | ( | SoState * | state, |
SoNode * | node, | ||
int32_t | numCoords, | ||
const SbVec4f * | coords | ||
) | [static] |
const SbVec3f* SoCoordinateElement::coords3 [protected] |
Definition at line 122 of file SoCoordinateElement.h.
const SbVec4f* SoCoordinateElement::coords4 [protected] |
Definition at line 123 of file SoCoordinateElement.h.
SbBool SoCoordinateElement::coordsAre3D [protected] |
Definition at line 124 of file SoCoordinateElement.h.
int32_t SoCoordinateElement::numCoords [protected] |
Definition at line 121 of file SoCoordinateElement.h.