NLS Engine  v0.1
The Next Logical Step in game engine design.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
RenderableComponent.h
Go to the documentation of this file.
00001 
00024 #pragma once
00025 
00026 #include <d3d9.h>
00027 #include <d3dx9tex.h>
00028 
00029 #include "../../sharedbase/ComponentInterface.h"
00030 
00031 namespace GraphicsCore {
00032   class RenderModule;
00033   
00034   enum ECoordinateSpace {
00035     CS_SCREEN,
00036     CS_WORLD
00037   };
00038 
00039   class RenderableComponent: public ComponentInterface {
00040   public:
00041     RenderableComponent(EntitySPTR owner, ModuleInterface* core);
00042     virtual ~RenderableComponent();
00043 
00050     virtual void Render(LPDIRECT3DDEVICE9) = 0;
00051 
00052     ECoordinateSpace GetCoordSpace();
00053     bool SetCoordSpace(ECoordinateSpace);
00054 
00055   protected:
00056     inline RenderModule* GetRenderModule() const {
00057       return this->renderModule;
00058     }
00059 
00060   private:
00064     ECoordinateSpace space;
00065 
00069     RenderModule* renderModule;
00070   };
00071 }