Full engine port in libs/box3d: math, geometry, GJK/TOI, hull builder, dynamic tree, manifolds, constraint graph, solver (serial, scalar SIMD path), all 8 joint types, sensors, mover, world API. 147 ported C unit tests green in debug and release. See libs/box3d/README.md for the upstream revision and sync notes, PORTING.md for conventions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
27 lines
474 B
Rust
27 lines
474 B
Rust
// Port of box3d/test/test_id.c
|
|
|
|
use makepad_box3d::ensure;
|
|
use makepad_box3d::id::*;
|
|
|
|
#[test]
|
|
fn id_test() {
|
|
let x: u64 = 0x0123456789ABCDEF;
|
|
|
|
{
|
|
let id = load_body_id(x);
|
|
let y = store_body_id(id);
|
|
ensure!(x == y);
|
|
}
|
|
|
|
{
|
|
let id = load_shape_id(x);
|
|
let y = store_shape_id(id);
|
|
ensure!(x == y);
|
|
}
|
|
|
|
{
|
|
let id = load_joint_id(x);
|
|
let y = store_joint_id(id);
|
|
ensure!(x == y);
|
|
}
|
|
}
|