Skip to content

Commit

Permalink
Fix bad rigid point transform calculation (#1002)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Feb 12, 2025
1 parent 19aad16 commit 49c566f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libopensimcreator/UI/ModelWarperV3/ModelWarperV3Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ namespace
const ThinPlateSplineCommonInputs& tpsInputs)
{
const TPSCoefficients3D& coefficients = lookupTPSCoefficients(tpsInputs);
const SimTK::Transform stationParentToLandmarksXform = landmarksFrame.getTransformInGround(state) * parentFrame.getTransformInGround(state);
const SimTK::Transform stationParentToLandmarksXform = landmarksFrame.getTransformInGround(state).invert() * parentFrame.getTransformInGround(state);
const SimTK::Vec3 inputLocationInLandmarksFrame = stationParentToLandmarksXform * locationInParent;
const auto warpedLocationInLandmarksFrame = to<SimTK::Vec3>(EvaluateTPSEquation(coefficients, to<Vec3>(inputLocationInLandmarksFrame), static_cast<float>(tpsInputs.blendingFactor)));
const SimTK::Vec3 warpedLocationInStationParentFrame = stationParentToLandmarksXform.invert() * warpedLocationInLandmarksFrame;
Expand Down

0 comments on commit 49c566f

Please sign in to comment.