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

The Box node specifies a rectangular parallelepiped box centred at (0, 0, 0) in the local coordinate system and aligned with the local coordinate axes. More...

#include <H3D/Box.h>

Inheritance diagram for H3D::Box:

Inheritance graph

List of all members.

Classes

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

Public Member Functions

 Box (Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< SFVec3f > _size=0, Inst< SFBool > _solid=0)
 Constructor.
virtual void render ()
 Renders the Box using OpenGL.
virtual int nrTriangles ()
 The number of triangles rendered by this geometry.
virtual void traverseSG (TraverseInfo &ti)
 Traverse the scenegraph.

Public Attributes

auto_ptr< SFVec3fsize
 The size field specifies the extents of the box along the X-, Y-, and Z-axes respectively.
auto_ptr< SFBoolsolid
 The solid field determines whether the box is visible when viewed from the inside.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

The Box node specifies a rectangular parallelepiped box centred at (0, 0, 0) in the local 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-, Y-, and Z-axes respectively and each component value shall be greater than zero.

Textures are applied individually to each face of the box. On the front (+Z), back (-Z), right (+X), and left (-X) faces of the box, when viewed from the outside with the +Y-axis up, the texture is mapped onto each face with the same orientation as if the image were displayed normally in 2D. On the top face of the box (+Y), when viewed from above and looking down the Y-axis toward the origin with the -Z-axis as the view up direction, the texture is mapped onto the face with the same orientation as if the image were displayed normally in 2D. On the bottom face of the box (-Y), when viewed from below looking up the Y-axis toward the origin with the +Z-axis as the view up direction, the texture is mapped onto the face with the same orientation as if the image were displayed normally in 2D. TextureTransform affects the texture coordinates of the Box.

The solid field determines whether the box is visible when viewed from the inside.

Internal routes:
Box.dot

Member Function Documentation

void Box::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

auto_ptr< SFVec3f > H3D::Box::size

The size field specifies the extents of the box along the X-, Y-, and Z-axes respectively.

Access type: inputOutput

Box_size.dot

Referenced by Box(), and render().

auto_ptr< SFBool > H3D::Box::solid

The solid field determines whether the box is visible when viewed from the inside.

Access type: inputOutput

Box_solid.dot

Referenced by Box(), and traverseSG().


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

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