AlSphereLight
 
 
 

Add parameters for sphere-shaped volume light.

Synopsis

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

Description

A sphere light is a volume light where light exists within a sphere. There are no additional parameters other than those already on the volume light.

AlSphereLight::AlSphereLight()

Description

Constructs an AlSphereLight wrapper object.

AlSphereLight::~AlSphereLight()

Description

Deletes an AlSphereLight wrapper object.

statusCode AlSphereLight::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

AlObjectType AlSphereLight::type() const

Description

Returns the class identifier kSphereLightType.

double AlSphereLight::arc() const

Description

Returns the sphere lights arc (that is, how much of the sphere we actually have). This method returns -1 if the light is invalid.

statusCode AlSphereLight::setArc( double arc )

Description

Sets the sector of the sphere that the arc will sweep out. The given arc must be in the range 0 - 360.

Arguments

< double arc - portion of the sphere to use

Return Codes

sSuccess - setting arc succeeded

sInvalidObject - not a valid volume light

sInvalidArgument - arc out of the range 0..360

sFailure - an error occurred