mcpp index

compat.box2d

#include

Box2D 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

版本

版本平台 镜像sha256
3.2.0 最新 LinuxWindowsmacOS CN GLOBAL ffec747b27a2…