⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bsputil.h

📁 空战游戏flacon源码
💻 H
字号:
#ifndef _3DEJ_BSPUTIL_H_
#define _3DEJ_BSPUTIL_H_

//-----------------------------------------------------------------------------

#include <stdio.h>
#include <string.h>
#include <math.h>
#include "..\..\3Dlib\defines.h"
#include "..\..\3Dlib\inline.h"
#include "..\..\3Dlib\object.h"
#include "..\..\3Dlib\util.h"

//-----------------------------------------------------------------------------

struct DynamicVertexRecord {
	GLint   vtxnum;
	GLbyte	polyname[256];
	GLint	index;
};

struct GLvertexDataX {
	GLvertexData	vd;
	GLint			usedflag;
	GLint			index;
};

struct GLvertexCoordX {
	GLvertexCoord	coord;
	GLint			flag;
	GLint			index;
};

struct GLbeadTreeX {
	GLbeadTree	*bead;
	GLint		usedflag;
};

class CBSPUtil {
protected:
	GLint		VertexIndex, TotalPolygon;
	GLvertexData *GetVertex (GLint index);
	GLvertex	 *GetCoord (GLint index);
	GLvertex	 *GetVertexCoord (GLint index);
	void AdjustVertexList (GLvertexData *vtxlist);

public:
	CBSPUtil () {};
	virtual ~CBSPUtil() {};

	void Setup ();
	void Cleanup ();
	void SetVertexDofPtr (void *dataptr);
	GLint InsertVertex (GLvertexData *vtx, GLvertex *coord, GLint flag=0, void *dataptr=0);
	GLint CreateVertexList (GLObjectData *data, GLint totaldynamic, DynamicVertexRecord *dynamicvtx);
	void CalculatePlane (GLbeadPolygon *face);
	void InsertPolygon (GLbeadTree *bead);
	void RemovePolygon (GLbeadTree *bead);
	GLbeadTree		*allocateBead ();
	GLbeadPolygon	*allocatePolygon (GLint totalvert);
};

//-----------------------------------------------------------------------------

#endif

⌨️ 快捷键说明

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