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

The Rectangle2D node specifies a rectangle centred at (0, 0) in the current local 2D coordinate system and aligned with the local coordinate axes. More...

#include <H3D/Rectangle2D.h>

Inheritance diagram for H3D::Rectangle2D:

Inheritance graph

List of all members.

Classes

class  SFBound
 SFBound is specialized update itself from the size field of the Rectangle2D node. More...

Public Member Functions

 Rectangle2D (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< SFVec2f > _size=0, Inst< SFBool > _solid=0)
 Constructor.
virtual void render ()
 Renders the rectangle2D using OpenGL.
virtual void traverseSG (TraverseInfo &ti)
 Traverse the scenegraph.
virtual int nrTriangles ()
 The number of triangles rendered by this geometry.

Public Attributes

auto_ptr< SFVec2fsize
 The size field specifies the extents of the box along the X-, and Y-axes respectively and each component value shall be greater than zero.
auto_ptr< SFBoolsolid
 The solid field specifies if both sides of the rectangle should be rendered.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

The Rectangle2D node specifies a rectangle centred at (0, 0) in the current local 2D coordinate system and aligned with the local coordinate axes.

By default, the box measures 2 units in each dimension, from -1 to +1. The size field specifies the extents of the box along the X-, and Y-axes respectively and each component value shall be greater than zero.

Textures are applied individually to each face of the Rectangle2D. On the front (+Z) and back (-Z) faces of the Rectangle2D, 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. TextureTransform affects the texture coordinates of the Rectangle2D

Internal routes:
Rectangle2D.dot

Member Function Documentation

void Rectangle2D::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 size field specifies the extents of the box along the X-, and Y-axes respectively and each component value shall be greater than zero.

Access type: inputOutput
Default value: 2 2

Rectangle2D_size.dot

Referenced by Rectangle2D(), and render().

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

If solid is FALSE then both sides will be rendered.

Access type: inputOutput
Default value: FALSE

Rectangle2D_solid.dot

Referenced by Rectangle2D(), and traverseSG().


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

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