Public Member Functions | Private Member Functions | Private Attributes

VR3Light Class Reference

The light class. More...

#include <VR3Light.h>

List of all members.

Public Member Functions

 VR3Light ()
 VR3Light constructor.
Get and Set Functions
void SetPosition (GLfloat x, GLfloat y, GLfloat z)
 Sets the light position using the given coordinates.
void SetPosition (const GLfloat *point)
 Sets the light position using the given vector.
void GetPosition (GLfloat *point)
 Gets the light current position.
void SetAmbient (GLfloat r, GLfloat g, GLfloat b)
 Sets the light ambient color using the given values.
void SetAmbient (const GLfloat *color)
 Sets the light ambient color using the given vector.
void GetAmbient (GLfloat *color)
 Gets the light ambient color into the given vector.
void SetDiffuse (GLfloat r, GLfloat g, GLfloat b)
 Sets the light diffuse color using the given values.
void SetDiffuse (const GLfloat *color)
 Sets the light diffuse color using the given vector.
void GetDiffuse (GLfloat *color)
 Gets the light diffuse color into the given vector.
void SetSpecular (GLfloat r, GLfloat g, GLfloat b)
 Sets the light specular color using the given values.
void SetSpecular (const GLfloat *color)
 Sets the light specular color using the given vector.
void GetSpecular (GLfloat *color)
 Gets the light specular color into the given vector.
Light Switching Functions
void SwitchOn ()
 Switches the light on.
void SwitchOff ()
 Switches the light off (default condition)
bool IsOn ()
 Gets the light state.

Private Member Functions

 VR3Light (const VR3Light &)
 Disable default copy constructor.
VR3Lightoperator= (const VR3Light &)
 Disable default assignment operator.

Private Attributes

GLfloat m_pos [3]
 Light position in world space.
GLfloat m_ambient [3]
 Light ambient color (RGB components)
GLfloat m_diffuse [3]
 Light diffuse color (RGB components)
GLfloat m_specular [3]
 Light specular color (RGB components)
bool m_active
 Is the light active.

Detailed Description

The light class.

This class allows to manage a light in the scene and its properties. The lights setup may affects how the frame image of the scene is produced.

Definition at line 31 of file VR3Light.h.


Constructor & Destructor Documentation

VR3Light::VR3Light ( const VR3Light  ) [private]

Disable default copy constructor.

VR3Light::VR3Light (  )

VR3Light constructor.

This constructor merely initializes all member variables with their default values.


Member Function Documentation

void VR3Light::GetAmbient ( GLfloat *  color )

Gets the light ambient color into the given vector.

Gets the ambient color for the light.

Parameters:
[out]colorThe light ambient color
void VR3Light::GetDiffuse ( GLfloat *  color )

Gets the light diffuse color into the given vector.

Gets the diffuse color for the light.

Parameters:
[out]colorThe light diffuse color
void VR3Light::GetPosition ( GLfloat *  point )

Gets the light current position.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
[out]pointThe retrived light position
void VR3Light::GetSpecular ( GLfloat *  color )

Gets the light specular color into the given vector.

Gets the specular color for the light.

Parameters:
[out]colorThe light specular color
bool VR3Light::IsOn (  ) [inline]

Gets the light state.

Definition at line 155 of file VR3Light.h.

VR3Light& VR3Light::operator= ( const VR3Light  ) [private]

Disable default assignment operator.

void VR3Light::SetAmbient ( GLfloat  r,
GLfloat  g,
GLfloat  b 
)

Sets the light ambient color using the given values.

Sets the new color for the light.

Parameters:
[in]r,g,bThe components of the new light ambient color
void VR3Light::SetAmbient ( const GLfloat *  color )

Sets the light ambient color using the given vector.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
[in]colorThe new light ambient color
void VR3Light::SetDiffuse ( GLfloat  r,
GLfloat  g,
GLfloat  b 
)

Sets the light diffuse color using the given values.

Sets the new color for the light.

Parameters:
[in]r,g,bThe components of the new light diffuse color
void VR3Light::SetDiffuse ( const GLfloat *  color )

Sets the light diffuse color using the given vector.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
[in]colorThe new light diffuse color
void VR3Light::SetPosition ( GLfloat  x,
GLfloat  y,
GLfloat  z 
)

Sets the light position using the given coordinates.

Sets the new world space position for the light.

Parameters:
[in]x,y,zThe components of the new light position
void VR3Light::SetPosition ( const GLfloat *  point )

Sets the light position using the given vector.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
[in]pointThe new light position
void VR3Light::SetSpecular ( const GLfloat *  color )

Sets the light specular color using the given vector.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
[in]colorThe new light specular color
void VR3Light::SetSpecular ( GLfloat  r,
GLfloat  g,
GLfloat  b 
)

Sets the light specular color using the given values.

Sets the new color for the light.

Parameters:
[in]r,g,bThe components of the new light specular color
void VR3Light::SwitchOff (  ) [inline]

Switches the light off (default condition)

Definition at line 152 of file VR3Light.h.

void VR3Light::SwitchOn (  ) [inline]

Switches the light on.

Definition at line 149 of file VR3Light.h.


Member Data Documentation

bool VR3Light::m_active [private]

Is the light active.

Definition at line 42 of file VR3Light.h.

GLfloat VR3Light::m_ambient[3] [private]

Light ambient color (RGB components)

Definition at line 36 of file VR3Light.h.

GLfloat VR3Light::m_diffuse[3] [private]

Light diffuse color (RGB components)

Definition at line 38 of file VR3Light.h.

GLfloat VR3Light::m_pos[3] [private]

Light position in world space.

Definition at line 34 of file VR3Light.h.

GLfloat VR3Light::m_specular[3] [private]

Light specular color (RGB components)

Definition at line 40 of file VR3Light.h.


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