Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoCoordinateElement Class Reference

Stores the current coordinates. More...

#include <Inventor/elements/SoCoordinateElement.h>

+ Inheritance diagram for SoCoordinateElement:

Public Member Functions

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 SbVec3fget3 (int index) const
 Returns the indexed coordinate from an element as a 3-vector, converting if necessary.
 
const SbVec4fget4 (int index) const
 Returns the indexed coordinate from an element as a 4-vector, converting if necessary.
 
const SbVec3fgetCoord3 () const
 Returns the array of SbVec3f without any conversion.
 
const SbVec4fgetCoord4 () const
 Returns the array of SbVec4f without any conversion.
 
virtual void print (FILE *fp) const
 Prints element (for debugging).
 
- Public Member Functions inherited from SoElement
virtual void push (SoState *state)
 Pushes element.
 
virtual void pop (SoState *state, const SoElement *prevTopElement)
 Pops element.
 
virtual SoType getTypeId () const
 Returns type identifier for element instance.
 
- Public Member Functions inherited from SoTypedObject
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static int getClassStackIndex ()
 Returns the stack id for this element.
 
static void set3 (SoState *state, SoNode *node, int32_t numCoords, const SbVec3f *coords)
 Sets the current coordinates in the state as 3-vectors.
 
static void set4 (SoState *state, SoNode *node, int32_t numCoords, const SbVec4f *coords)
 Sets the current coordinates in the state as 4-vectors.
 
static const SoCoordinateElementgetInstance (SoState *state)
 Returns the top (current) instance of the element in the state.
 
static SbVec3f getDefault3 ()
 Returns the default 3-D coordinate.
 
static SbVec4f getDefault4 ()
 Returns the default 4-D coordinate.
 
- Static Public Member Functions inherited from SoReplacedElement
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static int getClassStackIndex ()
 Returns the stack id for this element.
 
- Static Public Member Functions inherited from SoElement
static SoType getClassTypeId ()
 Returns type identifier for SoElement class.
 
- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Detailed Description

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.

SEE ALSO

SoCoordinate3, SoCoordinate4, SoProjection, SoVertexProperty

Definition at line 75 of file SoCoordinateElement.h.

Member Function Documentation

◆ get3()

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.

◆ get4()

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.

◆ getClassStackIndex()

static int SoCoordinateElement::getClassStackIndex ( )
static

Returns the stack id for this element.


◆ getClassTypeId()

static SoType SoCoordinateElement::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getCoord3()

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.

Definition at line 128 of file SoCoordinateElement.h.

◆ getCoord4()

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.

Definition at line 134 of file SoCoordinateElement.h.

◆ getDefault3()

static SbVec3f SoCoordinateElement::getDefault3 ( )
inlinestatic

Returns the default 3-D coordinate.

Definition at line 139 of file SoCoordinateElement.h.

◆ getDefault4()

static SbVec4f SoCoordinateElement::getDefault4 ( )
inlinestatic

Returns the default 4-D coordinate.

Definition at line 143 of file SoCoordinateElement.h.

◆ getInstance()

static const SoCoordinateElement * SoCoordinateElement::getInstance ( SoState state)
inlinestatic

Returns the top (current) instance of the element in the state.

Definition at line 97 of file SoCoordinateElement.h.

◆ getNum()

int32_t SoCoordinateElement::getNum ( ) const
inline

Returns the number of coordinate points in an instance.

Definition at line 103 of file SoCoordinateElement.h.

◆ is3D()

SbBool SoCoordinateElement::is3D ( ) const
inline

Returns TRUE if the coordinates were specified as 3-vectors, FALSE if 4-vectors.

Definition at line 109 of file SoCoordinateElement.h.

◆ print()

virtual void SoCoordinateElement::print ( FILE *  fp) const
virtual

Prints element (for debugging).

Reimplemented from SoReplacedElement.

◆ set3()

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.

◆ set4()

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.


The documentation for this class was generated from the following file: