Dem.h
资源名称:虚拟地形建模.rar [点击查看]
上传用户:dfjhuyju
上传日期:2013-03-13
资源大小:11035k
文件大小:1k
源码类别:
OpenGL
开发平台:
Visual C++
- // Dem.h: interface for the CDem class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_DEM_H__502C57A1_E97C_432C_8A84_CC5F4EA1C786__INCLUDED_)
- #define AFX_DEM_H__502C57A1_E97C_432C_8A84_CC5F4EA1C786__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "Vector3.h"
- struct Cvpoint
- {
- float x;
- float y;
- float z;
- };
- class CDem
- {
- public:
- CDem();
- virtual ~CDem();
- public:
- void ReadDem(char *demfile);
- void ReadTextDem(char *demfile);
- void CreateCompileList();
- void RenderDem();
- void SetViewPosition(float *eye_x, float *eye_y, float *eye_z);
- private:
- void SetColor(float height);
- void SetNormal(int i, int j);
- GLuint CreateTexture( CString filename );
- CVector3 CalNormal(CVector3 p1,CVector3 p2,CVector3 p3);
- private:
- double m_fLeftDownX;
- double m_fLeftDownY;
- double m_fRightUpX;
- double m_fRightUpY;
- int m_iCountX;
- int m_iCountY;
- double m_fIntervalX;
- double m_fIntervalY;
- double m_fRealDistance;
- float m_fMax_Height;
- float m_fMin_Height;
- float *m_fHeight;
- int m_iList;
- GLuint m_tTexure;
- };
- #endif // !defined(AFX_DEM_H__502C57A1_E97C_432C_8A84_CC5F4EA1C786__INCLUDED_)