vectormath library question
Posted: 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.
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.