?? attachment.h
字號:
//--------------------------------------------------
// Desc: M2 Attachment
// Date: 2007.4.16 /update
// Author: Artsylee
//
// From: WOW Model Viewer
// I just coding in my own ways!
//
//--------------------------------------------------
#ifndef _ATTACHMENT
#define _ATTACHMENT
#include <vector>
#include <d3dx9.h>
class CM2Loader;
class Attachment
{
public:
Attachment();
~Attachment();
bool Load(Attachment *pParent, CM2Loader *pModel, int BoneId, int Slot);
void Update(void);
void Render(void);
void UpdateParticle(void);
void RenderParticle(const D3DXMATRIX &matRotate);
void SetScale(float scale);
void SetRotate(const D3DXVECTOR3 &rotate);
void SetPosition(const D3DXVECTOR3 &pos);
void SetRender(bool bRender);
void ReleaseChildren(void);
Attachment* AddChild(const char *filename, int id, int slot, float scale = 1.0f,
D3DXVECTOR3 rotate = D3DXVECTOR3(0.0f, 0.0f, 0.0f),
D3DXVECTOR3 pos = D3DXVECTOR3(0.0f, 0.0f, 0.0f));
Attachment* AddChild(CM2Loader *model, int id, int slot, float scale = 1.0f,
D3DXVECTOR3 rotate = D3DXVECTOR3(0.0f, 0.0f, 0.0f),
D3DXVECTOR3 pos = D3DXVECTOR3(0.0f, 0.0f, 0.0f));
void ReleaseSlot(int slot);
private:
int m_BoneID;
int m_Slot;
float m_Scale;
D3DXVECTOR3 m_Rotate;
D3DXVECTOR3 m_Position;
private:
Attachment* m_pParent;
public:
CM2Loader* m_pModel;
std::vector<Attachment*> m_Children;
};
#endif // _ATTACHMENT
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -