how to preserve scale of a 4x4 matrix?

khoowaikeong
Posts: 43
Joined: Fri Jun 15, 2012 7:11 am

how to preserve scale of a 4x4 matrix?

Post by khoowaikeong »

we are using 4x4 matrix to store transformation data of our collision/triggers mesh.

however, bullet use transform which doesn't do scaling.
and basically when we pass the transformation to bullet, the scale is lost.
so how to you fit a 4x4 matrix into bullet?

or is there a way to extract the different/data lost in the matrix->transform
and handle that separately?
khoowaikeong
Posts: 43
Joined: Fri Jun 15, 2012 7:11 am

Re: how to preserve scale of a 4x4 matrix?

Post by khoowaikeong »

a follow up, i considered after extracting the scale to use the setLocalScaling() to modified the values.
does that mean i need to remove the object and re-add it to the world to get the updated result?

and what is the cost of doing it if i have to readd the object...
would it make sense that since i have to rebuild the shape anyway,
i would just apply the scale directly into the mesh instead?

update: this is no longer an issue. so basically the end solution i use is to wrap a setmatrix/getmartrix to fuse the scaling and tranformation into the matrix... it ugly but it work.