File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,11 @@ class BIORBD_API Mesh
7171 // /
7272 utils::Vector3d& color () const ;
7373
74+ // /
75+ // / \brief Return if there is a mesh
76+ // / \return If there is a mesh
77+ bool hasMesh () const ;
78+
7479 // /
7580 // / \brief Add a point to the mesh
7681 // / \param node The point to add
Original file line number Diff line number Diff line change @@ -2275,6 +2275,7 @@ rigidbody::Mesh Reader::readMeshFileStl(
22752275 }
22762276
22772277 rigidbody::Mesh mesh;
2278+ mesh.setPath (path);
22782279 if (isBinary){
22792280 // Know the number of points
22802281 char headerChar[80 ] = " " ;
@@ -2284,7 +2285,6 @@ rigidbody::Mesh Reader::readMeshFileStl(
22842285 file.readFromBinary (nbTrianglesChar, 4 );
22852286 size_t nbTriangles = static_cast <size_t >(*((unsigned int *) nbTrianglesChar));
22862287
2287- mesh.setPath (path);
22882288 utils::Vector3d normal;
22892289 utils::Vector3d vertex;
22902290 for (int i = 0 ; i<nbTriangles; ++i){
Original file line number Diff line number Diff line change @@ -78,6 +78,9 @@ utils::Vector3d &rigidbody::Mesh::color() const
7878 return *m_patchColor;
7979}
8080
81+ bool rigidbody::Mesh::hasMesh () const {
82+ return m_vertex->size () > 0 ;
83+ }
8184void rigidbody::Mesh::addPoint (const utils::Vector3d &node)
8285{
8386 m_vertex->push_back (node);
You can’t perform that action at this time.
0 commit comments