Skip to content

Commit

Permalink
Apply modification also for constraint matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
bakpaul authored and fredroy committed Mar 5, 2025
1 parent 39defb1 commit efedeb7
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,9 @@ void DistanceToPlaneMapping<TIn>::applyJT(const core::ConstraintParams *cparams,
auto o = writeMatrixOut->writeLine(rowIt.index());
while (colIt != colItEnd)
{
if constexpr (!type::isRigidType<TIn>)
o.addCol(colIt.index(), planeNormal*colIt.val()[0]);
else
o.addCol(colIt.index(), sofa::Deriv_t<TIn>(planeNormal * colIt.val()[0],typename sofa::Deriv_t<TIn>::Rot() * 0) );
Deriv_t<TIn> normal;
TIn::setDPos(normal,planeNormal*colIt.val()[0]);
o.addCol(colIt.index(), normal);

++colIt;
}
Expand Down

0 comments on commit efedeb7

Please sign in to comment.