38 #ifndef HPP_FCL_MESH_LOADER_ASSIMP_H 39 #define HPP_FCL_MESH_LOADER_ASSIMP_H 67 void load (
const std::string& resource_path);
83 unsigned vertices_offset,
93 template<
class BoundingVolume>
101 int res = mesh->beginModel ();
105 std::ostringstream error;
106 error <<
"fcl BVHReturnCode = " << res;
107 throw std::runtime_error (error.str ());
110 buildMesh (scale, scene, (
unsigned) mesh->num_vertices, tv);
125 template<
class BoundingVolume>
131 scene.
load (resource_path);
139 #endif // HPP_FCL_MESH_LOADER_ASSIMP_H
Main namespace.
Definition: AABB.h:43
void buildMesh(const fcl::Vec3f &scale, const aiScene *scene, unsigned vertices_offset, TriangleAndVertices &tv)
Recursive procedure for building a mesh.
void loadPolyhedronFromResource(const std::string &resource_path, const fcl::Vec3f &scale, const boost::shared_ptr< BVHModel< BoundingVolume > > &polyhedron)
Read a mesh file and convert it to a polyhedral mesh.
Definition: assimp.h:126
std::vector< fcl::Triangle > triangles_
Definition: assimp.h:60
Definition: BVH_internal.h:65
A class describing the bounding hierarchy of a mesh model or a point cloud model (which is viewed as ...
Definition: BVH_model.h:255
aiScene const * scene
Definition: assimp.h:70
void meshFromAssimpScene(const fcl::Vec3f &scale, const aiScene *scene, const boost::shared_ptr< BVHModel< BoundingVolume > > &mesh)
Convert an assimp scene to a mesh.
Definition: assimp.h:94
std::vector< fcl::Vec3f > vertices_
Definition: assimp.h:59
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
Definition: data_types.h:73
void load(const std::string &resource_path)
Assimp::Importer * importer
Definition: assimp.h:69