GenCylinder Class Reference
 
 
 
GenCylinder Class Reference

#include <simpobj.h>

Inheritance diagram for GenCylinder:
SimpleObject GeomObject Object BaseObject ReferenceTarget ReferenceMaker Animatable InterfaceServer Noncopyable MaxHeapOperators MaxHeapOperators

Class Description

See also:
Class SimpleObject.

Description:
This class provides a method that is used to set the parameters of a cylinder object. This allows the object to be created programmatically. All methods of this class are implemented by the system.

Public Member Functions

virtual void  SetParams (float rad, float height, int segs, int sides, int capsegs=1, BOOL smooth=TRUE, BOOL genUV=TRUE, BOOL sliceOn=FALSE, float slice1=0.0f, float slice2=0.0f)=0

Member Function Documentation

virtual void SetParams ( float  rad,
float  height,
int  segs,
int  sides,
int  capsegs = 1,
BOOL  smooth = TRUE,
BOOL  genUV = TRUE,
BOOL  sliceOn = FALSE,
float  slice1 = 0.0f,
float  slice2 = 0.0f 
) [pure virtual]
Remarks:
This method is used to set the parameter of the cylinder object.
Parameters:
float rad

The radius.

float height

The height.

int segs

The number of segments.

int sides

The number of sides.

int capsegs=1

The number of segments in the cylinder cap.

BOOL smooth=TRUE

Smoothing flag.

BOOL genUV=TRUE

Generate UV coordinates flag.

BOOL sliceOn= FALSE

Slice the cylinder flag.

float slice1 = 0.0f

Slice angle1 in radians.

float slice2 = 0.0f

Slice angle2 in radians.
Sample Code:
The following code demonstrates the creation of the object and the setting of its parameters:

GenCylinder *gc = (GenCylinder *)CreateInstance(GEOMOBJECT_CLASS_ID, CYLINDER_CLASS_ID);

gc->SetParams(10.0f, 50.0f, 1, 1);