Public Types | Public Member Functions | Public Attributes

xl7::direct3d::lights::Light Class Reference

#include <Light.h>

List of all members.

Public Types

enum  Type { point = 1, spot = 2, directional = 3 }

Public Member Functions

 Light (void)
virtual ~Light (void)
 Light (const Light &rhs)
virtual Lightoperator= (const Light &rhs)
virtual void swap (Light &rhs)
virtual bool operator== (const Light &rhs) const
virtual bool operator!= (const Light &rhs) const

Public Attributes

Type type
colors::Color ambient
colors::Color diffuse
colors::Color specular
ml7::Vector3 position
ml7::Vector3 direction
float range
float falloff
float attenuation0
float attenuation1
float attenuation2
float theta
float phi

Member Enumeration Documentation

Enumerator:
point 
spot 
directional 

Constructor & Destructor Documentation

xl7::direct3d::lights::Light::Light ( void   ) 

Default constructor.

xl7::direct3d::lights::Light::~Light ( void   )  [virtual]

Destructor.

xl7::direct3d::lights::Light::Light ( const Light rhs  ) 

Copy constructor.


Member Function Documentation

bool xl7::direct3d::lights::Light::operator!= ( const Light rhs  )  const [virtual]
Light & xl7::direct3d::lights::Light::operator= ( const Light rhs  )  [virtual]

Copy assignment operator.

bool xl7::direct3d::lights::Light::operator== ( const Light rhs  )  const [virtual]
void xl7::direct3d::lights::Light::swap ( Light rhs  )  [virtual]

Swap operation.


Member Data Documentation

The ambient color emitted by this light.

The value specifying how the light intensity changes over distance. Valid values range from 0 to infinity. Attenuation values are ignored for directional lights. For non-directional lights, all three attenuation values should not be set to 0 at the same time.

The value specifying how the light intensity changes over distance. Valid values range from 0 to infinity. Attenuation values are ignored for directional lights. For non-directional lights, all three attenuation values should not be set to 0 at the same time.

The value specifying how the light intensity changes over distance. Valid values range from 0 to infinity. Attenuation values are ignored for directional lights. For non-directional lights, all three attenuation values should not be set to 0 at the same time.

The diffuse color emitted by this light.

The direction that the light is pointing in world space. This member has meaning only for directional and spotlights. It has to be normalized and should have a nonzero length.

The decrease in illumination between the inner cone (angle theta) and the outer cone (angle phi) of a spotlight. The effect of falloff is subtle. Furthermore, a small performance penalty is incurred by shaping the falloff curve. For these reasons, falloff should have a value of 1 mostly.

The angle, in radians, of a spotlight's outer cone (illumination bound). This value must be between 0 and pi.

The position of the light in world space. This member has no meaning for directional lights.

The distance beyond which the light has no effect. The maximum allowable value is the square of FLT_MAX. This member does not affect directional lights.

The specular color emitted by this light.

The angle, in radians, of a spotlight's inner (fully illuminated) cone. This value must be in the range from 0 through the value specified by phi.

The type of the light source.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines