Skip to content

Commit 5b4dd94

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

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fuse_viz/src/relative_pose_2d_stamped_constraint_visual.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include <tf2/utils.h>
4747
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
4848

49+
#include <OgrePrerequisites.h>
4950
#include <OgreQuaternion.h>
5051
#include <OgreSceneManager.h>
5152
#include <OgreSceneNode.h>
@@ -343,7 +344,13 @@ Ogre::ColourValue RelativePose2DStampedConstraintVisual::computeLossErrorLineCol
343344
// Get the error line color as HSB:
344345
Ogre::ColourValue error_line_color(color.r, color.g, color.b);
345346
Ogre::Real hue, saturation, brightness;
347+
#if (OGRE_VERSION < ((1 << 16) | (11 << 8) | 0))
348+
// 1.10 or earlier
349+
error_line_color.getHSB(&hue, &saturation, &brightness);
350+
# else
351+
// 1.11 or later
346352
error_line_color.getHSB(hue, saturation, brightness);
353+
#endif
347354

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

0 commit comments

Comments
 (0)