Skip to content

Commit

Permalink
added edge is visible routine
Browse files Browse the repository at this point in the history
  • Loading branch information
mlivesu committed Nov 16, 2023
1 parent 111d334 commit ecb7fb2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions include/cinolib/meshes/abstract_polyhedralmesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,22 @@ bool AbstractPolyhedralMesh<M,V,E,F,P>::face_is_visible(const uint fid, uint & p

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

template<class M, class V, class E, class F, class P>
CINO_INLINE
bool AbstractPolyhedralMesh<M,V,E,F,P>::edge_is_visible(const uint eid) const
{
for(uint pid : this->adj_e2p(eid))
{
if(!this->poly_data(pid).flags[HIDDEN])
{
return true;
}
}
return false;
}

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

template<class M, class V, class E, class F, class P>
CINO_INLINE
void AbstractPolyhedralMesh<M,V,E,F,P>::face_apply_labels(const std::vector<int> & labels)
Expand Down
1 change: 1 addition & 0 deletions include/cinolib/meshes/abstract_polyhedralmesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ class AbstractPolyhedralMesh : public AbstractMesh<M,V,E,P>
std::vector<uint> edge_faces_link (const uint eid) const;
uint edge_split (const uint eid, const vec3d & p);
double edge_dihedral_angle (const uint eid) const override;
bool edge_is_visible (const uint eid) const;

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

Expand Down

0 comments on commit ecb7fb2

Please sign in to comment.