vectormath library question

Post Reply
blubee
Posts: 2
Joined: Sun Nov 15, 2015 3:52 pm

vectormath library question

Post by blubee » Sun Nov 15, 2015 4:02 pm

Is this the right place to ask about the vectormath library that was open sourced by sony a while back?

I am using the scalar versions for some opengl work and wanted to ask a few questions.

Typically when doing 4x4 matrix translations I would just edit the 4th column data to translate the object around. With vectormath, there's two 4x4 matrix functions that I see, M4MakeTranslation or M4SetTranslation. Setting translation will reset my model matrix so if it was scaled it will lose it's scale.

MakeTranslation on the other hand will translate the model but for example if I translate the model 6 units to the right, then try to translate it 12 units up.

The model will seem to warp from one position to another when changing axis. I get the feeling that I am using the library incorrectly and so I wanted to ask here since it's one of the libraries used in the bullet 3d framework and I originally found the vectormath library in your source code.

d3x0r
Posts: 51
Joined: Tue Dec 11, 2012 9:59 pm

Re: vectormath library question

Post by d3x0r » Mon Nov 16, 2015 12:37 am

bullet doesn't use a 4x4 matrix. It uses a 4x3 (for alignment) matrix for orientation and a vector3 (which has 4 elements) for the origin.
(btTransform; composed of a btMatrix3x3 and a btVector3)
but there's no scaling...

So I dont think this will help you.

blubee
Posts: 2
Joined: Sun Nov 15, 2015 3:52 pm

Re: vectormath library question

Post by blubee » Tue Nov 17, 2015 5:52 am

thanks, i'll have to take some more time to figure this out. I like this library since the math is solid but I just have a little difficulty using it.

Post Reply