VRUT::Light Struct Reference

Light definition. More...

#include <light.h>

List of all members.

Public Types

enum  LIGHT_TYPE { OMNI, DIRECTIONAL, SPOTLIGHT, UNKNOWN }
 Light type. More...

Public Member Functions

 Light ()
 Constructor.
wxString ToString () const
 Get string with light properties.
LightClone () const
 Get copy of instance.

Public Attributes

enum VRUT::Light::LIGHT_TYPE type
VECTOR3 position
 Position (not for DIRECTIONAL).
VECTOR3 direction
 Direction (not for OMNI).
float angle
 Spotlight angle (SPOTLIGHT only).
float exponent
 Spotlight exponent (SPOTLIGHT only).
VECTOR4 diffuse
 Diffuse color.


Detailed Description

Light definition.

Definition at line 21 of file light.h.


Member Enumeration Documentation

Light type.

Enumerator:
OMNI  Omnidirectional.
DIRECTIONAL  Directional light.
SPOTLIGHT  Spotlight.
UNKNOWN  Unknown type.

Definition at line 24 of file light.h.

00025               {
00026                      OMNI,         
00027                      DIRECTIONAL,  
00028                      SPOTLIGHT,    
00029                      UNKNOWN       
00030               } type;


Constructor & Destructor Documentation

VRUT::Light::Light (  )  [inline]

Constructor.

Definition at line 43 of file light.h.

00044               {
00045                      type = UNKNOWN;
00046               }


Member Function Documentation

wxString VRUT::Light::ToString (  )  const [inline]

Get string with light properties.

Definition at line 49 of file light.h.

00050               {
00051                      return wxString::Format(wxT("Light type: %i\nPosition: %s\nDirection: %s\nAngle (spot): %f\nExponent (spot): %f\nDiffuse: %s\n"),
00052                             type, position.ToString().c_str(), direction.ToString().c_str(), angle, exponent, diffuse.ToString().c_str());
00053               }

Light* VRUT::Light::Clone (  )  const [inline]

Get copy of instance.

Definition at line 55 of file light.h.

00056               {
00057                      return new Light(*this);
00058               }


Member Data Documentation

Position (not for DIRECTIONAL).

Definition at line 32 of file light.h.

Direction (not for OMNI).

Definition at line 34 of file light.h.

Spotlight angle (SPOTLIGHT only).

Definition at line 36 of file light.h.

Spotlight exponent (SPOTLIGHT only).

Definition at line 38 of file light.h.

Diffuse color.

Definition at line 40 of file light.h.


The documentation for this struct was generated from the following file:

Generated on Tue Mar 10 14:41:43 2009 for VRUT by  doxygen 1.5.5