From 59934a979a4e9d405b980e91518c0c662757c7d2 Mon Sep 17 00:00:00 2001 From: Lucas Walter Date: Wed, 17 Apr 2024 08:08:36 -0700 Subject: [PATCH] use the old getHSB if ogre 1.10 or earlier --- fuse_viz/src/relative_pose_2d_stamped_constraint_visual.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fuse_viz/src/relative_pose_2d_stamped_constraint_visual.cpp b/fuse_viz/src/relative_pose_2d_stamped_constraint_visual.cpp index b85cfad1c..120440fc9 100644 --- a/fuse_viz/src/relative_pose_2d_stamped_constraint_visual.cpp +++ b/fuse_viz/src/relative_pose_2d_stamped_constraint_visual.cpp @@ -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.