Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

VPLight Class Reference

Represents a light source. More...

#include <vplight.h>

Inheritance diagram for VPLight:

VPSceneNode VPMemoryObj VPDirectionalLight VPPointLight VPSpotLight List of all members.

Public Member Functions

 VPLight ()
 VPLight (const VPLight &light)
 VPLight (float i, float ai, VPColor c, bool o)
 VPLight (const std::string &newDescription, float newIntensity, float newAmbientIntensity, const VPColor &newColor, const VPPoint4D &newLocation)
virtual ~VPLight ()
VPLightoperator= (const VPLight &light)
void SetIntensity (float i)
float GetIntensity () const
void SetAmbientIntensity (float ai)
float GetAmbientIntensity () const
void SetColor (const VPColor &c)
VPColor GetColor () const
void Turn (bool on_off)
 Turns a light on or off.
bool IsOn () const
void SetLocation (const VPPoint4D &newLocation)
 Sets the location of the light.
VPPoint4D GetLocation () const
bool DrawOGL (unsigned int oglLightID) const
 Draws (sets up) a light using OpenGL commands.

Static Public Member Functions

static const VPLightSUN ()
 White directional light towards negative Y. Small ambient intensity.
static const VPLightBRIGHT_AMBIENT ()
 Strong, white ambient light.

Detailed Description

Represents a light source.

This class represents simple light sources, i.e.: directional lights or point lights with no attenuation. See the derived classes for more complex light sources.

Definition at line 22 of file vplight.h.


Constructor & Destructor Documentation

VPLight::VPLight  ) 
 

Definition at line 43 of file vplight.cpp.

References VPColor::SetRGBA().

VPLight::VPLight const VPLight light  ) 
 

Definition at line 71 of file vplight.cpp.

References ambientIntensity, color, VPSceneNode::description, intensity, location, and on.

VPLight::VPLight float  i,
float  ai,
VPColor  c,
bool  o
 

Definition at line 52 of file vplight.cpp.

VPLight::VPLight const std::string &  newDescription,
float  newIntensity,
float  newAmbientIntensity,
const VPColor newColor,
const VPPoint4D newLocation
 

VPLight::~VPLight  )  [virtual]
 

Definition at line 80 of file vplight.cpp.


Member Function Documentation

const VPLight & VPLight::BRIGHT_AMBIENT  )  [static]
 

Strong, white ambient light.

Definition at line 97 of file vplight.cpp.

References VPPoint4D::ORIGIN(), and VPColor::WHITE().

bool VPLight::DrawOGL unsigned int  oglLightID  )  const
 

Draws (sets up) a light using OpenGL commands.

Returns:
false if VPAT was not compiled with OpenGL support.
Parameters:
oglLightID [in] OpenGL ID for light in the range 0..7.

Definition at line 138 of file vplight.cpp.

References VPColor::GetScaled().

float VPLight::GetAmbientIntensity  )  const
 

Definition at line 114 of file vplight.cpp.

VPColor VPLight::GetColor  )  const
 

Definition at line 122 of file vplight.cpp.

float VPLight::GetIntensity  )  const
 

Definition at line 106 of file vplight.cpp.

VPPoint4D VPLight::GetLocation  )  const [inline]
 

Definition at line 48 of file vplight.h.

bool VPLight::IsOn  )  const
 

Definition at line 130 of file vplight.cpp.

VPLight & VPLight::operator= const VPLight light  ) 
 

Definition at line 83 of file vplight.cpp.

References ambientIntensity, color, VPSceneNode::description, intensity, location, and on.

void VPLight::SetAmbientIntensity float  ai  ) 
 

Definition at line 110 of file vplight.cpp.

void VPLight::SetColor const VPColor c  ) 
 

Definition at line 118 of file vplight.cpp.

void VPLight::SetIntensity float  i  ) 
 

Definition at line 102 of file vplight.cpp.

void VPLight::SetLocation const VPPoint4D newLocation  ) 
 

Sets the location of the light.

newLocation should be a point for positional lights or a direction for directional lights.

Definition at line 134 of file vplight.cpp.

const VPLight & VPLight::SUN  )  [static]
 

White directional light towards negative Y. Small ambient intensity.

Definition at line 93 of file vplight.cpp.

References VPColor::WHITE().

void VPLight::Turn bool  on_off  ) 
 

Turns a light on or off.

Definition at line 126 of file vplight.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 6 10:00:16 2005 for VPAT by  doxygen 1.4.4