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

The Cylinder node specifies a capped cylinder centred at (0,0,0) in the local coordinate system and with a central axis oriented along the local Y-axis. More...

#include <Cylinder.h>

Inheritance diagram for H3D::Cylinder:

Inheritance graph
List of all members.

Public Member Functions

 Cylinder (Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< SFBool > _bottom=0, Inst< SFFloat > _height=0, Inst< SFFloat > _radius=0, Inst< SFBool > _side=0, Inst< SFBool > _solid=0, Inst< SFBool > _top=0)
 Constructor.
virtual void render ()
 Renders the Cylinder with OpenGL.

Public Attributes

auto_ptr< SFBoolbottom
 Specifies if the bottom of the Cylinder should be rendered or not.
auto_ptr< SFFloatheight
 The height of the Cylinder in meters.
auto_ptr< SFFloatradius
 The radius of the Cylinder.
auto_ptr< SFBoolside
 Specifies if the sides of the Cylinder should be rendered or not.
auto_ptr< SFBoolsolid
 The solid field determines whether the cylinder is visible when viewed from the inside.
auto_ptr< SFBooltop
 Specifies if the top of the cylinder should be rendered or not.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.

Classes

class  SFBound
 SFBound is specialized update itself from the radius and heigh field of the Cylinder node. More...

Detailed Description

The Cylinder node specifies a capped cylinder centred at (0,0,0) in the local coordinate system and with a central axis oriented along the local Y-axis.

By default, the cylinder is sized at "-1" to "+1" in all three dimensions. The radius field specifies the radius of the cylinder and the height field specifies the height of the cylinder along the central axis. Both radius and height shall be greater than zero.

The cylinder has three parts: the side, the top (Y = +height/2) and the bottom (Y = height/2). Each part has an associated SFBool field that indicates whether the part exists (TRUE) or does not exist (FALSE). Parts which do not exist are not rendered and not eligible for intersection tests (EXAMPLE collision detection or sensor activation).

When a texture is applied to a cylinder, it is applied differently to the sides, top, and bottom. On the sides, the texture wraps counterclockwise (from above) starting at the back of the cylinder. The texture has a vertical seam at the back, intersecting the X=0 plane. For the top and bottom caps, a circle is cut out of the unit texture squares centred at (0, +-height/2, 0) with dimensions 2 X radius by 2 X radius. The top texture appears right side up when the top of the cylinder is tilted toward the +Z-axis, and the bottom texture appears right side up when the top of the cylinder is tilted toward the Z-axis. TextureTransform affects the texture coordinates of the Cylinder node.

The solid field determines whether the cylinder is visible when viewed from the inside. If solid is false both sides of the cylinder will be rendered.

Internal routes:
Cylinder.dot


Member Data Documentation

auto_ptr< SFBool > H3D::Cylinder::bottom
 

Specifies if the bottom of the Cylinder should be rendered or not.

Access type: inputOutput
Default value: TRUE

Cylinder_bottom.dot

auto_ptr< SFFloat > H3D::Cylinder::height
 

The height of the Cylinder in meters.

Access type: inputOutput
Default value: 2
Valid range: >0

Cylinder_height.dot

auto_ptr< SFFloat > H3D::Cylinder::radius
 

The radius of the Cylinder.

Access type: inputOutput
Default value: 1
Valid range: >0

Cylinder_radius.dot

auto_ptr< SFBool > H3D::Cylinder::side
 

Specifies if the sides of the Cylinder should be rendered or not.

Access type: inputOutput
Default value: TRUE

Cylinder_side.dot

auto_ptr< SFBool > H3D::Cylinder::solid
 

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

If solid is false both sides of the sphere will be rendered.

Access type: inputOutput
Default value: TRUE

Cylinder_top.dot

auto_ptr< SFBool > H3D::Cylinder::top
 

Specifies if the top of the cylinder should be rendered or not.

Access type: inputOutput
Default value: TRUE

Cylinder_top.dot


Generated on Thu Aug 24 12:38:58 2006 for H3D API by  doxygen 1.4.5