]> git.mxchange.org Git - simgear.git/commitdiff
Canvas: fix element mouse hit detection with OSG 3.3.2.
authorThomas Geymayer <tomgey@gmail.com>
Sun, 10 Aug 2014 13:36:27 +0000 (15:36 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Sun, 10 Aug 2014 13:37:43 +0000 (15:37 +0200)
simgear/canvas/elements/CanvasElement.cxx

index f89529259e2faf95a964c6c755515bc3250df6a1..6d8c93058e95f8a7cb4b34c26c91e0eabb2e12de 100644 (file)
@@ -398,7 +398,13 @@ namespace canvas
 
     // Drawables have a bounding box...
     if( _drawable )
-      return _drawable->getBound().contains(osg::Vec3f(local_pos, 0));
+      return _drawable->
+#if OSG_VERSION_LESS_THAN(3,3,2)
+      getBound()
+#else
+      getBoundingBox()
+#endif
+      .contains(osg::Vec3f(local_pos, 0));
     else if( _transform.valid() )
       // ... for other elements, i.e. groups only a bounding sphere is available
       return _transform->getBound().contains(osg::Vec3f(parent_pos, 0));