Skip to content

Commit

Permalink
fixing polyscope deprecatd APIé
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoeurjo committed Nov 6, 2024
1 parent a18964d commit c9cdd5c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/polyscope-examples/tangency-explorer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ void myCallback()
face_idx = idx - nv;
is_selected = true;
selected_kpoint = Point::zero;
for ( auto i : selectedSurface->faces[ face_idx ] )
for ( auto i : surfmesh.incidentVertices( face_idx ) )
selected_kpoint += digital_points[ i ];
selected_kpoint /= 2;
std::ostringstream otext;
Expand All @@ -485,8 +485,9 @@ void myCallback()
edge_idx = idx - nv - nf;
is_selected = false; // true; // ne fonctionne pas
selected_kpoint = Point::zero;
for ( auto i : selectedSurface->edgeIndices[ edge_idx ] )
selected_kpoint += digital_points[ i ];
auto vv = surfmesh.edgeVertices( edge_idx );
selected_kpoint += digital_points[ vv.first ];
selected_kpoint += digital_points[ vv.second ];
selected_kpoint /= 2;
std::ostringstream otext;
otext << "Selected edge = " << edge_idx
Expand Down

0 comments on commit c9cdd5c

Please sign in to comment.