From 8d8035a1738dfbffa201a3116252817fe74f7a41 Mon Sep 17 00:00:00 2001 From: "Konstantin S. Matveyev" Date: Fri, 22 Sep 2017 11:34:28 +0300 Subject: [PATCH 1/2] LineSegmentIntersector fixed: intersection ratio remaped to the range of LineSegment => correct order in multiset of intersections --- src/osgUtil/LineSegmentIntersector.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/osgUtil/LineSegmentIntersector.cpp b/src/osgUtil/LineSegmentIntersector.cpp index 5a6b69afe..08faade5e 100644 --- a/src/osgUtil/LineSegmentIntersector.cpp +++ b/src/osgUtil/LineSegmentIntersector.cpp @@ -299,13 +299,17 @@ struct IntersectFunctor return; } - Vec3 in = v0*r0 + v1*r1 + v2*r2; + // Remap ratio into the range of LineSegment + const osg::Vec3d& lsStart = _settings->_lineSegIntersector->getStart(); + const osg::Vec3d& lsEnd = _settings->_lineSegIntersector->getEnd(); + double remap_ratio = ((_start - lsStart).length() + r*_length)/(lsEnd - lsStart).length(); + + Vec3 in = lsStart*(1.0 - remap_ratio) + lsEnd*remap_ratio; // == v0*r0 + v1*r1 + v2*r2; Vec3 normal = E1^E2; normal.normalize(); - LineSegmentIntersector::Intersection hit; - hit.ratio = r; + hit.ratio = remap_ratio; hit.matrix = _settings->_iv->getModelMatrix(); hit.nodePath = _settings->_iv->getNodePath(); hit.drawable = _settings->_drawable; From df8dc83fc776846a26bb0fe271b9f8603e55feb8 Mon Sep 17 00:00:00 2001 From: "Konstantin S. Matveyev" Date: Wed, 13 Dec 2017 11:47:02 +0300 Subject: [PATCH 2/2] osgAnimation serializes: static linking fix --- src/osgWrappers/serializers/osgAnimation/LibraryWrapper.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osgWrappers/serializers/osgAnimation/LibraryWrapper.cpp b/src/osgWrappers/serializers/osgAnimation/LibraryWrapper.cpp index 237d17b1f..aae2ed81a 100644 --- a/src/osgWrappers/serializers/osgAnimation/LibraryWrapper.cpp +++ b/src/osgWrappers/serializers/osgAnimation/LibraryWrapper.cpp @@ -12,6 +12,7 @@ USE_SERIALIZER_WRAPPER(osgAnimation_Bone) USE_SERIALIZER_WRAPPER(osgAnimation_MorphGeometry) USE_SERIALIZER_WRAPPER(osgAnimation_RigComputeBoundingBoxCallback) USE_SERIALIZER_WRAPPER(osgAnimation_RigGeometry) +USE_SERIALIZER_WRAPPER(osgAnimation_RigTransform) USE_SERIALIZER_WRAPPER(osgAnimation_Skeleton) USE_SERIALIZER_WRAPPER(osgAnimation_StackedMatrixElement) USE_SERIALIZER_WRAPPER(osgAnimation_StackedQuaternionElement)