My Project
|
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 #pragma once 00029 #include "Define.h" 00030 #define _USE_MATH_DEFINES 00031 #include <cmath> 00032 #include <d3dx9.h> 00033 #include "Game.h" 00034 00035 namespace SallyAPI 00036 { 00037 namespace Core 00038 { 00039 enum CAMERA_SETUP {CAMERA_SETUP_UNKONW, CAMERA_SETUP_GUI2D, CAMERA_SETUP_GUI3D}; 00040 00049 00050 class DLL_API_SALLY CCamera 00051 { 00052 private: 00053 D3DXMATRIX m_matView; // the view transform matrix 00054 D3DXMATRIX m_matProjection; // the projection transform matrix 00055 D3DXMATRIX m_matViewSpriteInterface; 00056 D3DXMATRIX m_matProjectionSpriteInterface; 00057 int m_iScreenWidth; 00058 int m_iScreenHeight; 00059 CAMERA_SETUP m_eCameraSetup; 00060 RECT m_pScissorRect; 00061 public: 00062 CCamera(int screenWidth, int screenHeight); 00063 ~CCamera(); 00064 00065 void SetupGUI2DCamera(); 00066 void SetupGUI3DCamera(); 00067 00068 void StartRender(); 00069 00070 RECT SetupScissorRect(RECT& rect); 00071 void DisableScissorRect(); 00072 RECT GetScissorRect(); 00073 }; 00074 } 00075 }