Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing handling of max bodies and max contact constraints #1506

Merged
merged 9 commits into from
Feb 11, 2025

Conversation

jrouwe
Copy link
Owner

@jrouwe jrouwe commented Feb 11, 2025

  • Added the following constants on PhysicsSystem: cMaxBodiesLimit, cMaxBodyPairsLimit and cMaxContactConstraintsLimit. These constants are the max allowable values for PhysicsSystem::Init. Exceeding these will trigger an assert and the system will clamp the values.
  • Moved the 'broad phase bit' to the highest bit in BodyID to avoid running out of NodeIDs in BroadPhaseQuadTree when calling PhysicsSystem::OptimizeBroadPhase on a tree with a very high body count.
  • TempAllocatorImpl uses 64 bit integers internally to allow for a higher max contact constraint count.
  • Updated MaxBodies performance test to also test the max number of constraints.

@jrouwe jrouwe merged commit e021bd2 into master Feb 11, 2025
74 checks passed
@jrouwe jrouwe deleted the feature/constraint_limits branch February 11, 2025 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant