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

📄 dataloader.h

📁 游戏编程精粹6中关于用自适度二叉树进行空间剖分
💻 H
字号:
/*******************************************************************\
| DataLoader.h
|
|--------------------------------------------------------------------
| Copyright 2004/2005. Martin Fleisz.
| All rights reserved.
|
|--------------------------------------------------------------------
| CREATED:		2005/8/10
| AUTHOR:		Martin Fleisz
|
|--------------------------------------------------------------------
| DESCRIPTION:
| 
| Helper class to load data from a .ply file (or multiple .ply files)
\********************************************************************/
#ifndef __DATALOADER_H
#define __DATALOADER_H

#include <Windows.h>	// for the FindFirstFile/FindNextFile API functions
#include "rply.h"
#include "Types.h"




// define the structure of a ply vertex
class cDataLoader
{
	public:

		cDataLoader();
		~cDataLoader();

		bool	readPlyFiles();	// read all ply files from the \data directory
		vector<Vertex>*	getVertexData();
	
	private:
		
		void r_scanDirectory(String p_Dir);

		// ply reading functions
		static int vertex_cb_x(p_ply_argument p_Arg);
		static int vertex_cb_y(p_ply_argument p_Arg);
		static int vertex_cb_z(p_ply_argument p_Arg);
		static int vertex_cb_nx(p_ply_argument p_Arg);
		static int vertex_cb_ny(p_ply_argument p_Arg);
		static int vertex_cb_nz(p_ply_argument p_Arg);
		static int face_cb(p_ply_argument p_Arg);
		

		vector<string>	m_plyFiles;	// vector containing our input ply files
		vector<Vertex>	m_Vertices;

		
		vector<Vertex>	m_PlyVertexList;	// buffers for the ply reading functions
		uint32			m_VertexInsertCounter;
		uint32			m_FaceInsertCounter;
};


#endif // __DATALOADER_H

⌨️ 快捷键说明

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