Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

the right way to represent inverse inertia tensor

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
5 replies to this topic

#1 Irlan Robson   Members   

4056
Like
0Likes
Like

Posted 11 February 2013 - 08:22 AM

float Ix, Iy, Iz;
 
        Ix = Iy = Iz = 0.4f * mass * radius * radius; //solid sphere
 
        inertia.m11 = Ix;            inertia.m12 = 0;        inertia.m13 = 0;
        inertia.m21 = 0;            inertia.m22 = Iy;        inertia.m23 = 0;
        inertia.m31 = 0;            inertia.m32 = 0;        inertia.m33 = Iz;
 
        b_inertia = m_inertia_inverse = inertia.inverse();
        float inverseInertia = 1.0f / Ix;
 
i'm doing this way and it's giving me problems... are you agree that is the right way??


#2 Dirk Gregorius   Members   

2709
Like
0Likes
Like

Posted 11 February 2013 - 10:29 AM

The inverse of inertia tensor in 3D is an inertia tensor itself. The example of the sphere is missleading since it is some scalar factor times the identity matrix.



#3 Irlan Robson   Members   

4056
Like
0Likes
Like

Posted 11 February 2013 - 11:28 AM

oh... then, i don't need to do: b_inertia = m_inertia_inverse = inertia.inverse(); right??


Edited by irlanrobson, 11 February 2013 - 11:29 AM.


#4 EWClay   Members   

659
Like
0Likes
Like

Posted 11 February 2013 - 12:35 PM

The inverse of inertia tensor in 3D is an inertia tensor itself. The example of the sphere is missleading since it is some scalar factor times the identity matrix.


Not sure what you are saying there. The units are different and a general inertia tensor is not equal to its inverse, and neither is it for a sphere.

Nothing looks obviously wrong with the matrix above.

#5 luca-deltodesco   Members   

637
Like
0Likes
Like

Posted 11 February 2013 - 12:51 PM

inverse_inertia = inertia.inverse();

 

Anyways, if it aids:

 

By choosing the correct coordinate system for the object (For basic objects, the obvious one), you can always diagonalise the inertia tensor, and so it, and its inverse can be stored in a vector instead of a matrix, and then the inverse is just the component wise inverse:

(Ix, Iy, Iz)^-1 = (1/Ix, 1/Iy, 1/Iz)


Edited by luca-deltodesco, 11 February 2013 - 12:57 PM.


#6 Irlan Robson   Members   

4056
Like
0Likes
Like

Posted 11 February 2013 - 01:25 PM

oh

 

inverse_inertia = inertia.inverse();

 

Anyways, if it aids:

 

By choosing the correct coordinate system for the object (For basic objects, the obvious one), you can always diagonalise the inertia tensor, and so it, and its inverse can be stored in a vector instead of a matrix, and then the inverse is just the component wise inverse:

(Ix, Iy, Iz)^-1 = (1/Ix, 1/Iy, 1/Iz)

hm... so i can use vectors .... or i can use   float inverseInertia = 1.0f / Ix; instead of vectors and do the multiplication between them...






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.