Public Member Functions | Public Attributes

Light Class Reference

This reference page is linked to from the following overview topics: Principal Light Classes.


Search for all occurrences

Detailed Description

Describes lights used in the interactive renderer.

All methods of this class are implemented by the system.

#include <gfx.h>

Inheritance diagram for Light:
Inheritance graph
[legend]

List of all members.

Public Member Functions

DllExport  Light ()
  Constructor.

Public Attributes

LightType  type
  The type of the light.
Point3  color
  The color of the light.
int  attenType
  Attenuation type.
float  attenStart
  Starting attenuation value.
float  attenEnd
  Ending attenuation value.
float  intensity
  Light multiplier factor.
float  hotSpotAngle
  Angle of cone for spot and cone lights in degrees.
float  fallOffAngle
  Fall-off angle.
int  shape
  Indicates the shape of the light.
float  aspect
  The aspect ratio of the light.
int  overshoot
  If this value is non-zero it indicates the light supports overshoot.
BOOL  affectDiffuse
  When set to FALSE by a user the light does not illuminate the diffuse component of an object's material.
BOOL  affectSpecular
  When set to FALSE by a user the light does not illuminate the specular component of an object's material.

Constructor & Destructor Documentation

DllExport Light ( )

Constructor.


Member Data Documentation

LightType type

The type of the light.

Has one of the following values:

  • OMNI_LGT - Omni-directional.
  • SPOT_LGT - Spot light.
  • DIRECT_LGT - Directional light.
  • AMBIENT_LGT - Ambient light (global illumination)

The color of the light.

int attenType

Attenuation type.

GW_ATTEN_NONE by default.

float attenStart

Starting attenuation value.

float attenEnd

Ending attenuation value.

float intensity

Light multiplier factor.

float hotSpotAngle

Angle of cone for spot and cone lights in degrees.

float fallOffAngle

Fall-off angle.

int shape

Indicates the shape of the light.

It is either:

  • GW_SHAPE_RECT - Rectangular spotlights.
  • GW_SHAPE_CIRCULAR - Circular spotlights.
float aspect

The aspect ratio of the light.

int overshoot

If this value is non-zero it indicates the light supports overshoot.

When set to FALSE by a user the light does not illuminate the diffuse component of an object's material.

This value is TRUE by default.

When set to FALSE by a user the light does not illuminate the specular component of an object's material.

This value is TRUE by default.


Light Light Light Light Light Light Light Light Light Light
Light Light Light Light Light Light Light Light Light Light