LiFeng_Terrain.h
资源名称:虚拟地形建模.rar [点击查看]
上传用户:dfjhuyju
上传日期:2013-03-13
资源大小:11035k
文件大小:1k
源码类别:
OpenGL
开发平台:
Visual C++
- #include<gl/gl.h>
- #include<gl/glu.h>
- #include<gl/glaux.h>
- struct Cvpoint
- {
- float x;
- float y;
- float z;
- };
- struct Triangle
- {
- int p1;
- int p2;
- int p3;
- };
- struct DEMHEADER
- {
- double LeftDown_X;
- double LeftDown_Y;
- double RightUp_X;
- double RightUp_Y;
- long X_Count;
- long Y_Count;
- double X_Interval;
- double Y_Interval;
- double Real_Distance;
- float Max_Height;
- float Min_Height;
- float *dem_Height;
- };
- class LiFeng_Terrain
- {
- public:
- LiFeng_Terrain();
- ~LiFeng_Terrain();
- };
- class LiFeng_DEM
- {
- public:
- LiFeng_DEM();
- ~LiFeng_DEM();
- BOOL LiFeng_ReadDem(CString filename);
- BOOL LiFeng_Compile();
- BOOL LiFeng_DisplayDem();
- protected:
- DEMHEADER *Dem_Header;
- float *Dem_Height;
- };
- class LiFeng_TIN
- {
- public:
- LiFeng_TIN();
- ~LiFeng_TIN();
- BOOL LiFeng_ReadTin(CString filename);
- BOOL LiFeng_DisplayTin();
- BOOL LiFeng_Compile();
- BOOL LiFeng_Limit();
- float Max_X;
- float Min_X;
- float Max_Y;
- float Min_Y;
- float Max_Z;
- float Min_Z;
- protected:
- int Point_Count;
- int Triangle_Count;
- Cvpoint *m_Point;
- Triangle *m_Triangle;
- };
- class LiFeng_Texture
- {
- };