H3D::Color Class Reference
[X3D node classes.]

This node defines a set of RGB colours to be used in the fields of another node. More...

#include <H3D/Color.h>

Inheritance diagram for H3D::Color:

Inheritance graph

List of all members.

Public Member Functions

 Color (Inst< MFColor > _color=0, Inst< SFNode > _metadata=0)
 Constructor.
virtual RGBA getColor (unsigned int i)
 Get the color at index i.
virtual void render (int index)
 Perform the OpenGL commands to render a color given the index of the color.
virtual void renderArray ()
 Perform the OpenGL commands to render all verties as a vertex array.
virtual void disableArray ()
 Disable the array state enabled in renderArray().
virtual unsigned int nrAvailableColors ()
 Returns the number of color this color node can render.

Public Attributes

auto_ptr< MFColorcolor
 A vector of Color values.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

This node defines a set of RGB colours to be used in the fields of another node.

Color nodes are only used to specify multiple colours for a single geometric shape, such as colours for the faces or vertices of an IndexedFaceSet. A Material node is used to specify the overall material parameters of lit geometry. If both a Material node and a Color node are specified for a geometric shape, the colours shall replace the diffuse component of the material.

RGB or RGBA textures take precedence over colours; specifying both an RGB or RGBA texture and a Color node for geometric shape will result in the Color node being ignored.

Internal routes:
Color.dot

Member Function Documentation

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

Perform the OpenGL commands to render a color given the index of the color.

Installs the normal as a glColor3f.

Reimplemented from H3D::X3DColorNode.

void Color::renderArray (  )  [virtual]

Perform the OpenGL commands to render all verties as a vertex array.

Perform the OpenGL commands to render all verties as a vertex array.

Reimplemented from H3D::X3DColorNode.

References color.


Member Data Documentation

A vector of Color values.

Access type: inputOutput

Color_color.dot

Referenced by Color(), and renderArray().


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

Generated on Fri Nov 7 10:29:28 2008 for H3D API by  doxygen 1.5.7