Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

RAS_IRenderTools.h

Go to the documentation of this file.
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         // the following function was formerly called 'Render'
00026         // by it doesn't render anymore
00027         // It only sets the transform for the rasterizer
00028         // so must be renamed to 'applyTransform' or something
00029         virtual void    applyTransform(class RAS_IRasterizer* rasty,
00030                                                         double* oglmatrix,int drawingmode)=0;
00031 
00032         // 2d text
00033         virtual void    RenderText2D(const char* text,int xco,int yco)=0;
00034         // 3d text, mapped on polygon
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

Generated at Thu Feb 1 13:03:08 2001 for Ketsji Game Engine by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000