Skip to content

Commit

Permalink
use the old getHSB if ogre 1.10 or earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasw committed Apr 17, 2024
1 parent 31a51fc commit 59934a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fuse_viz/src/relative_pose_2d_stamped_constraint_visual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,13 @@ Ogre::ColourValue RelativePose2DStampedConstraintVisual::computeLossErrorLineCol
// Get the error line color as HSB:
Ogre::ColourValue error_line_color(color.r, color.g, color.b);
Ogre::Real hue, saturation, brightness;
#if (OGRE_VERSION < ((1 << 16) | (11 << 8) | 0))
// 1.10 or earlier
error_line_color.getHSB(&hue, &saturation, &brightness);
# else
// 1.11 or later
error_line_color.getHSB(hue, saturation, brightness);
#endif

// We should correct the color brightness if it is smaller than minimum brightness. Otherwise, we would get an
// incorrect loss brightness.
Expand Down

0 comments on commit 59934a9

Please sign in to comment.