| 858 | } |
| 859 | |
| 860 | uint32_t GetCollisionShapes3D(HCollisionObject3D collision_object, HCollisionShape3D* out_buffer, uint32_t buffer_size) |
| 861 | { |
| 862 | btCollisionShape* shape = GetCollisionObject(collision_object)->getCollisionShape(); |
| 863 | uint32_t n = 1; |
| 864 | if (shape->isCompound()) |
| 865 | { |
| 866 | btCompoundShape* compound = (btCompoundShape*)shape; |
| 867 | n = compound->getNumChildShapes(); |
| 868 | for (uint32_t i = 0; i < n && i < buffer_size; ++i) |
| 869 | { |
| 870 | out_buffer[i] = compound->getChildShape(i); |
| 871 | } |
| 872 | } |
| 873 | else if (buffer_size > 0) |
| 874 | { |
| 875 | out_buffer[0] = shape; |
| 876 | } |
| 877 | return n; |
| 878 | } |
| 879 | |
| 880 | void SetCollisionObjectUserData3D(HCollisionObject3D collision_object, void* user_data) |
| 881 | { |
no test coverage detected