- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
Camera.h
资源名称:g.rar [点击查看]
上传用户:laitongbao
上传日期:2021-02-20
资源大小:8176k
文件大小:1k
源码类别:
射击游戏
开发平台:
Visual C++
- #pragma once
- #include "NodeObject.h"
- /*
- 摄像机类:继承NodeObject
- */
- class Point;
- class Camera : public NodeObject
- {
- friend class TransitionController;
- friend class ShaderController;
- friend class FileController;
- friend class SceneTree;
- friend class BillBoard;
- public:
- Camera(Camera& cam);
- Camera(TCHAR* name,VECTOR3 pos = VECTOR3());
- Camera(TCHAR* name ,bool orthographic,bool taget,VECTOR3 pos = VECTOR3()); //新加的函数
- virtual ~Camera();
- void SetLookAtPoint(Point * p);
- void SetFov(float fov);
- void SetAspect(float aspect);
- void SetWide(float wide);
- void SetPrespectModel(bool orthographic);
- void SetNearPlane(float near);
- void SetFarPlane(float far);
- Point* GetLookAtPoint()const{return m_lookAtPoint;};
- void DrawObject(){}; //画虚拟物体(摄相机)
- void PreDraw(){}; //设置视矩阵和投影矩阵
- void CleanUp();
- private:
- D3DXVECTOR3 m_up;
- bool m_orthographic;
- bool m_target;
- Point *m_lookAtPoint;
- float m_fov;//普通透视时视野大小(弧度)
- float m_aspect;//宽/高
- float m_wide;//正交透视时摄像机的可视宽度
- float m_near;//near View plane
- float m_far;//far View plane
- };