add reportHitNumber to allow reporting a specific ray intersection hit

(by default, pybullet.rayTestBatch reports the closest hit, so you can report 2nd closest or 3rd closest hit etc)
Fix pybullet.createCollisionShape, in some cases (concave trimesh, convex mesh) two instances were created.
This commit is contained in:
Erwin Coumans
2020-05-07 23:23:24 -07:00
parent 5fd11fe90b
commit daa0a27403
6 changed files with 54 additions and 35 deletions
+2 -1
View File
@@ -625,7 +625,8 @@ extern "C"
//max num rays for b3RaycastBatchAddRays is MAX_RAY_INTERSECTION_BATCH_SIZE_STREAMING
B3_SHARED_API void b3RaycastBatchAddRays(b3PhysicsClientHandle physClient, b3SharedMemoryCommandHandle commandHandle, const double* rayFromWorld, const double* rayToWorld, int numRays);
B3_SHARED_API void b3RaycastBatchSetParentObject(b3SharedMemoryCommandHandle commandHandle, int parentObjectUniqueId, int parentLinkIndex);
B3_SHARED_API void b3RaycastBatchSetReportHitNumber(b3SharedMemoryCommandHandle commandHandle, int reportHitNumber);
B3_SHARED_API void b3GetRaycastInformation(b3PhysicsClientHandle physClient, struct b3RaycastInformation* raycastInfo);
/// Apply external force at the body (or link) center of mass, in world space/Cartesian coordinates.