AlConeLight
 
 
 

Adds parameters for cone-shaped volume lights.

Synopsis

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

Description

A cone light allows light to exist inside the volume of a cone.

A cone light could be made similar to a spotlight by setting Concentric and radial to 0, directional to 1, decay to 0 and dropoff to slightly less than 1.

A cone light would make a good vortex field by setting the Radial to 1, concentric to .5, directional depending on whether the vortex is sucking up things or dropping them.

AlConeLight::AlConeLight()

Description

Constructs an AlConeLight wrapper object.

AlConeLight::~AlConeLight()

Description

Deletes an AlConeLight wrapper object.

statusCode AlConeLight::create()

Description

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

Return Codes

sSuccess - everything was successful

sInsufficientMemory - not enough memory available

sAlreadyCreated - light is already created

AlObjectType AlConeLight::type() const

Description

Returns the class identifier kConeLightType.

double AlConeLight::arc() const

Description

Returns the cone light’s arc (how much of the cone you actually have). This method returns -1 if the light is invalid.

double AlConeLight::coneEndRadius() const

Description

Returns the cone light’s coneEndRadius. This defines the shape of the cone. This method returns -1 if the light is invalid.

statusCode AlConeLight::setArc( double arc )

Description

Sets the arc of the light. The given arc must be in the range 0 to 360.

Arguments

< double arc - portion of the sphere to use

Return Codes

sSuccess - setting arc succeeded

sInvalidObject - not a valid volume light

sFailure - setting the arc failed

sInvalidArgument - the arc was not in the range of 0 to 360

statusCode AlConeLight::setConeEndRadius( double cone_end_radius )

Description

Sets the cone end radius of the light.

Arguments

< cone_end_radius - radius to set

Return Codes

sSuccess - setting the radius succeeded

sInvalidObject - the current light is not a valid volume light

sFailure - setting the radius failed