H3D::X3DTextureCoordinateNode Class Reference
[Abstract nodes.]

This abstract node type is the base type for all node types which specify texture coordinates. More...

#include <H3D/X3DTextureCoordinateNode.h>

Inheritance diagram for H3D::X3DTextureCoordinateNode:

Inheritance graph

List of all members.

Public Member Functions

 X3DTextureCoordinateNode (Inst< SFNode > _metadata=0)
 Constructor.
virtual bool supportsExplicitTexCoords ()
 Returns true if the node supports rendering of explicit texture coordinates.
virtual void render (int index)
 Perform the OpenGL commands to render a texture coordinate given the index of the texture coordinate.
virtual void renderForTextureUnit (int index, unsigned int texture_unit)
 Render the texture coordinate for given texture unit.
void renderForTextureUnits (int index, unsigned int start_unit, unsigned int end_unit)
 Render the texture coordinate for the texture units between and including start_unit and end_unit.
void renderForActiveTexture (int index)
 Render the texture coordinate for all texture units used by the texture in X3DTextureNode::getActiveTexture.
void renderForTexture (int index, X3DTextureNode *t)
 Render the texture coordinate for all texture units used by the texture.
virtual unsigned int nrAvailableTexCoords ()
 Returns the number of texture coordinates this node can render.
virtual void renderArray ()
 Perform the OpenGL commands to render all texture coordinates as an arary.
void renderArrayForTexture (X3DTextureNode *t)
 Render the texture coordinate for all texture units used by the texture.
void renderArrayForActiveTexture ()
 Render the texture coordinate for all texture units used by the texture in X3DTextureNode::getActiveTexture.
virtual void renderArrayForTextureUnit (unsigned int texture_unit)
 Perform the OpenGL commands to render all texture coordinates as an array for the given texture unit.
void renderArrayForTextureUnits (unsigned int start_unit, unsigned int end_unit)
 Perform the OpenGL commands to render all texture coordinates as an array for the texture units between and including start_unit and end_unit.
virtual void disableArray ()
 Disable the array state enabled in renderArray().
void disableArrayForTexture (X3DTextureNode *t)
 Disable the array state enabled in renderArrayForTexture.
void disableArrayForActiveTexture ()
 Disable the array state enabled in renderArrayForActiveTexture.
virtual void disableArrayForTextureUnit (unsigned int texture_unit)
 Disable the array state enabled in renderArrayForTextureUnit().
void disableArrayForTextureUnits (unsigned int start_unit, unsigned int end_unit)
 Disable the array state enabled in renderArrayForTextureUnits().
virtual bool supportsTexGen ()
 Returns true if the node supports rendering of explicit texture coordinates.
virtual void startTexGen ()
 Start hardware texture coordinate generation.
virtual void stopTexGen ()
 Stop the texture coordinate generation started with startTexGen().
virtual void startTexGenForTexture (X3DTextureNode *t)
 Start hardware texture coordinate generateion for all texture units used by the texture.
void startTexGenForActiveTexture ()
 Start hardware texture coordinate generateion for all texture units used by the texture in X3DTextureNode::getActiveTexture.
virtual void stopTexGenForTexture (X3DTextureNode *t)
 Stop texture coordinate generateion for all texture units used by the texture.
void stopTexGenForActiveTexture ()
 Stop hardware texture coordinate generateion for all texture units used by the texture in X3DTextureNode::getActiveTexture.
void startTexGenForTextureUnits (unsigned int start_unit, unsigned int end_unit)
 Start hardware texture coordinate generation for the texture units between and including start_unit and end_unit.
virtual void startTexGenForTextureUnit (unsigned int texture_unit)
 Start hardware texture coordinate generation for the texture unit specified.
void stopTexGenForTextureUnits (unsigned int start_unit, unsigned int end_unit)
 Stop the texture coordinate generation started with startTexGenForTextureUnits().
virtual void stopTexGenForTextureUnit (unsigned int texture_unit)
 Stop hardware texture coordinate generation for the texture unit specified.
