H3D::X3DVertexAttributeNode Class Reference

This abstract node type is the base type for all node types that specify per-vertex attribute information to the shader. More...

#include <H3D/X3DVertexAttributeNode.h>

Inheritance diagram for H3D::X3DVertexAttributeNode:

Inheritance graph

List of all members.

Public Member Functions

 X3DVertexAttributeNode (Inst< SFNode > _metadata=0, Inst< SFString > _name=0)
 Constructor.
virtual void render (int value_index)
 Perform the OpenGL commands to set the vertex attribute with the given index.
virtual void renderArray ()
 Perform the OpenGL commands to set the vertex attributes as a an vertex attribute array on the attribute with the given index.
virtual void disableArray ()
 Disable the array state enabled in renderArray().
void setAttribIndex (int _attrib_index)
 Set the attribute index this vertex attribute should be rendered as.
virtual string defaultXMLContainerField ()
 Returns the default xml containerField attribute value.

Public Attributes

auto_ptr< SFStringname
 The name field describes a name that is mapped to the shading language-specific name for describing per-vertex data.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

This abstract node type is the base type for all node types that specify per-vertex attribute information to the shader.

The name field describes a name that is mapped to the shading language-specific name for describing per-vertex data.


Member Function Documentation

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

Returns the default xml containerField attribute value.

For this node it is "attrib".

Reimplemented from H3D::Node.

virtual void H3D::X3DVertexAttributeNode::render ( int  value_index  )  [inline, virtual]

Perform the OpenGL commands to set the vertex attribute with the given index.

value_index is the index of the value in the value field that is to be used. The vertex attribute will be rendered as the attribute index specified by the setAttribFunction.

Reimplemented in H3D::FloatVertexAttribute, H3D::Matrix3VertexAttribute, and H3D::Matrix4VertexAttribute.

Referenced by H3D::TriangleStripSet::render(), H3D::TriangleFanSet::render(), H3D::IndexedTriangleStripSet::render(), H3D::IndexedTriangleSet::render(), H3D::IndexedTriangleFanSet::render(), and H3D::IndexedFaceSet::render().

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

Perform the OpenGL commands to set the vertex attributes as a an vertex attribute array on the attribute with the given index.

Reimplemented in H3D::FloatVertexAttribute, H3D::Matrix3VertexAttribute, and H3D::Matrix4VertexAttribute.

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

void H3D::X3DVertexAttributeNode::setAttribIndex ( int  _attrib_index  )  [inline]

Set the attribute index this vertex attribute should be rendered as.

A non-positive value will cause the vertex attribute not be rendered at all.

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


Member Data Documentation

The name field describes a name that is mapped to the shading language-specific name for describing per-vertex data.

Access type: inputOutput
Default value: ""

Reimplemented from H3DUtil::RefCountedClass.

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


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

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