Commit graph box3d/samples
Author SHA1 Message Date
Erin Catto
efca0c184d
Gyro tolerance (#191) 2026-10-15 23:30:56 -07:00
Erin Catto
5d83df83ab
Improve compound serialization (#183)
- no more pointer fixups
- reduced storage 20% by removing leaf proxies
2026-10-07 14:48:58 -07:00
Erin Catto
f8c4fe83df
Shape cast support for box movers (#180)
Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2026-10-06 16:43:20 -07:00
Erin Catto
16f7f4cf4c
Tree perf (#179)
- Optimizations for falling trees.
- Increased B3_MAX_MESH_CONTACT_TRIANGLES  from 256 to 512.
2026-10-06 09:51:48 -07:00
Ethan Rutherford
e77352cd60
Add support for AVX2 and runtime feature detection (#174)
- [x] run unit tests
- [x] run all samples
2026-10-03 15:14:34 -07:00
Erin Catto
51f056e0a9
SAT benchmark (#177) 2026-10-02 20:47:05 -07:00
Erin Catto
9f998c862d
SAT samples (#173) 2026-09-27 14:39:11 -07:00
Erin Catto
5643cd81ff
Remove compound mesh child material limit. (#172) 2026-09-25 14:56:44 -07:00
Erin Catto
8fda30e5a2
Update UI (#169)
Port Box2D UI update
2026-09-24 13:43:40 -07:00
Erin Catto
79fc55976a
Optimizations (#168)
- Optimize contact prepare
- Back to post restitution stage
- Optimize solver math
- Bug fixes
2026-09-24 12:21:17 -07:00
Erin Catto
9e5a4cde86
Optimizations (#161)
- cache body sim indices and split out fat aabb
- deferred restitution
- the manifold point normal velocity is only computed for restitution or
hit events, otherwise it is zero
2026-09-20 15:54:52 -07:00
Erin Catto
f555ee4208
Optimize Broad-Phase (#159)
Broad-phase optimization ported from Box2D.
2026-09-16 22:28:39 -07:00
Erin Catto
954cf879e7
Fixes (#157)
- Added b3BodyDef::safetyFactor for CCD tuning
- #155
- #153
- #148 
- #149
2026-09-16 15:46:31 -07:00
Erin Catto
47d7f7cc7e
clockwise option, joint is awake (#130)
- b3MeshDef gets stride and clockwise option
- Added b3Joint_IsAwake
- Added b3Body_TimeOfImpactMover
- #116
- Smoother mover collision: #141
- Shape casts now ignore backside collision on mesh and height-field
triangles, same as ray casts.
2026-08-29 21:47:53 -07:00
Erin Catto
30c67b5e6d
Fixed the 64-bit hash function and added unit test (#129)
The 64-bit hash function was not well tested and had a bad optimization.
Switched to using rapidhash: https://github.com/Nicoshev/rapidhash
2026-08-12 17:13:26 -07:00
Erin Catto
f42be210a2
64-bit hashes (#126)
- ContactEvent sample
- Improved shadows
- #120 
- Triangle collision fixes
2026-08-11 18:08:34 -07:00
Erin Catto
3fc20f5b45
Follow cam (#107)
- follow cam in replay viewer
- world text with halo
- fixed sensor crash
- sensor visitors must now be convex
2026-07-29 22:14:26 -07:00
Erin Catto
781673be80
Fixes 09 (#104)
- #86
- #88 
- #87 
- #89
2026-07-24 21:48:23 -07:00
Erin Catto
c52908c9a9
Fixes 08 (#98)
- fix hull builder face and edge leak
- fix #95
- samples app will no longer crash if data folder is not found
2026-07-22 15:55:02 -07:00
Erin Catto
23861418d8
Fixes 07 (#97)
#84 
#82 
Added B3_RESTITUTION_ITERATIONS to override restitution iterations.
Fix regression in hull stacking stability.
2026-07-20 22:05:11 -07:00
Erin Catto
dfa5e6add0
Fixing issues (#94)
- option to draw kinematic shapes with transparency
- slight change to triangle vs hull to reduce ghost collisions
- changed return of b3DebugDraw.DrawShapeFcn to void
#66 
#48 
#69 
#75 
#76
2026-07-19 21:43:43 -07:00
Erin Catto
c37cfe4cd7
SIMD hull collision (#93)
SIMD based hull collision inspired by example code from @cairnc in #54 

<img width="1676" height="1332" alt="image"
src="https://github.com/user-attachments/assets/58b137bd-bf7b-4c99-863c-64341b973a3d"
/>

- Fixed #78
- Fixed #85 and fixed CI to error on UB.
- Updated benchmarks
- Added AMD scalar benchmarks
- Added Neon benchmarks
- More determinism unit tests
- Sample leak detection
- Added b3Body_AllowFastRotation
- Added b3Body_IsFastRotationAllowed
- Bumped b3HullData version
- Bumped b3CompoundData version
2026-07-18 22:43:03 -07:00
Erin Catto
d421e45c82
Update benchmarks (#77)
The large pyramid got larger, not slower.

Renamed b3CreateCompound to b3CreateBakedCompound and added some
comments. There is confusion between run-time compounds and baked
compounds.
2026-07-12 22:49:25 -07:00
Erin Catto
e961bfb7bf
Friction center weighted average (#71)
The central friction anchors now have C0 continuity by using a weighted
average. Reduces jitter while letting the spinning top function
correctly.

Fixes #65
2026-07-11 23:26:31 -07:00
Erin Catto
e9f6f1d0aa
Add benchmark (#67)
Added benchmark from PEEL.
Implement #60
2026-07-10 23:21:37 -07:00
Erin Catto
aaa795e34f
Edge edge optimization (#63)
From #54
2026-07-10 16:14:53 -07:00
Erin Catto
ef8ef0187a
Ghost collision improvements (#61)
- flag to disable hull-mesh speculative collision
- faster atomics #55 
- fix triangle vs hull logic
- fix #58 and #59
- improved shadows in samples app, a bit more expensive
2026-07-08 23:53:06 -07:00
Erin Catto
52f1a254ad
Name cache (#53)
Removed B3_BODY_NAME_LENGTH and B3_SHAPE_NAME_LENGTH.
Now using a name cache instead to save memory and make recordings more
universal.
This is a recording version bump.
2026-07-06 17:33:45 -07:00
Erin Catto
540ea387b0
Draw sleep velocity (#49)
- draw sleep velocity for debugging
- added back shape names with B3_SHAPE_NAME_LENGTH
- zup command line option
2026-07-05 00:33:00 -07:00
Erin Catto
0f6fdad541
Set mass data consistent velocity (#45)
- Rename b3Body_GetWorldCenterOfMass to b3Body_GetWorldCenter.
- Rename b3Body_GetLocalCenterOfMass to b3Body_GetLocalCenter.
- Fixed b3Body_SetMassData to correct velocity when local center moves.
2026-07-04 11:22:29 -07:00
Erin Catto
1bec63c9ee
Draw distance slider (#44)
Helps render performance on integrated GPUs.
Added render culling for baked compounds.
2026-07-03 20:26:19 -07:00
Erin Catto
655799893a
Fixes 03 (#40)
Fixes #33, #34, #35, #37, #39, #41, #42, #43

Also fixes b3Body_SetMassData inertia tensor.
2026-07-03 17:15:03 -07:00
Erin Catto
29bf523ce7
Fixes 02 (#31)
Fixes for #29 and #30
2026-07-02 00:34:04 -07:00
Erin Catto
1c5ac42c37
Fixes 01 (#26)
Fix #25 
Fix replay mover colors
Update README
Added unit test for CCD move events
Avoid Linux crash when OpenGL 4.5 is not present
2026-07-01 23:19:23 -07:00
Erin Catto
8441b4a06d
Missing functions (#21)
- add some missing functions
- added config.h for users that vendor Box3D
- joint unit tests
- improve joint limit consistency
- extend build matrix
2026-06-30 10:57:46 -07:00
Erin Catto
70ba099709
Polish based on user testing (#19)
Read me fixes
Open NFD in working directory
Improve input routing
Remove log spam
2026-06-28 21:14:42 -07:00
Erin Catto
69037feaba
Build polish (#18)
Improve build process and documentation.
Improved ray versus capsule accuracy.
UI improvements
2026-06-28 10:44:34 -07:00
Erin Catto
0c8ef46931
Replay fixes (#17)
Fixes to work with our game.
Replay fixes and improvements.
Removed shape names (save memory).
B3_DEFAULT_CATEGORY_BITS  is now UINT64_MAX to make selection easier.
2026-06-26 21:10:10 -07:00
Erin Catto
5c9b516486
Replay (#16)
Recording and replay system for Box3D. Ported from Box2D.

b3HeightField is now b3HeightFieldData and is a blob.
2026-06-20 23:35:04 -07:00
Erin Catto
09c65b08ea
Doubles (#14)
Added a compile time option to use double precision body positions. Most
math remains single precision with minimal performance loss.

`BOX3D_DOUBLE_PRECISION`

Improved accuracy of body inertia computation when shapes are far from
the body origin.

WARNING: several APIs changed but migration should be straight forward
if doubles are not enabled.
2026-06-18 20:51:16 -07:00
Erin Catto
a252f03b19
Hull sharing (#13)
Save memory when there are many duplicate hulls. Can improve performance
in some cases.

For consistency with b3MeshData, b3Hull is renamed to b3HullData.
2026-06-11 22:39:26 -07:00
Erin Catto
d8fbeb444e
Doxygen comments (#12)
- organized headers.
- added comments to headers.
- fixed a solver determinism bug.
- removed some un-used math functions
2026-06-10 13:21:14 -07:00
Erin Catto
9e02b7f3b3
New sample renderer and UI (#10)
No changes to simulation
2026-06-06 10:06:05 -07:00
Erin Catto
48d9f1dd5a
More body flag fixes (#9)
better name handling
2026-05-29 21:35:38 -07:00
Erin Catto
37e8d26bd5
Fix for deep mover overlap on hulls (#8)
Get world bounds
Update build.yml
2026-05-23 12:04:16 -07:00
Erin Catto
79cc160275
Sync body flags (#7)
- Fixed mesh point culling for vertically stacked points
- Fixed two point capsule vs capsule normal
- Fixed bug where body flags can go out of sync
- Added tests
- Updated benchmarks
2026-05-16 23:27:25 -07:00
Erin Catto
758dc665dd
Height field fixes (#6)
Fix for height field flat edges
Fix for height field shape cast
Made B3_REST_OFFSET and official constant
2026-05-14 23:44:39 -07:00
Erin Catto
aedb0e34aa
Move set is now a bitset to support large worlds (#5)
Added supporting benchmark
2026-05-13 21:01:34 -07:00
Erin Catto
9b4aa025ef
Linux fixes (#3) 2026-05-12 22:24:23 -07:00
Erin Catto
7216822064
Bug fixes and minor features (#2)
- API to query compounds directly.
- Fix some uninitialized stuff (thanks MSAN).
- Fix for store impulses on overflow.
- AABB margin reduced for small shapes
- body contact recycling option
- angular threshold for contact recycling
- reduce AABB margin on smaller shapes
- fix for hull vs tri when axis aligned
- fully locked rotation uses zero inverse inertia
2026-05-12 15:24:20 -07:00