H3D::X3DComposedGeometryNode Class Reference
[Abstract nodes.]

This is the base node type for all composed 3D geometry in X3D. More...

#include <H3D/X3DComposedGeometryNode.h>

Inheritance diagram for H3D::X3DComposedGeometryNode:

Inheritance graph

List of all members.

Classes

class  DisplayList
 Display list is extended in order to set front sidedness of triangles outside the display list. More...

Public Types

typedef DependentSFNode
< X3DColorNode, FieldRef
< X3DGeometricPropertyNode,
Field,&X3DColorNode::propertyChanged > > 
SFColorNode
 The SFColorNode is dependent on the propertyChanged field of the contained X3DColorNode.
typedef DependentSFNode
< X3DCoordinateNode, FieldRef
< X3DGeometricPropertyNode,
Field,&X3DCoordinateNode::propertyChanged > > 
SFCoordinateNode
 The SFCoordinateNode is dependent on the propertyChanged field of the contained X3DCoordinateNode.
typedef DependentSFNode
< X3DNormalNode, FieldRef
< X3DGeometricPropertyNode,
Field,&X3DNormalNode::propertyChanged > > 
SFNormalNode
 The SFNormalNode is dependent on the propertyChanged field of the contained X3DNormalNode.
typedef DependentSFNode
< X3DTextureCoordinateNode,
FieldRef
< X3DGeometricPropertyNode,
Field,&X3DTextureCoordinateNode::propertyChanged > > 
SFTextureCoordinateNode
 The SFTextureCoordinteNode is dependent on the propertyChanged field of the contained X3DTextureCoordinateNode.
typedef DependentMFNode
< X3DVertexAttributeNode,
FieldRef
< X3DGeometricPropertyNode,
Field,&X3DVertexAttributeNode::propertyChanged > > 
MFVertexAttributeNode
 The MFVertexAttributeNode is dependent on the propertyChanged field of the contained X3DVertexAttributeNode.
typedef DependentSFNode
< FogCoordinate, FieldRef
< X3DGeometricPropertyNode,
Field,&FogCoordinate::propertyChanged > > 
SFFogCoordinate
 The SFFogCoordinate is dependent on the propertyChanged.

Public Member Functions

virtual void startTexGen (X3DTextureCoordinateNode *tex_coord)
 Start texture coordinate generation.
virtual void stopTexGen (X3DTextureCoordinateNode *tex_coord)
 Stop texture coordinate generation.
virtual void renderTexCoord (int index, X3DTextureCoordinateNode *tc)
 Render the texure coordinate with the given index from the tc argument.
virtual void renderTexCoordArray (X3DTextureCoordinateNode *tc)
 Render the X3DTextureCoordinate as an array.
virtual void disableTexCoordArray (X3DTextureCoordinateNode *tc)
 Disable the arrays that were enabled in renderTexCoordArray().
 X3DComposedGeometryNode (Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< DisplayList > _displayList=0, Inst< SFColorNode > _color=0, Inst< SFCoordinateNode > _coord=0, Inst< SFNormalNode > _normal=0, Inst< SFTextureCoordinateNode > _texCoord=0, Inst< SFBool > _ccw=0, Inst< SFBool > _colorPerVertex=0, Inst< SFBool > _normalPerVertex=0, Inst< SFBool > _solid=0, Inst< MFVertexAttributeNode > _attrib=0, Inst< SFFogCoordinate > _fogCoord=0)
 Constructor.

Public Attributes

auto_ptr< SFColorNodecolor
 Contains an X3DColorNode whose colors are applied to the X3DComposedGeometryNode.
auto_ptr< SFCoordinateNodecoord
 An X3DCoordinate node with the coordinates to use.
auto_ptr< SFNormalNodenormal
 Contains an X3DNormalNode which colors are applied to the X3DComposedGeometryNode.
auto_ptr< SFTextureCoordinateNodetexCoord
 Contains an X3DTextureCoordinateNode which colors are applied to the X3DComposedGeometryNode.
auto_ptr< SFBoolccw
 The ccw field defines the ordering of the vertex coordinates of the geometry with respect to user-given or automatically generated normal vectors used in the lighting model equations.
auto_ptr< SFBoolcolorPerVertex
 If TRUE the colors in the color field is applied per vertex, otherwise it is applied per face.
auto_ptr< SFBoolnormalPerVertex
 If TRUE the normals in the normal field is applied per vertex, otherwise it is applied per face.
auto_ptr< SFBoolsolid
 The solid field determines whether one or both sides of each polygon shall be displayed.
auto_ptr< MFVertexAttributeNodeattrib
 If the attrib field is not empty it shall contain a list of X3DVertexAttributeNode instances with per-vertex attribute information for programmable shaders.
auto_ptr< SFFogCoordinatefogCoord
 If the fogCoord field is not empty, it shall contain a list of per-vertex depth values for calculating fog depth.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

This is the base node type for all composed 3D geometry in X3D.

A composed geometry node type defines an abstract type that composes geometry from a set of nodes that define individual components. Composed geometry may have color, coordinates, normal and texture coordinates supplied. The rendered output of the combination of these is dependent on the concrete node definition. However, in general, the following rules shall be applied for all nodes:

If the texCoord field is not NULL, it shall contain a TextureCoordinate node.

If the attrib field is not empty it shall contain a list of X3DVertexAttributeNode instances with per-vertex attribute information for programmable shaders.

