Library:Bullet Physics
Appearance
| On this wiki | Facts · Code · Notes · Topics |
|---|
Bullet is a zlib-licensed open source physics engine used in games and tools; its version constant is BT_BULLET_VERSION (326 in the 3.x tree) and its .bullet serialization files start with a 12-byte header such as BULLETf-v326.
Identification
- Version constant:
BT_BULLET_VERSIONinsrc/LinearMath/btScalar.h; the inline functionbtGetVersion()returns it, andbtIsDoublePrecision()reports whether the library was built withBT_USE_DOUBLE_PRECISION. In the bullet3 tree read here the value is 326 (src/LinearMath/btScalar.h defines 282 at tag 2.82, 283 at 2.83, 286 at 2.86, 287 to 289 at 2.87 to 2.89 and 325 at 3.25, so the number is the release written without the dot). Because these are inline, a static build contains the number only as an immediate where the serializer header is built, or not at all. - Class names: Bullet uses the
btprefix (btRigidBody, btDiscreteDynamicsWorld, btCollisionDispatcher, btDbvt); RTTI names or error strings with these prefixes identify a static build in a game executable. Unverified: games commonly link it statically, so no DLL is present. - Serialization:
.bulletfiles written by btDefaultSerializer begin with a 12-byte ASCII header, see Fact:Bullet Physics/magic/.bullet file header. Chunks follow with four-character codes (RBDYrigid body,COBJcollision object,CONSconstraint,SHAPshape,BOXSbox shape,QBVHquantized BVH,DWLDdynamics world,CONTcontact manifold,MBDYmultibody,SBDYsoft body,DNA1the structure description table), see Fact:Bullet Physics/enum/Serializer chunk codes. - Because the file carries its own DNA (struct layout) chunk, the format is self-describing: a reader can interpret files from different Bullet versions and from 32 and 64-bit builds.
Sources
- bulletphysics/bullet3 (zlib): src/LinearMath/btScalar.h and btSerializer.h/.cpp were read.
Code & repositories
- https://github.com/bulletphysics/bullet3 @
d3afe76132fc76b0f9b2359cbaef47a3766e7fbb· license: Zlib (read from LICENSE.txt; GitHub's detector did not classify it)
Bullet 3 (zlib): src/LinearMath/btScalar.h holds BT_BULLET_VERSION; src/LinearMath/btSerializer.h builds the .bullet header and chunk codes
Tested on: source read, not run: source read only · checked 2026-10-18; last activity 2026-10-09