Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Light Class Reference

#include <Light.h>

List of all members.

Public Types

enum  TYPES { LIGHT_POINT = 1, LIGHT_SPOT = 2, LIGHT_DIRECTIONAL = 3, LIGHT_FORCE_DWORD = 0x7fffffff }

Public Member Functions

 Light (float l=0.0f, float dl=1.0f, int time=-1)
virtual ~Light ()
int operator== (const Light &l) const
virtual void Update ()
int Identity () const
Point Location () const
DWORD Type () const
void SetType (DWORD t)
float Intensity () const
void SetIntensity (float f)
Color GetColor () const
void SetColor (Color c)
bool IsActive () const
void SetActive (bool a)
bool CastsShadow () const
void SetShadow (bool s)
bool IsPoint () const
bool IsSpot () const
bool IsDirectional () const
virtual void MoveTo (const Point &dst)
virtual void TranslateBy (const Point &ref)
virtual int Life () const
virtual void Destroy ()
virtual SceneGetScene () const
virtual void SetScene (Scene *s)

Static Public Member Functions

static const char * TYPENAME ()

Protected Attributes

int id
DWORD type
Point loc
int life
float light
float dldt
Color color
bool active
bool shadow
Scenescene

Static Protected Attributes

static int id_key = 1

Detailed Description

Definition at line 31 of file Light.h.


Member Enumeration Documentation

Enumerator:
LIGHT_POINT 
LIGHT_SPOT 
LIGHT_DIRECTIONAL 
LIGHT_FORCE_DWORD 

Definition at line 36 of file Light.h.


Constructor & Destructor Documentation

Light::Light ( float  l = 0.0f,
float  dl = 1.0f,
int  time = -1 
)

Definition at line 25 of file Light.cpp.

Light::~Light ( )
virtual

Definition at line 33 of file Light.cpp.


Member Function Documentation

bool Light::CastsShadow ( ) const
inline

Definition at line 63 of file Light.h.

void Light::Destroy ( )
virtual

Definition at line 50 of file Light.cpp.

Color Light::GetColor ( ) const
inline

Definition at line 59 of file Light.h.

virtual Scene* Light::GetScene ( ) const
inlinevirtual

Definition at line 75 of file Light.h.

int Light::Identity ( ) const
inline

Definition at line 52 of file Light.h.

float Light::Intensity ( ) const
inline

Definition at line 57 of file Light.h.

bool Light::IsActive ( ) const
inline

Definition at line 61 of file Light.h.

bool Light::IsDirectional ( ) const
inline

Definition at line 68 of file Light.h.

bool Light::IsPoint ( ) const
inline

Definition at line 66 of file Light.h.

bool Light::IsSpot ( ) const
inline

Definition at line 67 of file Light.h.

virtual int Light::Life ( ) const
inlinevirtual

Definition at line 73 of file Light.h.

Point Light::Location ( ) const
inline

Definition at line 53 of file Light.h.

void Light::MoveTo ( const Point dst)
virtual

Definition at line 61 of file Light.cpp.

int Light::operator== ( const Light l) const
inline

Definition at line 46 of file Light.h.

void Light::SetActive ( bool  a)
inline

Definition at line 62 of file Light.h.

void Light::SetColor ( Color  c)
inline

Definition at line 60 of file Light.h.

void Light::SetIntensity ( float  f)
inline

Definition at line 58 of file Light.h.

virtual void Light::SetScene ( Scene s)
inlinevirtual

Definition at line 76 of file Light.h.

void Light::SetShadow ( bool  s)
inline

Definition at line 64 of file Light.h.

void Light::SetType ( DWORD  t)
inline

Definition at line 56 of file Light.h.

void Light::TranslateBy ( const Point ref)
virtual

Definition at line 68 of file Light.cpp.

DWORD Light::Type ( ) const
inline

Definition at line 55 of file Light.h.

static const char* Light::TYPENAME ( )
inlinestatic

Definition at line 34 of file Light.h.

void Light::Update ( )
virtual

Definition at line 39 of file Light.cpp.


Member Data Documentation

bool Light::active
protected

Definition at line 88 of file Light.h.

Color Light::color
protected

Definition at line 87 of file Light.h.

float Light::dldt
protected

Definition at line 86 of file Light.h.

int Light::id
protected

Definition at line 81 of file Light.h.

int Light::id_key = 1
staticprotected

Definition at line 79 of file Light.h.

int Light::life
protected

Definition at line 84 of file Light.h.

float Light::light
protected

Definition at line 85 of file Light.h.

Point Light::loc
protected

Definition at line 83 of file Light.h.

Scene* Light::scene
protected

Definition at line 90 of file Light.h.

bool Light::shadow
protected

Definition at line 89 of file Light.h.

DWORD Light::type
protected

Definition at line 82 of file Light.h.


The documentation for this class was generated from the following files: