00001 #ifndef __RAS_IRENDERTOOLS
00002 #define __RAS_IRENDERTOOLS
00003
00004 #include "MT_Transform.h"
00005 #include "RAS_IRasterizer.h"
00006 class RAS_IPolyMaterial;
00007
00008 class RAS_IRenderTools
00009 {
00010
00011 protected:
00012 float m_viewmat[16];
00013 void* m_clientobject;
00014 bool m_modified;
00015
00016 public:
00017
00018 RAS_IRenderTools() :m_modified(true),m_clientobject(NULL)
00019 {};
00020 virtual ~RAS_IRenderTools() {};
00021
00022 virtual void BeginFrame(RAS_IRasterizer* rasty)=0;
00023 virtual void EndFrame(RAS_IRasterizer* rasty)=0;
00024
00025
00026
00027
00028
00029 virtual void applyTransform(class RAS_IRasterizer* rasty,
00030 double* oglmatrix,int drawingmode)=0;
00031
00032
00033 virtual void RenderText2D(const char* text,int xco,int yco)=0;
00034
00035 virtual void RenderText(int mode,
00036 RAS_IPolyMaterial* polymat,
00037 float v1[3],
00038 float v2[3],
00039 float v3[3],
00040 float v4[3])=0;
00041
00042 virtual void SetViewMat(const MT_Transform& trans)
00043 {
00044 trans.getValue(m_viewmat);
00045 }
00046
00047 virtual int ProcessLighting(int layer)=0;
00048
00049 void SetClientObject(void* obj)
00050 {
00051 if (m_clientobject != obj)
00052 {
00053 m_clientobject = obj;
00054 m_modified = true;
00055 }
00056 }
00057
00058
00059 };
00060 #endif //__RAS_IRENDERTOOLS