50#ifndef _SO_TEXTURE_COORDINATE_ELEMENT
51#define _SO_TEXTURE_COORDINATE_ELEMENT
53#include <Inventor/SbLinear.h>
54#include <Inventor/elements/SoReplacedTextureElement.h>
55#include <Inventor/SbEnums.h>
58#include <Inventor/STL/vector>
114 int32_t numCoords,
const SbVec2f *coords,
121 int32_t numCoords,
const SbVec4f *coords,
181 virtual void commonInit();
184 virtual void init(
SoState *state);
191 class TexGenEvaluator
201 static void initClass();
202 static void exitClass();
208 struct SoTexCoordData
214 std::shared_ptr<TexGenEvaluator> m_texGenEvaluatorUserDefined;
241 m_texGenEvaluatorUserDefined.reset();
244 SoTexCoordData& operator=(
const SoTexCoordData& data)
248 whatKind = data.whatKind ;
249 numCoords = data.numCoords ;
250 coords2 = data.coords2 ;
251 coords4 = data.coords4 ;
252 coordsAre2D = data.coordsAre2D ;
253 forceSend = data.forceSend;
259 SoTexCoordData& getTexCoordData(
const int unit )
const;
268 typedef std::vector<SoTexCoordData> SoTexCoordDataList;
270 mutable SoTexCoordDataList m_texCoordData ;
Abstract base class for all database nodes.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
Stores the current texture coordinates.
SbBool isForceSending(int unit=0) const
const SbVec4f & SoTextureCoordinateFunctionCB(void *userdata, const SbVec3f &point, const SbVec3f &normal)
Function that TextureCoordinateFunction nodes register to compute texture coordinates.
virtual CoordType getType(int unit=0) const
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.
static const SoTextureCoordinateElement * getInstance(SoState *state)
Returns the top (current) instance of the element in the state.
virtual void push(SoState *)
Overrides push() method to copy values from next instance in the stack.
static void setDefault(SoState *state, SoNode *node)
Sets the current texture coordinates, in any of several ways: EXPLICIT, no coordinates (shapes will g...
static void set2(SoState *state, SoNode *node, int32_t numCoords, const SbVec2f *coords, SbBool frcSend=FALSE)
const SbVec4f & get4(int index, int unit=0) const
const SbVec2f & get2(int index, int unit=0) const
Returns the indexed coordinate from an element as a 2- or 4-vector, converting if necessary.
SbBool is2D(int unit=0) const
static void set4(SoState *state, SoNode *node, int32_t numCoords, const SbVec4f *coords, SbBool frcSend=FALSE)
static void setFunction(SoState *state, SoNode *node, SoTextureCoordinateFunctionCB *func, void *userData, SbBool frcSend=FALSE)
const SbVec4f & get(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.
static CoordType getType(SoState *state, int unit=0)
Returns code indicating what has been set in state/element.