diff options
Diffstat (limited to 'src/model/asefile.h')
| -rw-r--r-- | src/model/asefile.h | 47 | 
1 files changed, 47 insertions, 0 deletions
| diff --git a/src/model/asefile.h b/src/model/asefile.h index e129ec0..d8e3aea 100644 --- a/src/model/asefile.h +++ b/src/model/asefile.h @@ -10,11 +10,14 @@  #include "math/vector3f.h"  #include "model/model.h" +#include "model/material.h" +#include "model/fragment.h"  #include "model/triangle.h"  #include "filesystem/filestream.h"  #include <string>  #include <map> +#include <vector>  namespace model  { @@ -31,15 +34,35 @@ public:  	static Model *load(std::string const &name);  private: +	/** +	 * @brief type definition for a list of materials in the ASE file +	 */ +	typedef std::map<size_t, Material *> MaterialList; +	/** +	 * @brief type definition for a list of vertices in a GEOMOBJECT +	 */  	typedef std::map<size_t, math::Vector3f *> VertexList; +	/** +	 * @brief type definition for a list of faces in a GEOMOBJECT +	 */  	typedef std::map<size_t, Triangle *> FaceList;  	ASEFile(std::string const &name);  	~ASEFile();  	/** +	 * @brief read *MATERIAL +	 */ +	Material *read_material(std::istream &is); +	 +	/** +	 * @brief read *MATERIAL_LIST +	 */ +	bool read_material_list(std::istream &is); +	 +	/**  	 * @brief read *MESH_NORMALS  	 */  	bool read_mesh_normals(std::istream &is); @@ -75,6 +98,11 @@ private:  	bool read_geom(std::istream &is);  	/** +	 * @brief clear *GEOMOBJECT +	 */ +	bool clear_geom(); + +	/**  	 * @brief read the .ase header  	 */  	bool read_header(std::istream &is); @@ -92,6 +120,18 @@ private:  		return asefile_ifs.is_open();  	} +	inline size_t vertexcount() const { +		return ase_vertexcount; +	} + +	inline size_t facecount() const { +		return ase_facecount; +	} + +	inline FragmentGroup *fragmentgroup() { +		return ase_fragmentgroup; +	} +  	std::string		asefile_name;  	filesystem::IFileStream	asefile_ifs; @@ -102,9 +142,16 @@ private:  	FaceList		ase_facelist; +	MaterialList		ase_materiallist; +  	math::Vector3f		ase_maxbbox;  	math::Vector3f		ase_minbbox; + +	FragmentGroup		*ase_fragmentgroup; + +	size_t			ase_vertexcount; +	size_t			ase_facecount;  };  } // namespace model | 
