@@ -26,12 +26,14 @@ class CollisionMesh {
2626
2727 // / @brief Construct a new Collision Mesh object from a full mesh vertices.
2828 // / @param include_vertex Vector of bools indicating whether each vertex should be included in the collision mesh.
29+ // / @param orient_vertex Vector of bools indicating whether each vertex is orientable.
2930 // / @param full_rest_positions The vertices of the full mesh at rest (|V| × dim).
3031 // / @param edges The edges of the collision mesh indexed into the full mesh vertices (|E| × 2).
3132 // / @param faces The faces of the collision mesh indexed into the full mesh vertices (|F| × 3).
3233 // / @param displacement_map The displacement mapping from displacements on the full mesh to the collision mesh.
3334 CollisionMesh (
3435 const std::vector<bool >& include_vertex,
36+ const std::vector<bool >& orient_vertex,
3537 Eigen::ConstRef<Eigen::MatrixXd> full_rest_positions,
3638 Eigen::ConstRef<Eigen::MatrixXi> edges = Eigen::MatrixXi(),
3739 Eigen::ConstRef<Eigen::MatrixXi> faces = Eigen::MatrixXi(),
@@ -49,7 +51,7 @@ class CollisionMesh {
4951 Eigen::ConstRef<Eigen::MatrixXi> faces = Eigen::MatrixXi())
5052 {
5153 return CollisionMesh (
52- construct_is_on_surface (full_rest_positions.rows (), edges),
54+ construct_is_on_surface (full_rest_positions.rows (), edges), std::vector< bool >(full_rest_positions. rows (), false ),
5355 full_rest_positions, edges, faces);
5456 }
5557
@@ -99,6 +101,8 @@ class CollisionMesh {
99101
100102 bool is_codim_vertex (const long & v) const { return m_is_codim_vertex[v]; }
101103
104+ bool is_orient_vertex (const long & v) const { return m_is_orient_vertex[v]; }
105+
102106 // / @brief Get the indices of codimensional edges of the collision mesh (#CE x 1).
103107 const Eigen::VectorXi& codim_edges () const { return m_codim_edges; }
104108
@@ -322,6 +326,8 @@ class CollisionMesh {
322326 Eigen::MatrixXd m_rest_positions;
323327 // / @brief The mask of codimensional vertices (#V).
324328 std::vector<bool > m_is_codim_vertex;
329+ // / @brief The mask of orientable vertices (#V).
330+ std::vector<bool > m_is_orient_vertex;
325331 // / @brief The indices of codimensional vertices (#CV x 1).
326332 Eigen::VectorXi m_codim_vertices;
327333 // / @brief The mask of codimensional edges (#E).
0 commit comments