Archon::X3D::Cylinder Struct Reference

Server side representation of the equally named X3D node type. More...

#include <archon/x3d/server/geometry.H>

Inheritance diagram for Archon::X3D::Cylinder:

Inheritance graph
[legend]
Collaboration diagram for Archon::X3D::Cylinder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

const NodeTypegetType () const
 Cylinder (BackRef< ExecutionContext > c)
double getHeight () const
double getRadius () const
bool getSide () const
bool getTop () const
bool getBottom () const
int intersect (const Math::Ray3 &, double &dist) const
void getNormalAndTexCoord (Vector3 hitPoint, int where, const Shape *, Vector3 *hitNormal, Vector2 *hitTexCoord) const
void render (bool texture, const Shape *shape, const RenderConfig *)

Static Public Member Functions

static Ref< NodeBaseinstantiate (BackRef< ExecutionContext > c)

Static Public Attributes

static const NodeTypetype = 0

Friends

void initializeGeometryComponent ()

Detailed Description

Server side representation of the equally named X3D node type.

The Cylinder node specifies a capped cylinder centred at the origin of the local coordinate system and with a central axis oriented along the local Y-axis. The radius field specifies the radius of the cylinder and the height field specifies the height of the cylinder along the central axis. The default height is 2 and the default radius is 1.

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.

Definition at line 314 of file geometry.H.


Member Function Documentation

int Archon::X3D::Cylinder::intersect const Math::Ray3 ray,
double &  dist
const [virtual]
 

Todo:
Is it correct to considder a cylinder with missing parts as non-solid and a cylinder with all parts enabled as a solid object? (I think I saw a confirmation of this somewhere in the spec -KKS)

Implements Archon::X3D::GeometryNode.

Definition at line 474 of file geometry.C.

References Archon::Math::intersectCylinder().


The documentation for this struct was generated from the following files:
Generated on Sun Jul 30 22:59:24 2006 for Archon by  doxygen 1.4.4