virtual string defaultXMLContainerField ()
 Returns the default xml containerField attribute value.

Static Public Member Functions

static void renderTexCoordForActiveTexture (const Vec3f &tc)
 Render the texture coordinate for all texture units used by the texture in X3DTextureNode::getActiveTexture.
static void renderTexCoordForTexture (const Vec3f &tc, X3DTextureNode *t)
 Render the texture coordinate for all texture units used by the given texture .


Detailed Description

This abstract node type is the base type for all node types which specify texture coordinates.

It adds a new geometric property node type to those specified in 11 Rendering component.

Texture coordinate nodes comes in two flavours, types that generate texture coordinates and nodes that specify the texture coordinates explicitly. There are two groups of functions, one for each of the types. When a user wants to use a function he should first check if it is supported by calling the supportsExplicitTexCoords() and supportsTexGen() functions.


Member Function Documentation

virtual string H3D::X3DTextureCoordinateNode::defaultXMLContainerField (  )  [inline, virtual]

Returns the default xml containerField attribute value.

For this node it is "texCoord".

Reimplemented from H3D::Node.

virtual unsigned int H3D::X3DTextureCoordinateNode::nrAvailableTexCoords (  )  [inline, virtual]

Returns the number of texture coordinates this node can render.

-1 means that the node is a texture coordinate generator in which case nr available coords has no meaning.

Reimplemented in H3D::MultiTextureCoordinate, H3D::TextureCoordinate, H3D::TextureCoordinate3D, and H3D::TextureCoordinate4D.

Referenced by H3D::MultiTextureCoordinate::nrAvailableTexCoords(), H3D::TriangleStripSet::render(), H3D::TriangleSet::render(), H3D::TriangleFanSet::render(), H3D::IndexedTriangleStripSet::render(), H3D::IndexedTriangleSet::render(), and H3D::IndexedTriangleFanSet::render().

virtual void H3D::X3DTextureCoordinateNode::render ( int  index  )  [inline, virtual]

Perform the OpenGL commands to render a texture coordinate given the index of the texture coordinate.

Reimplemented in H3D::MultiTextureCoordinate, H3D::TextureCoordinate, H3D::TextureCoordinate3D, and H3D::TextureCoordinate4D.

virtual void H3D::X3DTextureCoordinateNode::renderArray (  )  [inline, virtual]

Perform the OpenGL commands to render all texture coordinates as an arary.

Reimplemented in H3D::MultiTextureCoordinate, H3D::TextureCoordinate, H3D::TextureCoordinate3D, and H3D::TextureCoordinate4D.

Referenced by renderArrayForTextureUnit().

void X3DTextureCoordinateNode::renderArrayForActiveTexture (  ) 

Render the texture coordinate for all texture units used by the texture in X3DTextureNode::getActiveTexture.

References H3D::X3DTextureNode::getActiveTexture(), and renderArrayForTexture().

Referenced by H3D::X3DComposedGeometryNode::renderTexCoordArray().

void X3DTextureCoordinateNode::renderArrayForTextureUnit ( unsigned int  texture_unit  )  [virtual]

Perform the OpenGL commands to render all texture coordinates as an array for the given texture unit.

Reimplemented in H3D::MultiTextureCoordinate.

References renderArray().

Referenced by renderArrayForTexture(), H3D::MultiTextureCoordinate::renderArrayForTextureUnit(), and renderArrayForTextureUnits().

void X3DTextureCoordinateNode::renderArrayForTextureUnits ( unsigned int  start_unit,
unsigned int  end_unit 
)

Perform the OpenGL commands to render all texture coordinates as an array for the texture units between and including start_unit and end_unit.

References renderArrayForTextureUnit().

Referenced by renderArrayForTexture().

void X3DTextureCoordinateNode::renderForActiveTexture ( int  index  ) 

Render the texture coordinate for all texture units used by the texture in X3DTextureNode::getActiveTexture.

