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

📄 staticgeometry.h

📁 小型的3D游戏引擎
💻 H
字号:
#ifndef _STATICGEOMETRY_H_
#define _STATICGEOMETRY_H_
#include "global.h"
#include "math/vector.h"
#include "entity/entity.h"

class GcStaticGeometry : GcRenderEntity
{
	public:
		GcStaticGeometry();
		~GcStaticGeometry();

		// Add collision detection

		void ReadVertices( const GcVector3 * vertices, int num );
		void ReadVertices( const float * vertices, int num );
		void ClearVertices();

		void ReadIndices( const int * indices, int num );
		void ClearIndices();

		void Prepare();

		void Render();

	private:
		float * m_vertices; // Stores vertices
		int * m_indices; // Stores indices for each polygon
		int m_totalVertices; // Total number of vertices
		int m_totalIndices; // Total number of indices
		PrimitiveType m_type; // Primitive type to render geometry as

};

#endif /* _STATICGEOMETRY_H_ */

⌨️ 快捷键说明

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