Skip to content

Commit

Permalink
(FrustumFilter) Fix top face not being colored correctly (openMVG#1773)
Browse files Browse the repository at this point in the history
  • Loading branch information
csparker247 authored and pmoulon committed Aug 17, 2020
1 parent b6e9df8 commit c856ccc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/openMVG/sfm/sfm_data_filters_frustum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,18 +199,18 @@ const
{
if (it->second.isInfinite()) // infinite frustum: drawn normalized cone: 4 faces
{
of << "3 " << count + 0 << ' ' << count + 1 << ' ' << count + 2 << color_other_face << '\n'
of << "3 " << count + 0 << ' ' << count + 1 << ' ' << count + 2 << color_top_face << '\n'
<< "3 " << count + 0 << ' ' << count + 2 << ' ' << count + 3 << color_other_face << '\n'
<< "3 " << count + 0 << ' ' << count + 3 << ' ' << count + 4 << color_top_face << '\n'
<< "3 " << count + 0 << ' ' << count + 3 << ' ' << count + 4 << color_other_face << '\n'
<< "3 " << count + 0 << ' ' << count + 4 << ' ' << count + 1 << color_other_face << '\n'
<< "4 " << count + 1 << ' ' << count + 2 << ' ' << count + 3 << ' ' << count + 4 << color_other_face << '\n';
count += 5;
}
else // truncated frustum: 6 faces
{
of << "4 " << count + 0 << ' ' << count + 1 << ' ' << count + 2 << ' ' << count + 3 << color_other_face << '\n'
<< "4 " << count + 0 << ' ' << count + 1 << ' ' << count + 5 << ' ' << count + 4 << color_other_face << '\n'
<< "4 " << count + 1 << ' ' << count + 5 << ' ' << count + 6 << ' ' << count + 2 << color_top_face << '\n'
<< "4 " << count + 0 << ' ' << count + 1 << ' ' << count + 5 << ' ' << count + 4 << color_top_face << '\n'
<< "4 " << count + 1 << ' ' << count + 5 << ' ' << count + 6 << ' ' << count + 2 << color_other_face << '\n'
<< "4 " << count + 3 << ' ' << count + 7 << ' ' << count + 6 << ' ' << count + 2 << color_other_face << '\n'
<< "4 " << count + 0 << ' ' << count + 4 << ' ' << count + 7 << ' ' << count + 3 << color_other_face << '\n'
<< "4 " << count + 4 << ' ' << count + 5 << ' ' << count + 6 << ' ' << count + 7 << color_other_face << '\n';
Expand Down

0 comments on commit c856ccc

Please sign in to comment.