2 #ifndef B3_GPU_NARROWPHASE_INTERNAL_DATA_H
3 #define B3_GPU_NARROWPHASE_INTERNAL_DATA_H
5 #include "Bullet3OpenCL/ParallelPrimitives/b3OpenCLArray.h"
6 #include "Bullet3Collision/NarrowPhaseCollision/shared/b3ConvexPolyhedronData.h"
7 #include "Bullet3Collision/NarrowPhaseCollision/b3Config.h"
8 #include "Bullet3Collision/NarrowPhaseCollision/shared/b3Collidable.h"
10 #include "Bullet3OpenCL/Initialize/b3OpenCLInclude.h"
11 #include "Bullet3Common/b3AlignedObjectArray.h"
12 #include "Bullet3Common/b3Vector3.h"
14 #include "Bullet3Collision/NarrowPhaseCollision/shared/b3RigidBodyData.h"
15 #include "Bullet3Collision/NarrowPhaseCollision/b3Contact4.h"
16 #include "Bullet3OpenCL/BroadphaseCollision/b3SapAabb.h"
18 #include "Bullet3OpenCL/NarrowphaseCollision/b3QuantizedBvh.h"
19 #include "Bullet3OpenCL/NarrowphaseCollision/b3BvhInfo.h"
20 #include "Bullet3Common/shared/b3Int4.h"
21 #include "Bullet3Common/shared/b3Int2.h"
23 class b3ConvexUtility;
25 struct b3GpuNarrowPhaseInternalData
27 b3AlignedObjectArray<b3ConvexUtility*>* m_convexData;
29 b3AlignedObjectArray<b3ConvexPolyhedronData> m_convexPolyhedra;
30 b3AlignedObjectArray<b3Vector3> m_uniqueEdges;
31 b3AlignedObjectArray<b3Vector3> m_convexVertices;
32 b3AlignedObjectArray<int> m_convexIndices;
34 b3OpenCLArray<b3ConvexPolyhedronData>* m_convexPolyhedraGPU;
35 b3OpenCLArray<b3Vector3>* m_uniqueEdgesGPU;
36 b3OpenCLArray<b3Vector3>* m_convexVerticesGPU;
37 b3OpenCLArray<int>* m_convexIndicesGPU;
39 b3OpenCLArray<b3Vector3>* m_worldVertsB1GPU;
40 b3OpenCLArray<b3Int4>* m_clippingFacesOutGPU;
41 b3OpenCLArray<b3Vector3>* m_worldNormalsAGPU;
42 b3OpenCLArray<b3Vector3>* m_worldVertsA1GPU;
43 b3OpenCLArray<b3Vector3>* m_worldVertsB2GPU;
45 b3AlignedObjectArray<b3GpuChildShape> m_cpuChildShapes;
46 b3OpenCLArray<b3GpuChildShape>* m_gpuChildShapes;
48 b3AlignedObjectArray<b3GpuFace> m_convexFaces;
49 b3OpenCLArray<b3GpuFace>* m_convexFacesGPU;
51 struct GpuSatCollision* m_gpuSatCollision;
53 b3OpenCLArray<b3Int4>* m_triangleConvexPairs;
55 b3OpenCLArray<b3Contact4>* m_pBufContactBuffersGPU[2];
56 int m_currentContactBuffer;
57 b3AlignedObjectArray<b3Contact4>* m_pBufContactOutCPU;
59 b3AlignedObjectArray<b3RigidBodyData>* m_bodyBufferCPU;
60 b3OpenCLArray<b3RigidBodyData>* m_bodyBufferGPU;
62 b3AlignedObjectArray<b3InertiaData>* m_inertiaBufferCPU;
63 b3OpenCLArray<b3InertiaData>* m_inertiaBufferGPU;
65 int m_numAcceleratedShapes;
66 int m_numAcceleratedRigidBodies;
68 b3AlignedObjectArray<b3Collidable> m_collidablesCPU;
69 b3OpenCLArray<b3Collidable>* m_collidablesGPU;
71 b3OpenCLArray<b3SapAabb>* m_localShapeAABBGPU;
72 b3AlignedObjectArray<b3SapAabb>* m_localShapeAABBCPU;
74 b3AlignedObjectArray<class b3OptimizedBvh*> m_bvhData;
75 b3AlignedObjectArray<class b3TriangleIndexVertexArray*> m_meshInterfaces;
77 b3AlignedObjectArray<b3QuantizedBvhNode> m_treeNodesCPU;
78 b3AlignedObjectArray<b3BvhSubtreeInfo> m_subTreesCPU;
80 b3AlignedObjectArray<b3BvhInfo> m_bvhInfoCPU;
81 b3OpenCLArray<b3BvhInfo>* m_bvhInfoGPU;
83 b3OpenCLArray<b3QuantizedBvhNode>* m_treeNodesGPU;
84 b3OpenCLArray<b3BvhSubtreeInfo>* m_subTreesGPU;
89 #endif //B3_GPU_NARROWPHASE_INTERNAL_DATA_H