www.pudn.com > 3D_Tank.rar > TerrainInfo.h
#ifndef __TERRAININFO_H__ #define __TERRAININFO_H__ #include#include #include #include "Arithmetic.h" class CTerrainInfo { public: CTerrainInfo(); ~CTerrainInfo(); VOID InitTerrainInfo(LPCTSTR pSrcRawFile, int nCxPixel, int nCyPixel, int nCxLength, int nCzLength); float GetXVertex(float x); float GetZVertex(float z); float GetHeight(float x, float z); VOID GetNormal(float x, float z, D3DXVECTOR3 *vNormal); BOOL IsInTerrain(float x, float z); int GetPolygonCount(); int GetVertexCount(); int GetCxVertexCount(); int GetCzVertexCount(); int GetCxBlockLength(); int GetCzBlockLength(); std::vector m_vecHeight; private: int m_nCxVertexCount; int m_nCzVertexCount; int m_nCxBlockLength; int m_nCzBlockLength; Box m_BoundingBox; }; #endif //TerrainInfo