Canvas: fix element mouse hit detection with OSG 3.3.2.

This commit is contained in:
Thomas Geymayer 2014-08-10 15:36:27 +02:00
parent b11ff19a0f
commit 68d0891665

View File

@ -398,7 +398,13 @@ namespace canvas
// Drawables have a bounding box... // Drawables have a bounding box...
if( _drawable ) 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() ) else if( _transform.valid() )
// ... for other elements, i.e. groups only a bounding sphere is available // ... for other elements, i.e. groups only a bounding sphere is available
return _transform->getBound().contains(osg::Vec3f(parent_pos, 0)); return _transform->getBound().contains(osg::Vec3f(parent_pos, 0));