2017-08-01 14:30:58 +02:00
|
|
|
#ifndef B3_GPU_RAYCAST_H
|
|
|
|
#define B3_GPU_RAYCAST_H
|
|
|
|
|
|
|
|
#include "Bullet3Common/b3Vector3.h"
|
|
|
|
#include "Bullet3OpenCL/Initialize/b3OpenCLInclude.h"
|
|
|
|
|
|
|
|
#include "Bullet3Common/b3AlignedObjectArray.h"
|
|
|
|
#include "Bullet3Collision/NarrowPhaseCollision/b3RaycastInfo.h"
|
|
|
|
|
|
|
|
class b3GpuRaycast
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
struct b3GpuRaycastInternalData* m_data;
|
2019-01-03 14:26:51 +01:00
|
|
|
|
2017-08-01 14:30:58 +02:00
|
|
|
public:
|
2019-01-03 14:26:51 +01:00
|
|
|
b3GpuRaycast(cl_context ctx, cl_device_id device, cl_command_queue q);
|
2017-08-01 14:30:58 +02:00
|
|
|
virtual ~b3GpuRaycast();
|
|
|
|
|
2019-01-03 14:26:51 +01:00
|
|
|
void castRaysHost(const b3AlignedObjectArray<b3RayInfo>& raysIn, b3AlignedObjectArray<b3RayHit>& hitResults,
|
|
|
|
int numBodies, const struct b3RigidBodyData* bodies, int numCollidables, const struct b3Collidable* collidables,
|
|
|
|
const struct b3GpuNarrowPhaseInternalData* narrowphaseData);
|
2017-08-01 14:30:58 +02:00
|
|
|
|
2019-01-03 14:26:51 +01:00
|
|
|
void castRays(const b3AlignedObjectArray<b3RayInfo>& rays, b3AlignedObjectArray<b3RayHit>& hitResults,
|
|
|
|
int numBodies, const struct b3RigidBodyData* bodies, int numCollidables, const struct b3Collidable* collidables,
|
|
|
|
const struct b3GpuNarrowPhaseInternalData* narrowphaseData, class b3GpuBroadphaseInterface* broadphase);
|
2017-08-01 14:30:58 +02:00
|
|
|
};
|
|
|
|
|
2019-01-03 14:26:51 +01:00
|
|
|
#endif //B3_GPU_RAYCAST_H
|