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

CDisplayDraw.h

Go to the documentation of this file.
00001 /*
00002 
00003         ZMACHINE 2.0 (SIGFRID)
00004 
00005         CDISPLAYDRAW.H
00006 
00007         author:                 Trombetta Roberto
00008         filename:               CDdisplayBuffer.h       
00009         description:    header file for display drawing class
00010         date:                   20/05/2003
00011 
00012 */
00013 
00014 #ifndef __CDISPLAYDRAW_H_
00015 #define __CDISPLAYDRAW_H_
00016 
00017 #include "Zdef.h"
00018 #include "Zmacro.h"
00019 #include "CVector3.h"
00020 #include "CMatrix.h"
00021 #include "Cplane.h"
00022 #include "CPolygon.h"
00023 #include "CFrustum.h"
00024 #include "CRGBColor.h"
00025 #include "CDisplayBuffer.h"
00026 #include "CKeyboard.h"
00027 
00029 
00033 class CDisplayDraw: public CDisplayBuffer {
00034 
00035 public:
00036         
00038         CDisplayDraw ();        
00040         ~CDisplayDraw ();
00042         zint Init (zulong width, zulong height);
00044         zint RenderDisplay ();
00046         zint ResizeDisplay ();
00048         zint Idle ();
00050 
00051         CMatrix SetProjectionMatrix (zfloat l, zfloat r, zfloat b, zfloat t, zfloat n, zfloat f);
00053         CMatrix SetProjectionMatrix (zfloat fov, zfloat aspect, zfloat near, zfloat far);
00055         CMatrix GetProjectionMatrix();
00057         CFrustum GetFrustum();
00059         zint SetKeyboard(CKeyboard keyboard);
00061         CKeyboard *GetKeyboard();
00062 
00063 private:
00064 
00066         CMatrix         ProjectionMatrix;
00068         CFrustum        Frustum;
00070         CKeyboard   *Keyboard;
00072         zulong          screen_width;
00074         zulong          screen_height;
00075         
00077         zint ClearPixel ();
00079         zint DrawPixelPoint (zulong x, zulong y, CRGBColor color);
00081         zint DrawPixelRect (zulong x1, zulong y1, zulong x2, zulong y2, CRGBColor color);
00083         zint DrawPixelLine(zulong x1, zulong y1, zulong x2, zulong y2, CRGBColor color);
00084         
00086         zint Draw3DPoint (const CVector3 &x, const CRGBColor &color);
00088         zint Draw3DLine (const CVector3 &x1, const CVector3 &x2, const CRGBColor &color);
00090         zint Draw3DPolygon (const CPolygon &p, const CRGBColor &color);
00091                 
00092 }; 
00093 
00094 #endif // __CDISPLAYDRAW_H_



SourceForge.net Logo