home *** CD-ROM | disk | FTP | other *** search
/ Xentax forum attachments archive / xentax.7z / 8090 / ModelEdit.7z / renderobject.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-03-08  |  1.8 KB  |  67 lines

  1. // ----------------------------------------------------------
  2. // renderobject.h
  3. // lithtech (c) 2000 
  4. //
  5. // A CRenderObject is a device dependant object that exists in the
  6. // renderer.
  7. // RenderObject is a virtual base class - All RenderObjects should derive from this class.
  8. // ----------------------------------------------------------
  9. #ifndef __RENDEROBJECT_H__
  10. #define __RENDEROBJECT_H__
  11.  
  12. class CRenderObject
  13. {
  14. public:
  15.     enum RENDER_OBJECT_TYPES {                                        // List of valid Render Object Types...
  16.         eInvalid        = 0,                                        // Note: If these values change - need to update the packers...
  17.         eDebugLine        = 1,
  18.         eDebugPolygon    = 2,
  19.         eDebugText        = 3,
  20.         eRigidMesh        = 4,
  21.         eSkelMesh        = 5,
  22.         eVAMesh            = 6,
  23.         eABCPieceLOD    = 7,
  24.     };
  25.  
  26. protected :
  27.     RENDER_OBJECT_TYPES m_Type;
  28.     
  29. public:
  30.     // RenderObjects can be destroyed (on some platforms, anyway). This method should
  31.     //    be used to re-load/create all the lost parts (this is basically for ALT-TAB)...
  32.     virtual void ReCreateObject()                                    { }
  33.     virtual void FreeDeviceObjects()                                { }
  34.  
  35.     virtual void Render()                                            { } // Virtual function for drawing...
  36.  
  37.     RENDER_OBJECT_TYPES GetType()                                    { return m_Type; }
  38.  
  39.     // a little kludge here to exclude this stuff which isn't needed.
  40. #ifdef __PS2
  41.     CRenderObject()                                                    { }
  42.     virtual ~CRenderObject()                                        { }
  43. #else
  44.     CRenderObject()                                                    { m_pNext = 0; }
  45.     virtual ~CRenderObject()                                        { }
  46.     
  47.     CRenderObject*    GetNext()                                        { return m_pNext; }
  48.     void            SetNext(CRenderObject* pNext)                    { m_pNext = pNext; }
  49.  
  50. private:
  51.     // This puffs - but this is so that these things can be contained in a list (since we aren't using STL at this point)...
  52.     CRenderObject*    m_pNext;
  53. #endif
  54. };
  55.  
  56. #endif 
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.