[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-physics / third-party / bullet3 / src / Bullet3OpenCL / BroadphaseCollision / b3GpuBroadphaseInterface.h
1
2 #ifndef B3_GPU_BROADPHASE_INTERFACE_H
3 #define B3_GPU_BROADPHASE_INTERFACE_H
4
5 #include "Bullet3OpenCL/Initialize/b3OpenCLInclude.h"
6 #include "Bullet3Common/b3Vector3.h"
7 #include "b3SapAabb.h"
8 #include "Bullet3Common/shared/b3Int2.h"
9 #include "Bullet3Common/shared/b3Int4.h"
10 #include "Bullet3OpenCL/ParallelPrimitives/b3OpenCLArray.h"
11
12 class b3GpuBroadphaseInterface
13 {
14 public:
15         typedef class b3GpuBroadphaseInterface*(CreateFunc)(cl_context ctx, cl_device_id device, cl_command_queue q);
16
17         virtual ~b3GpuBroadphaseInterface()
18         {
19         }
20
21         virtual void createProxy(const b3Vector3& aabbMin, const b3Vector3& aabbMax, int userPtr, int collisionFilterGroup, int collisionFilterMask) = 0;
22         virtual void createLargeProxy(const b3Vector3& aabbMin, const b3Vector3& aabbMax, int userPtr, int collisionFilterGroup, int collisionFilterMask) = 0;
23
24         virtual void calculateOverlappingPairs(int maxPairs) = 0;
25         virtual void calculateOverlappingPairsHost(int maxPairs) = 0;
26
27         //call writeAabbsToGpu after done making all changes (createProxy etc)
28         virtual void writeAabbsToGpu() = 0;
29
30         virtual cl_mem getAabbBufferWS() = 0;
31         virtual int getNumOverlap() = 0;
32         virtual cl_mem getOverlappingPairBuffer() = 0;
33
34         virtual b3OpenCLArray<b3SapAabb>& getAllAabbsGPU() = 0;
35         virtual b3AlignedObjectArray<b3SapAabb>& getAllAabbsCPU() = 0;
36
37         virtual b3OpenCLArray<b3Int4>& getOverlappingPairsGPU() = 0;
38         virtual b3OpenCLArray<int>& getSmallAabbIndicesGPU() = 0;
39         virtual b3OpenCLArray<int>& getLargeAabbIndicesGPU() = 0;
40 };
41
42 #endif  //B3_GPU_BROADPHASE_INTERFACE_H