Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoTextureCoordinate3Element Class Reference

VSG extension Stores the current 3D texture coordinates. More...

#include <Inventor/elements/SoTextureCoordinate3Element.h>

+ Inheritance diagram for SoTextureCoordinate3Element:

Public Types

enum  CoordType {
  EXPLICIT = 1 ,
  FUNCTION = 2
}
 The choice of values is for compatibility with Open Inventor 2.0 binary format files. More...
 
typedef const SbVec4fSoTextureCoordinate3FunctionCB(void *userdata, const SbVec3f &point, const SbVec3f &normal)
 Function that TextureCoordinateFunction nodes register to compute texture coordinates.
 

Public Member Functions

virtual CoordType getType (int unit=0) const
 
const SbVec4fget (const SbVec3f &point, const SbVec3f &normal, int unit=0) const
 Given point and normal, returns texture coordinate.
 
int32_t getNum (int unit=0) const
 Returns the number of coordinate points in an instance.
 
SbBool is3D (int unit=0) const
 
SbBool isForceSending (int unit=0) const
 
const SbVec3fget3 (int index, int unit=0) const
 Returns the indexed coordinate from an element as a 3- or 4-vector, converting if necessary.
 
const SbVec4fget4 (int index, int unit=0) const
 
virtual void print (FILE *fp) const
 Prints element (for debugging).
 
virtual void push (SoState *)
 Overrides push() method to copy values from next instance in the stack.
 
- Public Member Functions inherited from SoElement
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 setDefault (SoState *state, SoNode *node)
 Sets the current texture coordinates, in any of several ways: EXPLICIT, no coordinates (shapes will generate):
 
static void setFunction (SoState *state, SoNode *node, SoTextureCoordinate3FunctionCB *func, void *userData, SbBool frcSend=FALSE)
 
static void set3 (SoState *state, SoNode *node, int32_t numCoords, const SbVec3f *coords, SbBool frcSend=FALSE)
 
static void set4 (SoState *state, SoNode *node, int32_t numCoords, const SbVec4f *coords, SbBool frcSend=FALSE)
 
static CoordType getType (SoState *state, int unit=0)
 Returns code indicating what has been set in state/element.
 
static const SoTextureCoordinate3ElementgetInstance (SoState *state)
 Returns the top (current) instance of the element in the state.
 
- Static Public Member Functions inherited from SoReplacedTextureElement
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

VSG extension Stores the current 3D texture coordinates.

This element stores the current 3D texture coordinates.

SEE ALSO

SoTextureCoordinate3, SoVertexProperty

Definition at line 58 of file SoTextureCoordinate3Element.h.

Member Typedef Documentation

◆ SoTextureCoordinate3FunctionCB

typedef const SbVec4f & SoTextureCoordinate3FunctionCB(void *userdata, const SbVec3f &point, const SbVec3f &normal)

Function that TextureCoordinateFunction nodes register to compute texture coordinates.

Given the point and normal, compute a texture coordinate and return it:

Definition at line 41 of file SoTextureCoordinate3Element.h.

Member Enumeration Documentation

◆ CoordType

The choice of values is for compatibility with Open Inventor 2.0 binary format files.

Enumerator
EXPLICIT 
FUNCTION 

Definition at line 67 of file SoTextureCoordinate3Element.h.

Member Function Documentation

◆ get()

const SbVec4f & SoTextureCoordinate3Element::get ( const SbVec3f point,
const SbVec3f normal,
int  unit = 0 
) const

Given point and normal, returns texture coordinate.

(The r coordinate will be 0.0 and the q will be 1.0 until we get 3D texture coordinate functions.)

◆ get3()

const SbVec3f & SoTextureCoordinate3Element::get3 ( int  index,
int  unit = 0 
) const

Returns the indexed coordinate from an element as a 3- or 4-vector, converting if necessary.

◆ get4()

const SbVec4f & SoTextureCoordinate3Element::get4 ( int  index,
int  unit = 0 
) const

◆ getClassStackIndex()

static int SoTextureCoordinate3Element::getClassStackIndex ( )
static

Returns the stack id for this element.


◆ getClassTypeId()

static SoType SoTextureCoordinate3Element::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getInstance()

static const SoTextureCoordinate3Element * SoTextureCoordinate3Element::getInstance ( SoState state)
static

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

The get routines are called on an instance because it is more efficient than calling a static method that looks up the element in the state for every coordinate.

◆ getNum()

int32_t SoTextureCoordinate3Element::getNum ( int  unit = 0) const

Returns the number of coordinate points in an instance.

◆ getType() [1/2]

virtual CoordType SoTextureCoordinate3Element::getType ( int  unit = 0) const
virtual

◆ getType() [2/2]

static CoordType SoTextureCoordinate3Element::getType ( SoState state,
int  unit = 0 
)
static

Returns code indicating what has been set in state/element.

◆ is3D()

SbBool SoTextureCoordinate3Element::is3D ( int  unit = 0) const

◆ isForceSending()

SbBool SoTextureCoordinate3Element::isForceSending ( int  unit = 0) const

◆ print()

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

Prints element (for debugging).

Reimplemented from SoReplacedTextureElement.

◆ push()

virtual void SoTextureCoordinate3Element::push ( SoState )
virtual

Overrides push() method to copy values from next instance in the stack.

Reimplemented from SoReplacedTextureElement.

◆ set3()

static void SoTextureCoordinate3Element::set3 ( SoState state,
SoNode node,
int32_t  numCoords,
const SbVec3f coords,
SbBool  frcSend = FALSE 
)
static

◆ set4()

static void SoTextureCoordinate3Element::set4 ( SoState state,
SoNode node,
int32_t  numCoords,
const SbVec4f coords,
SbBool  frcSend = FALSE 
)
static

◆ setDefault()

static void SoTextureCoordinate3Element::setDefault ( SoState state,
SoNode node 
)
static

Sets the current texture coordinates, in any of several ways: EXPLICIT, no coordinates (shapes will generate):

◆ setFunction()

static void SoTextureCoordinate3Element::setFunction ( SoState state,
SoNode node,
SoTextureCoordinate3FunctionCB func,
void *  userData,
SbBool  frcSend = FALSE 
)
static

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