Jump to content

[vex] pretranslate vs translate + Bullet?


catchyid

Recommended Posts

Hello,

I am trying to understand what is the difference between pretranslate and translate (in order to understand the code below which applies points transforms to RBD primitives). Note, in the code below, orient, pivot and P attributes come from the points attributes

matrix xform = qconvert(orient); //convert quaternion into 4x4 rotation matrix, checked and 4th column is [0 0 0 1], i.e. no translation

pretranslate(xform, -pivot); //what does it mean? maybe xform= -pivot * xform *pivot

translate(xform, P); //does it mean xform = xform * P, i.e. just add the translation component to the existing one in the matrix?

v@P *= xform;

//--

I have a question: I assume Bullet uses center of mass for rotation, hence we have "pivot" attribute?  and "P" is just a pure translation in world coordinates?

 

Thanks,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...