#include <mesh_parser.hpp>
Public Member Functions | |
MeshParser (const std::string &file_path) | |
int8_t | read (std::vector< TriangleSupport > &tri_vec) |
virtual | ~MeshParser () |
Private Member Functions | |
int8_t | toVec3f (uint32_t num_current_face, aiVector3D *vertex, fcl::Vec3f &out) |
Definition at line 27 of file mesh_parser.hpp.
MeshParser::MeshParser | ( | const std::string & | file_path | ) | [inline] |
Definition at line 33 of file mesh_parser.hpp.
virtual MeshParser::~MeshParser | ( | ) | [inline, virtual] |
Definition at line 39 of file mesh_parser.hpp.
int8_t MeshParser::read | ( | std::vector< TriangleSupport > & | tri_vec | ) | [virtual] |
Read from a mesh file by using assimp Importer. Iterates through the faces and tries to convert the corresponding vertices into a triangle vector.
tri_vec | Reference to a triangle vector storing the mesh data. |
Implements ParserBase.
Definition at line 36 of file mesh_parser.cpp.
int8_t MeshParser::toVec3f | ( | uint32_t | num_current_face, |
aiVector3D * | vertex, | ||
fcl::Vec3f & | out | ||
) | [private] |
Uses the current vertex (assimp 3d vector) and converts into fcl::Vec3f.
num_current_face | The number of the current face for error logging. |
vertex | Pointer to the current vertex. |
out | The fcl vector description. |
Definition at line 104 of file mesh_parser.cpp.