38 #ifndef HPP_FCL_MESH_LOADER_ASSIMP_H
39 #define HPP_FCL_MESH_LOADER_ASSIMP_H
69 void load (
const std::string& resource_path);
85 unsigned vertices_offset,
95 template<
class BoundingVolume>
103 int res = mesh->beginModel ();
107 std::ostringstream error;
108 error <<
"fcl BVHReturnCode = " << res;
109 throw std::runtime_error (error.str ());
112 buildMesh (scale, scene, (
unsigned) mesh->num_vertices, tv);
127 template<
class BoundingVolume>
133 scene.
load (resource_path);
A class describing the bounding hierarchy of a mesh model or a point cloud model (which is viewed as ...
Definition: BVH_model.h:278
#define HPP_FCL_DLLAPI
Definition: config.hh:64
void meshFromAssimpScene(const fcl::Vec3f &scale, const aiScene *scene, const shared_ptr< BVHModel< BoundingVolume > > &mesh)
Convert an assimp scene to a mesh.
Definition: assimp.h:96
void buildMesh(const fcl::Vec3f &scale, const aiScene *scene, unsigned vertices_offset, TriangleAndVertices &tv)
Recursive procedure for building a mesh.
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
Definition: data_types.h:67
void loadPolyhedronFromResource(const std::string &resource_path, const fcl::Vec3f &scale, const shared_ptr< BVHModel< BoundingVolume > > &polyhedron)
Read a mesh file and convert it to a polyhedral mesh.
Definition: assimp.h:128
@ BVH_OK
Definition: BVH_internal.h:65
Main namespace.
Definition: AABB.h:44
Assimp::Importer * importer
Definition: assimp.h:71
aiScene const * scene
Definition: assimp.h:72
void load(const std::string &resource_path)
std::vector< fcl::Vec3f > vertices_
Definition: assimp.h:61
std::vector< fcl::Triangle > triangles_
Definition: assimp.h:62