SoCoordinateElement Class Reference
[Elements]

Stores the current coordinates. More...

#include <Inventor/elements/SoCoordinateElement.h>

Inheritance diagram for SoCoordinateElement:
SoReplacedElement SoElement SoTypedObject SoGLCoordinateElement

List of all members.

Public Member Functions

int32_t getNum () const
SbBool is3D () const
const SbVec3fget3 (int index) const
const SbVec4fget4 (int index) const
const SbVec3fgetCoord3 () const
const SbVec4fgetCoord4 () 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 SoCoordinateElementgetInstance (SoState *state)
static SbVec3f getDefault3 ()
static SbVec4f getDefault4 ()

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


Member Function Documentation

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.

Reimplemented in SoGLCoordinateElement.

static SoType SoCoordinateElement::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoReplacedElement.

Reimplemented in SoGLCoordinateElement.

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.


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

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/