References H3D::X3DTextureNode::getActiveTexture(), and renderForTexture().

Referenced by H3D::ElevationGrid::render(), and H3D::X3DComposedGeometryNode::renderTexCoord().

void X3DTextureCoordinateNode::renderForTextureUnits ( int  index,
unsigned int  start_unit,
unsigned int  end_unit 
)

Render the texture coordinate for the texture units between and including start_unit and end_unit.

References renderForTextureUnit().

void X3DTextureCoordinateNode::renderTexCoordForActiveTexture ( const Vec3f &  tc  )  [static]

Render the texture coordinate for all texture units used by the texture in X3DTextureNode::getActiveTexture.

References H3D::X3DTextureNode::getActiveTexture(), and renderTexCoordForTexture().

void X3DTextureCoordinateNode::renderTexCoordForTexture ( const Vec3f &  tc,
X3DTextureNode t 
) [static]

Render the texture coordinate for all texture units used by the given texture .

References H3D::MultiTexture::texture.

Referenced by renderTexCoordForActiveTexture().

virtual void H3D::X3DTextureCoordinateNode::startTexGen (  )  [inline, virtual]

Start hardware texture coordinate generation.

Algorithm depends on the texture coordinate node

Reimplemented in H3D::MultiTextureCoordinate, and H3D::TextureCoordinateGenerator.

Referenced by startTexGenForTextureUnit().

void X3DTextureCoordinateNode::startTexGenForActiveTexture (  ) 

Start hardware texture coordinate generateion for all texture units used by the texture in X3DTextureNode::getActiveTexture.

References H3D::X3DTextureNode::getActiveTexture(), and startTexGenForTexture().

Referenced by H3D::X3DComposedGeometryNode::startTexGen().

void X3DTextureCoordinateNode::startTexGenForTextureUnit ( unsigned int  texture_unit  )  [virtual]

Start hardware texture coordinate generation for the texture unit specified.

Algorithm depends on the texture coordinate node

Reimplemented in H3D::MultiTextureCoordinate.

References startTexGen().

Referenced by startTexGenForTexture(), H3D::MultiTextureCoordinate::startTexGenForTextureUnit(), and startTexGenForTextureUnits().

void X3DTextureCoordinateNode::startTexGenForTextureUnits ( unsigned int  start_unit,
unsigned int  end_unit 
)

Start hardware texture coordinate generation for the texture units between and including start_unit and end_unit.

Algorithm depends on the texture coordinate node

References startTexGenForTextureUnit().

Referenced by startTexGenForTexture().

void X3DTextureCoordinateNode::stopTexGenForActiveTexture (  ) 

Stop hardware texture coordinate generateion for all texture units used by the texture in X3DTextureNode::getActiveTexture.

References H3D::X3DTextureNode::getActiveTexture(), and stopTexGenForTexture().

Referenced by H3D::X3DComposedGeometryNode::stopTexGen().

void X3DTextureCoordinateNode::stopTexGenForTextureUnit ( unsigned int  texture_unit  )  [virtual]

Stop hardware texture coordinate generation for the texture unit specified.

Algorithm depends on the texture coordinate node

Reimplemented in H3D::MultiTextureCoordinate.

References stopTexGen().

Referenced by stopTexGenForTexture(), H3D::MultiTextureCoordinate::stopTexGenForTextureUnit(), and stopTexGenForTextureUnits().

void X3DTextureCoordinateNode::stopTexGenForTextureUnits ( unsigned int  start_unit,
unsigned int  end_unit 
)

Stop the texture coordinate generation started with startTexGenForTextureUnits().

References stopTexGenForTextureUnit().

Referenced by stopTexGenForTexture().

virtual bool H3D::X3DTextureCoordinateNode::supportsExplicitTexCoords (  )  [inline, virtual]

virtual bool H3D::X3DTextureCoordinateNode::supportsTexGen (  )  [inline, virtual]


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

Generated on Fri Nov 7 10:31:32 2008 for H3D API by  doxygen 1.5.7