Main Page   Class Hierarchy   Compound List   Header Files   Compound Members  

ddgLight Class Reference

A light object in a light model. More...

#include <ddglight.h>

Class diagram for ddgLight:

ddgNode

List of all members.


Public Members

 ddgLight (void)
Constructor.

bool draw ( ddgContext *ctx)
Activate the light for rendering.

void ambient ( ddgColor4 *c )
Set the ambient light colour.

void ambient ( unsigned char r, unsigned char g, unsigned char b )
ddgColor4ambient (void)
Get the ambient light colour.

void diffuse ( ddgColor4 *c )
Set the diffuse light colour.

void diffuse ( float r, float g, float b )
ddgColor4diffuse (void)
Get the diffuse light colour.

void specular ( ddgColor4 *c )
Set the specular light colour.

void specular ( unsigned char r, unsigned char g, unsigned char b )
ddgColor4specular (void)
Get the specular light colour.

void pos ( ddgVector3 *p )
Set the light position, without affecting the distance.

void pos ( float i, float j, float k )
ddgVector4* pos ( void )
Get the light position.

void direction ( ddgVector3 *d )
Set the orientation of the light as a vector.

void direction ( float i, float j, float k )
void direction ( float theta, float phi )
Set the orientation of the light as a heading and azimuth.

ddgVector3direction (void )
Get the light direction.

void distance ( float d )
Set the distance of the light.

float distance (void)
Get the distance of the light from the position.

void fixed (bool f)
Set the light to be fixed or not.

bool fixed (void)
Get the light's to be fixed or not.

void spotlight (float size)
Set the size of the spotlight, if zero it is an infinitely strong light.

float spotlight (void)
Get the size of the spotlight.


Detailed Description

A light object in a light model.

OpenGL supports 8. Add this object to the scene twice, once to turn the light on and once to turn it off again.


The documentation for this class was generated from the following file:
Generated at Sun Sep 17 19:27:54 2000 for Digital Dawn Graphics Toolkit by doxygen 0.49-991205 written by Dimitri van Heesch, © 1997-1999