Skip to content

Commit 59934a9

Browse files
committed
use the old getHSB if ogre 1.10 or earlier
1 parent 31a51fc commit 59934a9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fuse_viz/src/relative_pose_2d_stamped_constraint_visual.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,13 @@ Ogre::ColourValue RelativePose2DStampedConstraintVisual::computeLossErrorLineCol
343343
// Get the error line color as HSB:
344344
Ogre::ColourValue error_line_color(color.r, color.g, color.b);
345345
Ogre::Real hue, saturation, brightness;
346+
#if (OGRE_VERSION < ((1 << 16) | (11 << 8) | 0))
347+
// 1.10 or earlier
348+
error_line_color.getHSB(&hue, &saturation, &brightness);
349+
# else
350+
// 1.11 or later
346351
error_line_color.getHSB(hue, saturation, brightness);
352+
#endif
347353

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

0 commit comments

Comments
 (0)