Skip to content

Add function to retrieve all transforms in one batch#4792

Open
scorpion81 wants to merge 5 commits into
bulletphysics:masterfrom
scorpion81:transform_batch
Open

Add function to retrieve all transforms in one batch#4792
scorpion81 wants to merge 5 commits into
bulletphysics:masterfrom
scorpion81:transform_batch

Conversation

@scorpion81

Copy link
Copy Markdown

This function is useful in scenarios with larger numbers of rigidbodies ( > 500) in order to retrieve a numpy transforms array in one go. Querying all transforms in a frame loop in order to update a render representation, e.g. a shattered blender mesh one by one is a significant performance bottleneck.

Unfortunately, i had to deactivate 2 sections of different numpy related code via #if 0 due to compilation errors i couldnt easily fix. (I didnt change anything else of that code, I added only my C loop function)

If you may find this function useful, feel free to integrate it. Maybe i have overlooked a "Better" way tho, but this improved the performance significantly if you need to use a lot of transformation data.

koppi and others added 5 commits May 2, 2026 11:44
Add B3_PyArray_DATA macro that casts PyObject* to PyArrayObject* for
NumPy 2.0+ where PyArray_DATA expects PyArrayObject*. Maintains
backward compatibility with older NumPy versions.

Fixes build errors on Ubuntu Resolute with NumPy 2.x where
PyArray_DATA calls had incompatible pointer types.
@scorpion81

Copy link
Copy Markdown
Author

merged #4787 into my branch, since it properly fixes the numpy related compile errors

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.

2 participants