BillBoard.h
资源名称:g.rar [点击查看]
上传用户:laitongbao
上传日期:2021-02-20
资源大小:8176k
文件大小:1k
源码类别:
射击游戏
开发平台:
Visual C++
- #include "NodeObject.h"
- #pragma once
- class Camera;
- /*******************************************************************************
- 广告版类:只能绕y轴旋转,始终面对摄象机,长宽比与图象相同,适用于地面植被的模拟,
- 渲染速度相对较慢
- *******************************************************************************/
- class BillBoard:public NodeObject
- {
- friend class TransitionController;
- friend class ShaderController;
- friend class FileController;
- friend class SceneTree;
- public:
- BillBoard(BillBoard&bb);
- BillBoard(TCHAR* name,TCHAR* imageName=NULL,DWORD colorKey=0,Camera*cam=NULL,float size=1,VECTOR3 pos = VECTOR3());
- void SetCamera(Camera* cam);
- void SetSize(float size);
- void DrawObject();//绘制图形
- void PreDraw();//设置朝向(总是朝向摄象机)
- void CleanUp();
- private:
- IDirect3DVertexBuffer9* localVertex;//平面顶点
- Camera* cam;//朝向的摄象机
- LPDIRECT3DTEXTURE9 texture;
- float width;
- float height;
- };