NLS Engine  v0.1
The Next Logical Step in game engine design.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
LightDirectionalRenderable.h
Go to the documentation of this file.
00001 
00007 #pragma once
00008 
00009 #include <d3d9.h>
00010 #include "LightAmbientRenderable.h"
00011 
00012 namespace GraphicsCore {
00013   
00014   class LightDirectionalRenderable: public LightAmbientRenderable {
00015     
00016   public:
00017     LightDirectionalRenderable(EntitySPTR, ModuleInterface*);
00018     virtual ~LightDirectionalRenderable();
00019 
00021     D3DXCOLOR GetDiffuseColor();
00022 
00024     bool SetDiffuseColor(D3DXCOLOR);
00025 
00027     D3DXCOLOR GetSpecularColor();
00028 
00030     bool SetSpecularColor(D3DXCOLOR);
00031 
00032     float GetRange(void);
00033     bool SetRange(float);
00034 
00035     void Render(LPDIRECT3DDEVICE9);
00036 
00037     D3DXVECTOR3 GetDirection(void);
00038 
00039     bool SetDirection(D3DXVECTOR3);
00040 
00041     inline int GetLightIndex() const {
00042       return this->lightIndex;
00043     }
00044 
00045   protected:
00046     static int lightCount; // Should be private and using a getter and setter...
00047 
00048   private:
00049 
00050     D3DXCOLOR diffuseColor;
00051     D3DXCOLOR specularColor;
00052     D3DXCOLOR ambientColor;
00053     D3DXVECTOR3 direction;
00054 
00055     int lightIndex;
00056 
00057     float range;
00058   };
00059 }