24#ifndef _SO_TEXTURE_COORDINATE3_ELEMENT
25#define _SO_TEXTURE_COORDINATE3_ELEMENT
27#include <Inventor/SbLinear.h>
28#include <Inventor/elements/SoReplacedTextureElement.h>
29#include <Inventor/STL/vector>
89 int32_t numCoords,
const SbVec3f *coords,
96 int32_t numCoords,
const SbVec4f *coords,
156 virtual void commonInit();
159 virtual void init(
SoState *state);
163 static void initClass();
164 static void exitClass();
166 struct SoTexCoord3Data {
169 numCoords(0),coords3(NULL),coords4(NULL),coordsAre3D(FALSE),forceSend(FALSE)
173 SoTexCoord3Data& operator=(
const SoTexCoord3Data& data)
175 whatKind = data.whatKind ;
176 numCoords = data.numCoords ;
177 coords3 = data.coords3 ;
178 coords4 = data.coords4 ;
179 coordsAre3D = data.coordsAre3D ;
180 forceSend = data.forceSend;
195 SoTexCoord3Data& getData(
const size_t unit)
const;
202 void checkSize(
const size_t size)
const;
205 mutable std::vector<SoTexCoord3Data> m_texCoord3Data ;
Abstract base class for all database nodes.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Stores the curre...
const SbVec4f & get4(int index, int unit=0) const
const SbVec4f & SoTextureCoordinate3FunctionCB(void *userdata, const SbVec3f &point, const SbVec3f &normal)
Function that TextureCoordinateFunction nodes register to compute texture coordinates.
SbBool isForceSending(int unit=0) const
static CoordType getType(SoState *state, int unit=0)
Returns code indicating what has been set in state/element.
static void set4(SoState *state, SoNode *node, int32_t numCoords, const SbVec4f *coords, SbBool frcSend=FALSE)
static void setDefault(SoState *state, SoNode *node)
Sets the current texture coordinates, in any of several ways: EXPLICIT, no coordinates (shapes will g...
const SbVec3f & get3(int index, int unit=0) const
Returns the indexed coordinate from an element as a 3- or 4-vector, converting if necessary.
static void set3(SoState *state, SoNode *node, int32_t numCoords, const SbVec3f *coords, SbBool frcSend=FALSE)
const SbVec4f & get(const SbVec3f &point, const SbVec3f &normal, int unit=0) const
Given point and normal, returns texture coordinate.
virtual void print(FILE *fp) const
Prints element (for debugging).
CoordType
The choice of values is for compatibility with Open Inventor 2.0 binary format files.
virtual CoordType getType(int unit=0) const
int32_t getNum(int unit=0) const
Returns the number of coordinate points in an instance.
static const SoTextureCoordinate3Element * getInstance(SoState *state)
Returns the top (current) instance of the element in the state.
static void setFunction(SoState *state, SoNode *node, SoTextureCoordinate3FunctionCB *func, void *userData, SbBool frcSend=FALSE)
SbBool is3D(int unit=0) const
virtual void push(SoState *)
Overrides push() method to copy values from next instance in the stack.
Stores the current texture coordinates.