baiscobj.h

来自「全面而完整地展示了Visual C++ 结合 OpenGL 进行3D编程所用到的」· C头文件 代码 · 共 50 行

H
50
字号
// baiscobj.h: interface for the baiscobj class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BAISCOBJ_H__6F90C6A0_F5E4_4482_BA6B_136D5C922B31__INCLUDED_)
#define AFX_BAISCOBJ_H__6F90C6A0_F5E4_4482_BA6B_136D5C922B31__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class baiscobj  
{
public:
	baiscobj();
	virtual ~baiscobj();
public:

	float		g_terrain	[MAP_W*MAP_W][3];
	GLuint		g_index		[MAP_W*MAP_W* 2];
	float		g_texcoord	[MAP_W*MAP_W][2];
	void		InitTerrain(float h);	
	void		DrawSand();	
	float		GetHeight(float x, float z); 

	float	    g_eye [3]; 
	float	    g_look[3];
	float	    rad_xz;	
	float	    g_Angle;
	float	    g_elev;	
	BOOL		DisplayScene();	

	UINT		g_cactus[16];
	BITMAPINFOHEADER  g_bit;
	unsigned char    *g_imageData; 
	void		CreateSkyBox(int a,int wi,int he,int le);
	void		texture(UINT textur);
	void		light0();    

	void		picter(float x,float y,float z); 
	bool		LoadT8(char *filename, GLuint &texture);
	void		LoadT16(char *filename, GLuint &texture);
	unsigned char* LoadBit(char *filename, BITMAPINFOHEADER *bitmap);

	void		ShowTree(float x,float z,float h,float s,int cactus);
	void		ShowTree0(float x,float z,float h,float s,int cactus);
};

#endif // !defined(AFX_BAISCOBJ_H__6F90C6A0_F5E4_4482_BA6B_136D5C922B31__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?