Skip to content

Commit

Permalink
selectively order one rings
Browse files Browse the repository at this point in the history
  • Loading branch information
mlivesu committed Jan 3, 2024
1 parent eb34224 commit 13a69f9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
25 changes: 17 additions & 8 deletions include/cinolib/meshes/abstract_polygonmesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,19 +562,28 @@ void AbstractPolygonMesh<M,V,E,P>::vert_order_all_one_rings()
{
for(uint vid=0; vid<this->num_verts(); ++vid)
{
std::vector<uint> v_link;
std::vector<uint> f_star;
std::vector<uint> e_star;
std::vector<uint> e_link;
this->vert_ordered_one_ring(vid,v_link,f_star,e_star,e_link);
this->adj_v2v(vid) = v_link;
this->adj_v2e(vid) = e_star;
this->adj_v2p(vid) = f_star;
vert_order_one_ring(vid);
}
}

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

template<class M, class V, class E, class P>
CINO_INLINE
void AbstractPolygonMesh<M,V,E,P>::vert_order_one_ring(const uint vid)
{
std::vector<uint> v_link;
std::vector<uint> f_star;
std::vector<uint> e_star;
std::vector<uint> e_link;
this->vert_ordered_one_ring(vid,v_link,f_star,e_star,e_link);
this->adj_v2v(vid) = v_link;
this->adj_v2e(vid) = e_star;
this->adj_v2p(vid) = f_star;
}

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

template<class M, class V, class E, class P>
CINO_INLINE
void AbstractPolygonMesh<M,V,E,P>::vert_ordered_one_ring(const uint vid,
Expand Down
1 change: 1 addition & 0 deletions include/cinolib/meshes/abstract_polygonmesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ class AbstractPolygonMesh : public AbstractMesh<M,V,E,P>
std::vector<uint> vert_ordered_edges_star (const uint vid) const;
std::vector<uint> vert_ordered_edges_link (const uint vid) const;
void vert_order_all_one_rings();
void vert_order_one_ring (const uint vid);
void vert_ordered_one_ring (const uint vid,
std::vector<uint> & v_link, // sorted list of adjacent vertices
std::vector<uint> & f_star, // sorted list of adjacent triangles
Expand Down

0 comments on commit 13a69f9

Please sign in to comment.