|SFBound is specialized update itself from the radius and heigh field of the Cylinder node. More...|
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)|
|virtual void||render ()|
|Renders the Cylinder with OpenGL. |
|virtual void||traverseSG (TraverseInfo &ti)|
|Traverse the scenegraph. Adds a HapticCylinder if haptics is enabled. |
|virtual int||nrTriangles ()|
|The number of triangles rendered by this geometry. |
|auto_ptr< SFBool >||bottom|
|Specifies if the bottom of the Cylinder should be rendered or not. |
|auto_ptr< SFFloat >||height|
|The height of the Cylinder in meters. |
|auto_ptr< SFFloat >||radius|
|The radius of the Cylinder. |
|auto_ptr< SFBool >||side|
|Specifies if the sides of the Cylinder should be rendered or not. |
|auto_ptr< SFBool >||solid|
|The solid field determines whether the cylinder is visible when viewed from the inside. |
|auto_ptr< SFBool >||top|
|Specifies if the top of the cylinder should be rendered or not. |
Static Public Attributes
|The H3DNodeDatabase for this node. |
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.