Bullet Physics & VectorMath

leolomas
Posts: 3
Joined: Thu Mar 06, 2014 12:05 am

Bullet Physics & VectorMath

Post by leolomas »

I have just found out that bullet physics includes the VectorMath lib, so I have two questions for you guys:

1. Is there some way to create an Affine Matrix (4x4) in bullet without using VectorMath::Aos::Matrix4?

2. What is the easiest way to convert from bullet data types (btQuaternion, btMatrix3x3, etc) to VectorMath data types? (Quat, Matrix3, etc) and vice versa, I don't want to reinvent the wheel in case there are some functions for that purpose.

Thanks in advance!
leolomas
Posts: 3
Joined: Thu Mar 06, 2014 12:05 am

Re: Bullet Physics & VectorMath

Post by leolomas »

Anyone?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Bullet Physics & VectorMath

Post by Erwin Coumans »

VectorMath is removed from latest Bullet revision, so the next release won't have it.

There is no 4x4 matrix functionality, Bullet only deals with rigid body transforms: a pure rotational part (3x3 matrix or quaterion) and translation part.
Unlike graphics renderers, rigid body transforms don't support shearing, reflection, projection or scaling.

You can convert from btTransform to an 4x4 OpenGL matrix.
leolomas
Posts: 3
Joined: Thu Mar 06, 2014 12:05 am

Re: Bullet Physics & VectorMath

Post by leolomas »

Thank you Erwin!, that's all I needed to know.