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

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

#include <H3D/ColorRGBA.h>

Inheritance diagram for H3D::ColorRGBA:

Inheritance graph

List of all members.

Public Member Functions

 ColorRGBA (Inst< MFColorRGBA > _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 void preRender ()
 Enable state needed before rendering the color.
virtual void postRender ()
 Disable state set in preRender() function.
virtual unsigned int nrAvailableColors ()
 Returns the number of color this color node can render.

Public Attributes

auto_ptr< MFColorRGBAcolor
 A vector of ColorRGBA values.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

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

RGBA color nodes are only used to specify multiple colours with alpha 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 ColorRGBA node are specified for a geometric shape, the colours shall replace the diffuse and transparency components 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:
ColorRGBA.dot

Member Function Documentation

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

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

Installs the normal as a glColor4f.

Reimplemented from H3D::X3DColorNode.

void ColorRGBA::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 ColorRGBA values.

Access type: inputOutput

ColorRGBA_color.dot

Referenced by ColorRGBA(), and renderArray().


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

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