If the fogCoord field is not empty, it shall contain a list of per-vertex depth values for calculating fog depth.

Internal routes:
X3DComposedGeometryNode.dot

Member Typedef Documentation

The MFVertexAttributeNode is dependent on the propertyChanged field of the contained X3DVertexAttributeNode.

The SFColorNode is dependent on the propertyChanged field of the contained X3DColorNode.

The SFCoordinateNode is dependent on the propertyChanged field of the contained X3DCoordinateNode.

The SFFogCoordinate is dependent on the propertyChanged.

field of the contained FogCoordinate.

The SFNormalNode is dependent on the propertyChanged field of the contained X3DNormalNode.

The SFTextureCoordinteNode is dependent on the propertyChanged field of the contained X3DTextureCoordinateNode.


Member Function Documentation

void X3DComposedGeometryNode::renderTexCoord ( int  index,
X3DTextureCoordinateNode tc 
) [virtual]

Render the texure coordinate with the given index from the tc argument.

If the currently active texture is a MultiTexture the texture coordinate will be rendered for the texture units of all textures in MultiTexture. tc must not be NULL.

References H3D::X3DTextureCoordinateNode::renderForActiveTexture().

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

void X3DComposedGeometryNode::renderTexCoordArray ( X3DTextureCoordinateNode tc  )  [virtual]

Render the X3DTextureCoordinate as an array.

If the currently active texture is a MultiTexture it will be rendered for the texture units of all textures in MultiTexture. tc must not be NULL.

References H3D::X3DTextureCoordinateNode::renderArrayForActiveTexture().

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

void X3DComposedGeometryNode::startTexGen ( X3DTextureCoordinateNode tex_coord  )  [virtual]

Start texture coordinate generation.

Texture coordinates will be generated for all texture units used by the currently active texture. If tex_coord is NULL then texture coordinates will be generated from the bounding box of the geometry as defined in the X3D specification. If tex_coord is not NULL then we use the TextureCoordinateGenerator to define the texture coordinate generation.

References H3D::H3DBoundedObject::bound, H3D::BoxBound::center, H3D::X3DTextureNode::getActiveTexture(), H3D_FULL_LOCATION, H3DAbs(), H3D::BoxBound::size, H3D::X3DTextureCoordinateNode::startTexGenForActiveTexture(), and H3D::MultiTexture::texture.

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


Member Data Documentation

If the attrib field is not empty it shall contain a list of X3DVertexAttributeNode instances with per-vertex attribute information for programmable shaders.

Access type: inputOutput

X3DComposedGeometryNode_attrib.dot

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

The ccw field defines the ordering of the vertex coordinates of the geometry with respect to user-given or automatically generated normal vectors used in the lighting model equations.

If ccw is TRUE, the normals shall follow the right hand rule; the orientation of each normal with respect to the vertices (taken in order) shall be such that the vertices appear to be oriented in a counterclockwise order when the vertices are viewed (in the local coordinate system of the Shape) from the opposite direction as the normal. If ccw is FALSE, the normals shall be oriented in the opposite direction. If normals are not generated but are supplied using a Normal node, and the orientation of the normals does not match the setting of the ccw field, results are undefined.

Access type: inputOutput
Default value: TRUE

X3DComposedGeometryNode_ccw.dot

Referenced by H3D::X3DComposedGeometryNode::DisplayList::callList(), H3D::IndexedFaceSet::IndexedFaceSet(), H3D::IndexedTriangleFanSet::IndexedTriangleFanSet(), H3D::IndexedTriangleSet::IndexedTriangleSet(), H3D::IndexedTriangleStripSet::IndexedTriangleStripSet(), H3D::TriangleFanSet::TriangleFanSet(), H3D::TriangleSet::TriangleSet(), H3D::TriangleStripSet::TriangleStripSet(), and X3DComposedGeometryNode().

Contains an X3DColorNode whose colors are applied to the X3DComposedGeometryNode.

If the color field is NULL, the geometry shall be rendered normally using the Material and texture defined in the Appearance node

Access type: inputOutput

X3DComposedGeometryNode_color.dot

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

If TRUE the colors in the color field is applied per vertex, otherwise it is applied per face.

Access type: inputOutput
Default value: TRUE

X3DComposedGeometryNode_colorPerVertex.dot

Referenced by H3D::IndexedFaceSet::IndexedFaceSet(), H3D::IndexedFaceSet::render(), and X3DComposedGeometryNode().

If the fogCoord field is not empty, it shall contain a list of per-vertex depth values for calculating fog depth.

Access type: inputOutput

X3DComposedGeometryNode_fogCoord.dot

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

Contains an X3DNormalNode which colors are applied to the X3DComposedGeometryNode.

If the normal field is NULL, the normals are automatically generated in accordance with the node's definition. If the node does not define a behaviour, the default is to generate an averaged normal for all faces that share that vertex.

Access type: inputOutput

X3DComposedGeometryNode_normal.dot

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

The solid field determines whether one or both sides of each polygon shall be displayed.

If solid is FALSE, each polygon shall be visible regardless of the viewing direction (i.e., no backface culling shall be done, and two sided lighting shall be performed to illuminate both sides of lit surfaces). If solid is TRUE, back face culling will be performed.

Access type: inputOutput
Default value: TRUE

X3DComposedGeometryNode_ccw.dot

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


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

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