Skip to content

Commit

Permalink
Added hasMesh
Browse files Browse the repository at this point in the history
  • Loading branch information
pariterre committed Feb 23, 2024
1 parent 64a593c commit 1edb9a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/RigidBody/Mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ class BIORBD_API Mesh
///
utils::Vector3d& color() const;

///
/// \brief Return if there is a mesh
/// \return If there is a mesh
bool hasMesh() const;

///
/// \brief Add a point to the mesh
/// \param node The point to add
Expand Down
3 changes: 3 additions & 0 deletions src/RigidBody/Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ utils::Vector3d &rigidbody::Mesh::color() const
return *m_patchColor;
}

bool rigidbody::Mesh::hasMesh() const {
return m_vertex->size() > 0;
}
void rigidbody::Mesh::addPoint(const utils::Vector3d &node)
{
m_vertex->push_back(node);
Expand Down

0 comments on commit 1edb9a0

Please sign in to comment.