SetMassMatrix()

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

SetMassMatrix()

Postby zak » Wed Jul 14, 2021 4:02 am

in ndBodyKinematic::SetMassMatrix(dFloat32 mass, const dMatrix& inertia)
the code
dAssert(Ixx > dFloat32(0.0f));
dAssert(Iyy > dFloat32(0.0f));
dAssert(Izz > dFloat32(0.0f));
should be?
dAssert(Ixx1 > dFloat32(0.0f));
dAssert(Iyy1 > dFloat32(0.0f));
dAssert(Izz1 > dFloat32(0.0f));
zak
 
Posts: 87
Joined: Mon Dec 06, 2004 9:30 am

Re: SetMassMatrix()

Postby Julio Jerez » Wed Jul 14, 2021 11:30 am

oh yes, fixed.
I also made the limit 10 time the value that was there,

the limit was a legacy from 2.xx that I kept but there is not real reason other than to protect users from making those kind of mistakes anymore.
Still an inertia that is 10000 time the mass made for very stiff mass matrices that could be hard to invert or integrate using 32bit floats, so I am capping to to a value in the range -1.0e4 to 1.0e4 the mass.
anyway I fixed the assert
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 22 guests