b3GpuRaycast.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. #ifndef B3_GPU_RAYCAST_H
  2. #define B3_GPU_RAYCAST_H
  3. #include "Bullet3Common/b3Vector3.h"
  4. #include "Bullet3OpenCL/Initialize/b3OpenCLInclude.h"
  5. #include "Bullet3Common/b3AlignedObjectArray.h"
  6. #include "Bullet3Collision/NarrowPhaseCollision/b3RaycastInfo.h"
  7. class b3GpuRaycast
  8. {
  9. protected:
  10. struct b3GpuRaycastInternalData* m_data;
  11. public:
  12. b3GpuRaycast(cl_context ctx, cl_device_id device, cl_command_queue q);
  13. virtual ~b3GpuRaycast();
  14. void castRaysHost(const b3AlignedObjectArray<b3RayInfo>& raysIn, b3AlignedObjectArray<b3RayHit>& hitResults,
  15. int numBodies, const struct b3RigidBodyData* bodies, int numCollidables, const struct b3Collidable* collidables,
  16. const struct b3GpuNarrowPhaseInternalData* narrowphaseData);
  17. void castRays(const b3AlignedObjectArray<b3RayInfo>& rays, b3AlignedObjectArray<b3RayHit>& hitResults,
  18. int numBodies, const struct b3RigidBodyData* bodies, int numCollidables, const struct b3Collidable* collidables,
  19. const struct b3GpuNarrowPhaseInternalData* narrowphaseData, class b3GpuBroadphaseInterface* broadphase);
  20. };
  21. #endif //B3_GPU_RAYCAST_H