#pragma once #include #include #include #include using namespace hgl; struct MeshData { UTF8String name; List position, //顶点 normal, //法线 tangent, //切线 bitangent; //副切线 List colors; //颜色 List indices16; //16位索引 List indices32; //32位索引 AABB bounding_box; };//struct MeshData struct ModelSceneNode { UTF8String name; Matrix4f local_matrix; List mesh_index; ObjectList children_node; //子节点 };//struct MeshNode struct ModelData { ObjectList mesh_data; Map mesh_by_name; ModelSceneNode *root_node; AABB bounding_box; public: void Add(MeshData *md) { mesh_data.Add(md); mesh_by_name.Add(md->name,md); } };//struct ModelData ModelData *AssimpLoadModel(const OSString &filename);