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

The TriangleSet2D node specifies a set of triangles in the local 2D coordinate system. More...

#include <H3D/TriangleSet2D.h>

Inheritance diagram for H3D::TriangleSet2D:

Inheritance graph

List of all members.

Classes

class  SFBound
 SFBound is specialized update itself from the vertices field of the TriangleSet2D node. More...

Public Member Functions

 TriangleSet2D (Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< DisplayList > _displayList=0, Inst< MFBool > _isTouched=0, Inst< MFVec3f > _force=0, Inst< MFVec3f > _contactPoint=0, Inst< MFVec3f > _contactNormal=0, Inst< MFVec2f > _vertices=0, Inst< SFBool > _solid=0)
 Constructor.
virtual void render ()
 Renders the TriangleSet2D using OpenGL.
virtual void traverseSG (TraverseInfo &ti)
 Traverse the scenegraph.
virtual int nrTriangles ()
 The number of triangles renderered in this geometry.

Public Attributes

auto_ptr< MFVec2fvertices
 The vertices field specifies the triangles to be displayed.
auto_ptr< SFBoolsolid
 The solid field specifies if both sides of the closed arc should be rendered.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

The TriangleSet2D node specifies a set of triangles in the local 2D coordinate system.

The vertices field specifies the triangles to be displayed. The number of vertices provided shall be evenly divisible by three. Excess vertices shall be ignored.

Textures are applied individually to each face of the TriangleSet2D. On the front (+Z) and back (-Z) faces of the TriangleSet2D, when viewed from the +Z-axis, the texture is mapped onto each face with the same orientation as if the image were displayed normally in 2D.

Internal routes:
TriangleSet2D.dot

Member Function Documentation

void TriangleSet2D::traverseSG ( TraverseInfo ti  )  [virtual]

Traverse the scenegraph.

A HAPIHapticShape is added for haptic rendering if haptics is enabled.

Parameters:
ti The TraverseInfo object containing information about the traversal.

Reimplemented from H3D::X3DGeometryNode.

References solid, and H3D::X3DGeometryNode::useBackFaceCulling().


Member Data Documentation

The solid field specifies if both sides of the closed arc should be rendered.

If solid is FALSE then both sides will be rendered.

Access type: inputOutput
Default value: FALSE

TriangleSet2D_solid.dot

Referenced by traverseSG(), and TriangleSet2D().

The vertices field specifies the triangles to be displayed.

The number of vertices provided shall be evenly divisible by three. Excess vertices shall be ignored.

Access type: inputOutput

TriangleSet2D_vertices.dot

Referenced by render(), and TriangleSet2D().


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

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