UnrotateVector Function

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

UnrotateVector Function

Postby Zach Griffin » Sat Feb 14, 2009 3:34 am

Can someone please tell me what UnrotateVector does? Having a look at the matrix.cpp file I found a reference to it and tried to convert it but think there may be something wrong.

Code: Select all
r1 = p1 + rot.UnrotateVector (r1 - p1);


my attempt at it was this where p1 = globalPositionChildConstant, rotation = rot :
Code: Select all
r1 = globalPositionChildConstant +   Vector3((r1 - globalPositionChildConstant).dotProduct(rotation.xAxis()), (r1 - globalPositionChildConstant).dotProduct(rotation.yAxis()), (r1 - globalPositionChildConstant).dotProduct(rotation.zAxis()));
Zach Griffin
 
Posts: 13
Joined: Tue Oct 04, 2005 7:52 am

Re: UnrotateVector Function

Postby agi_shi » Sat Feb 14, 2009 8:25 am

UnrotateVector() is multiplying a vector by the inverse of the matrix, AFAIK.
agi_shi
 
Posts: 263
Joined: Fri Aug 17, 2007 6:54 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 14 guests