jrouwe / JoltPhysics

A multi core friendly rigid body physics and collision detection library. Written in C++. Suitable for games and VR applications. Used by Horizon Forbidden West.
MIT License
6k stars 374 forks source link

Added option to specify the capacity of the height field material list #1122

Closed jrouwe closed 1 month ago

jrouwe commented 1 month ago

When modifying materials after creation using HeightFieldShape::SetMaterials this can be used to prevent reallocation of the buffers. Note that if the capacity is not high enough, a realloc will still take place.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
77.8% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud