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;
AlConeLight* asConeLightPtr();
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.

Summary

AlConeLight::AlConeLight()

Description

Constructs an AlConeLight wrapper object.

AlConeLight::~AlConeLight()

Description

Deletes an AlConeLight wrapper object.

statusCode AlConeLight::create()

Description

This method 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 - if everything was successful

sInsufficientMemory - if not enough memory available

sAlreadyCreated - light is already created

AlObjectType AlConeLight::type() const

Description

Returns the class identifier kConeLightType.

AlConeLight* AlConeLight::asConeLightPtr()

Description

This virtual function returns a non-null pointer to itself, indicating that it is safe to cast to an object of this class.

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 - 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.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





aliasdocs@aw.sgi.com
Copyright © 1996, Alias|Wavefront, a Silicon Graphics Company. All rights reserved.