]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/model/SGInteractionAnimation.cxx
Work around apparent OSG 3.2.0 normal binding bug.
[simgear.git] / simgear / scene / model / SGInteractionAnimation.cxx
index 956d7b69f693ddb1a6f8cd37e5391acdc1ba1fea..e6af9862e1fc7b9027a37ce2ad63d0d23968d78d 100644 (file)
 #include <osg/NodeVisitor>
 #include <osg/TemplatePrimitiveFunctor>
 
+#include <simgear/bvh/BVHGroup.hxx>
+#include <simgear/bvh/BVHLineGeometry.hxx>
+#include <simgear/scene/util/OsgMath.hxx>
 #include <simgear/scene/util/SGSceneUserData.hxx>
-#include <simgear/scene/bvh/BVHGroup.hxx>
-#include <simgear/scene/bvh/BVHLineGeometry.hxx>
 
 class SGInteractionAnimation::LineCollector : public osg::NodeVisitor {
     struct LinePrimitiveFunctor {
@@ -80,8 +81,8 @@ public:
         // Trick to get the ends in the right order.
         // Use the x axis in the original coordinate system. Choose the
         // most negative x-axis as the one pointing forward
-        SGVec3f tv1(_matrix.preMult(v1));
-        SGVec3f tv2(_matrix.preMult(v2));
+        SGVec3f tv1(toSG(_matrix.preMult(v1)));
+        SGVec3f tv2(toSG(_matrix.preMult(v2)));
         if (tv1[0] > tv2[0])
             _lineSegments.push_back(SGLineSegmentf(tv1, tv2));
         else