Magnum/BulletIntegration/Integration.h file

Conversion of Bullet math types.

Provides conversion for the following types:

Magnum typeEquivalent Bullet type
Vector3btVector3
Matrix3x3btMatrix3x3
Matrix4btTransform
QuaternionbtQuaternion

All type conversion is done with btScalar as the underlying type. It's typically a float, but Bullet can be compiled to use double instead. In that case, the above types are then Vector3d, Quaterniond etc.

Unlike Magnum, Bullet stores matrices in row-major order, so these get transposed during the conversion.

Example usage:

#include <Magnum/BulletIntegration/Integration.h>



btVector3 a{20.0f, 50.0f, -1.0f};
Vector3 b(a);

using namespace Math::Literals;
auto c = btQuaternion(Quaternion::rotation(15.0_degf, Vector3::xAxis()));