AlTorusLight
 
 
 

Add parameters for torus light.

Synopsis

#include <AlTorusLight.h>
class AlTorusLight: public AlVolumeLight
AlTorusLight();
virtual	~AlTorusLight();
virtual AlObject*	copyWrapper() const;
statusCode	create();
AlObjectType	type() const;
double	arc() const;
double	torusRadius() const;
statusCode	setArc(double);
statusCode	setTorusRadius(double);

Description

A torus light creates light within a donut. The relative thickness of the donut is set determined by the TorusRadius. The arc determines whether you get the whole torus or just a wedge cut out of a torus.

Torus lights are good for halo-shaped particle system effects.

AlTorusLight::AlTorusLight()

Description

Constructs an AlTorusLight wrapper object.

AlTorusLight::~AlTorusLight()

Description

Deletes an AlTorusLight wrapper object.

statusCode AlTorusLight::create()

Description

Creates all the DAG nodes for this light and adds them to the universe. The DAG nodes are for ’position’, ’look at’ and ’up’, and another DAG node that groups these three together.

Return Codes

sSuccess - everything was successful

sInsufficientMemory - not enough memory available

sAlreadyCreated - light is already created

AlObjectType AlTorusLight::type() const

Description

Returns the class identifier kTorusLightType.

double AlTorusLight::arc() const

Description

Returns the sphere light’s arc (that is, how much of the sphere we actually have). -1 is returned if the light is invalid.

double AlTorusLight::torusRadius() const

Description

Returns the sphere light’s radius. -1 is returned if the light is invalid.

statusCode AlTorusLight::setArc( double arc )

Description

Sets the arc of the light.

Arguments

< double arc - portion of the sphere to use from 0 to 360 degrees

Return Codes

sSuccess - setting arc succeeded

sInvalidObject - not a valid volume light

sInvalidArgument - arc out of range

sFailure - an error occurred

statusCode AlTorusLight::setTorusRadius( double torus_radius )

Description

Sets the radius of the light.

Arguments

< double arc - the radius of the sphere to use (must be greater than 0)

Return Codes

sSuccess - setting the radius succeeded

sInvalidObject - not a valid volume light

sInvalidArgument - the radius is less than 0

sFailure - an error occurred