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;
AlSphereLight* asSphereLightPtr();
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.

Summary

AlSphereLight::AlSphereLight()

Description

Constructs an AlSphereLight wrapper object.

AlSphereLight::~AlSphereLight()

Description

Deletes an AlSphereLight wrapper object.

statusCode AlSphereLight::create()

Description

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

sInsufficientMemory - if not enough memory available

AlObjectType AlSphereLight::type() const

Description

Returns the class identifier kSphereLightType.

AlSphereLight* AlSphereLight::asSphereLightPtr()

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 AlSphereLight::arc() const

Description

This method returns the sphere lights arc (i.e. 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





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