RenderWare V2.1

Previous Page Index Next Page

RwBool

RwCylinder(RwReal height, RwReal baserad, RwReal toprad,
RwInt32 nsides);

Description

Adds a cylinder to the current clump under construction. The cylinder is transformed by the CTM, and the current material is assigned to its polygons. The base of the cylinder lies on the X-Z plane, extending up the Y axis.

Arguments

height Cylinder height.

baserad Radius of the cylinder base.

toprad Radius of the cylinder top.

nsides Number of sides.

Return Value

TRUE if successful, and FALSE otherwise.

Comments

It is an error if the cylinder’s radius is degenerate, i.e., CREAL(0.0).

Note that if both baserad and toprad are negative the polygons forming the cylinder will face inward. It is an error if one of the radii is negative and the other is positive.

This function can only be called within the context of an RwClumpBegin()RwClumpEnd() or RwProtoBegin()RwProtoEnd() block.

See Also

RwBlock()

RwClumpBegin()

RwClumpEnd()

RwCone()

RwDisc()

RwHemisphere()

RwSphere()

RwProtoBegin()

RwProtoEnd()