compat.box2d
#includeBox2D 3.2.0 — the 2D rigid-body physics engine for games (C17, cross-platform deterministic), MIT
#include <box2d/box2d.h>
mcpp add compat.box2d@3.2.0
用法
來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。
// compat.box2d — Box2D 3.2.0, on a world that needs it.
//
// WHAT THIS ASSERTS AND WHY
//
// the version b2GetVersion, the linked library's own numbers
// a falling box gravity, a contact with the ground, a body at rest
// on it, and its sleep — the solver end to end
// events contact begin events, body move events
// queries a ray cast and an AABB overlap against the world
// geometry b2MakeBox's mass, b2ComputeHull of a point cloud
// determinism upstream's "falling hinges" scene (shared/
// determinism.c, test/test_determinism.c): 80 boxes
// in hinged pairs fall and settle; the step on which
// the world falls asleep and the djb2 hash of every
// body's final transform are upstream's pinned values
// (299, 0x465F3DF4) — with one worker, with four
// workers of the built-in scheduler, and on the 4-wide
// SSE2 solver path where the CPU would take AVX2.
//
// A pass means the library was built as upstream builds it: the hash moves
// with any value-changing floating-point transform (FMA contraction above all),
// on any row.
// …
tests/examples/box2d/tests/box2d.cpp · 專案 tests/examples/box2d
建置
- targets
box2d (lib)- language
c++23- C standard
gnu17- import std
- no
- include dirs
*/include
原始檔 (1)
*/src/*.c