📄 model.h
字号:
//----------------------------------------------------------------------------//// model.h //// Copyright (C) 2001 Bruno 'Beosil' Heidelberger ////----------------------------------------------------------------------------//// This program is free software; you can redistribute it and/or modify it //// under the terms of the GNU General Public License as published by the Free //// Software Foundation; either version 2 of the License, or (at your option) //// any later version. ////----------------------------------------------------------------------------//#ifndef MODEL_H#define MODEL_H//----------------------------------------------------------------------------//// Includes ////----------------------------------------------------------------------------//#include "global.h"#include "camera.h"
//----------------------------------------------------------------------------//// Class declaration ////----------------------------------------------------------------------------//class Model
{
public:
Model(CalCoreModel* m_CalCoreModel);
virtual ~Model();
float x,y,z,theta,psi,gama;//位置方向参数
void Place(float x,float y,float z,float theta,float psi,float gama);//设置位置方向
float sx,sy,sz;//缩放因子
void Setup(float sx,float sy,float sz);//设置缩放因子
CalModel* m_calModel;//虚拟人实体
int m_state;//所处状态(循环动作:0-静止,1-走;2-跑)
void setState(int state, float delay);//设置状态
int getState();//获得状态
float m_lodLevel;//LOD比例
void setLodLevel(float lodLevel);//设置LOD
float getLodLevel();//获得LOD
float m_motionBlend[3];//动作混合参数
void setMotionBlend(float *pMotionBlend, float delay);//设置动作混合
void getMotionBlend(float *pMotionBlend);//获得动作混合
void executeAction(int action);//执行一个动作
void onRender();//渲染此个实体
void onUpdate(float elapsedSeconds);//更新此个实体
int m_bSkeleton;//骨骼模式:0-正常;1-骨架;2-范围框
bool m_bWireframe;//是否线框模式
bool m_bLight;//是否启用灯光
void renderSkeleton();//渲染骨架
void renderBoundingBox();//渲染范围框
void renderMesh(bool bWireframe, bool bLight);//渲染网格
};
#endif//----------------------------------------------------------------------------//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -