.lib是二进制文件,没法看啊
.h文件定义的就是这定义的。
#ifndef __S3D_MODEL_H__
#define __S3D_MODEL_H__
using namespace std;
#include <vector>
namespace r3d{
class Shape3D;
}
namespace s3d {
class CS3DShape
{
protected:
LPDIRECT3DDEVICE9 m_pD3DDevice;
//geometry ------------------------------------------------
D3DXVECTOR3 m_Center;
float m_Radius;
int m_VtxSize;
DWORD m_VtxFormat;
int m_VtxCount;
int m_IdxCount;
int m_TriCount;
LPDIRECT3DVERTEXBUFFER9 m_pVB;
LPDIRECT3DINDEXBUFFER9 m_pIB;
//---------------------------------------------------------
bool m_bTexture;
char m_TextureName[256];
LPDIRECT3DTEXTURE9 m_pTexture;
bool m_bDiffuse;
DWORD m_Diffuse;
bool m_bMaterial;
D3DMATERIAL9 m_Material;
bool m_bTransparent;
public:
virtual ~CS3DShape();
CS3DShape(LPDIRECT3DDEVICE9 pD3DDevice, r3d::Shape3D* s);
//geometry ------------------------------------------------
D3DXVECTOR3 GetCenter(){return m_Center;}
float GetRadius(){return m_Radius;}
DWORD GetVertexFormat() {return m_VtxFormat;}
int GetVertexSize() {return m_VtxSize;}
LPDIRECT3DVERTEXBUFFER9 GetVertexBufferPt() {return m_pVB;}
LPDIRECT3DINDEXBUFFER9 GetIndexBufferPt() {return m_pIB;}
int GetVertexCount() {return m_VtxCount;}
int GetIndexCount() {return m_IdxCount;}
int GetTriangleCount() {return m_TriCount;}
//---------------------------------------------------------
bool HasTexture(){return m_bTexture;}
LPCSTR GetTextureName() {return m_TextureName;}
LPDIRECT3DTEXTURE9 GetTexturePt() {return m_pTexture;}
bool HasDiffuse(){return m_bDiffuse;}
DWORD GetDiffuseColor(){return m_Diffuse;}
bool HasMaterial(){return m_bMaterial;}
D3DMATERIAL9 GetMaterial(){return m_Material;}
bool IsTransparent(){return m_bTransparent;}
};
class CS3DModel
{
private:
bool ProcessModelScene();
protected:
LPDIRECT3DDEVICE9 m_pD3DDevice;
vector<CS3DShape*> m_ShapeList;
D3DXVECTOR3 m_Center;
float m_Radius;
public:
virtual ~CS3DModel();
CS3DModel(LPDIRECT3DDEVICE9 pD3DDevice, LPCWSTR FileName);
int GetShapeCount() {return m_ShapeList.size();}
CS3DShape* GetShape(int i) {return m_ShapeList[i];}
D3DXVECTOR3 GetCenter(){return m_Center;}
float GetRadius(){return m_Radius;}
};
} //end of namespace
using namespace s3d;
#endif // __S3D_MODEL__