b3GpuNarrowPhaseInternalData.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #ifndef B3_GPU_NARROWPHASE_INTERNAL_DATA_H
  2. #define B3_GPU_NARROWPHASE_INTERNAL_DATA_H
  3. #include "Bullet3OpenCL/ParallelPrimitives/b3OpenCLArray.h"
  4. #include "Bullet3Collision/NarrowPhaseCollision/shared/b3ConvexPolyhedronData.h"
  5. #include "Bullet3Collision/NarrowPhaseCollision/b3Config.h"
  6. #include "Bullet3Collision/NarrowPhaseCollision/shared/b3Collidable.h"
  7. #include "Bullet3OpenCL/Initialize/b3OpenCLInclude.h"
  8. #include "Bullet3Common/b3AlignedObjectArray.h"
  9. #include "Bullet3Common/b3Vector3.h"
  10. #include "Bullet3Collision/NarrowPhaseCollision/shared/b3RigidBodyData.h"
  11. #include "Bullet3Collision/NarrowPhaseCollision/b3Contact4.h"
  12. #include "Bullet3OpenCL/BroadphaseCollision/b3SapAabb.h"
  13. #include "Bullet3OpenCL/NarrowphaseCollision/b3QuantizedBvh.h"
  14. #include "Bullet3OpenCL/NarrowphaseCollision/b3BvhInfo.h"
  15. #include "Bullet3Common/shared/b3Int4.h"
  16. #include "Bullet3Common/shared/b3Int2.h"
  17. class b3ConvexUtility;
  18. struct b3GpuNarrowPhaseInternalData
  19. {
  20. b3AlignedObjectArray<b3ConvexUtility*>* m_convexData;
  21. b3AlignedObjectArray<b3ConvexPolyhedronData> m_convexPolyhedra;
  22. b3AlignedObjectArray<b3Vector3> m_uniqueEdges;
  23. b3AlignedObjectArray<b3Vector3> m_convexVertices;
  24. b3AlignedObjectArray<int> m_convexIndices;
  25. b3OpenCLArray<b3ConvexPolyhedronData>* m_convexPolyhedraGPU;
  26. b3OpenCLArray<b3Vector3>* m_uniqueEdgesGPU;
  27. b3OpenCLArray<b3Vector3>* m_convexVerticesGPU;
  28. b3OpenCLArray<int>* m_convexIndicesGPU;
  29. b3OpenCLArray<b3Vector3>* m_worldVertsB1GPU;
  30. b3OpenCLArray<b3Int4>* m_clippingFacesOutGPU;
  31. b3OpenCLArray<b3Vector3>* m_worldNormalsAGPU;
  32. b3OpenCLArray<b3Vector3>* m_worldVertsA1GPU;
  33. b3OpenCLArray<b3Vector3>* m_worldVertsB2GPU;
  34. b3AlignedObjectArray<b3GpuChildShape> m_cpuChildShapes;
  35. b3OpenCLArray<b3GpuChildShape>* m_gpuChildShapes;
  36. b3AlignedObjectArray<b3GpuFace> m_convexFaces;
  37. b3OpenCLArray<b3GpuFace>* m_convexFacesGPU;
  38. struct GpuSatCollision* m_gpuSatCollision;
  39. b3OpenCLArray<b3Int4>* m_triangleConvexPairs;
  40. b3OpenCLArray<b3Contact4>* m_pBufContactBuffersGPU[2];
  41. int m_currentContactBuffer;
  42. b3AlignedObjectArray<b3Contact4>* m_pBufContactOutCPU;
  43. b3AlignedObjectArray<b3RigidBodyData>* m_bodyBufferCPU;
  44. b3OpenCLArray<b3RigidBodyData>* m_bodyBufferGPU;
  45. b3AlignedObjectArray<b3InertiaData>* m_inertiaBufferCPU;
  46. b3OpenCLArray<b3InertiaData>* m_inertiaBufferGPU;
  47. int m_numAcceleratedShapes;
  48. int m_numAcceleratedRigidBodies;
  49. b3AlignedObjectArray<b3Collidable> m_collidablesCPU;
  50. b3OpenCLArray<b3Collidable>* m_collidablesGPU;
  51. b3OpenCLArray<b3SapAabb>* m_localShapeAABBGPU;
  52. b3AlignedObjectArray<b3SapAabb>* m_localShapeAABBCPU;
  53. b3AlignedObjectArray<class b3OptimizedBvh*> m_bvhData;
  54. b3AlignedObjectArray<class b3TriangleIndexVertexArray*> m_meshInterfaces;
  55. b3AlignedObjectArray<b3QuantizedBvhNode> m_treeNodesCPU;
  56. b3AlignedObjectArray<b3BvhSubtreeInfo> m_subTreesCPU;
  57. b3AlignedObjectArray<b3BvhInfo> m_bvhInfoCPU;
  58. b3OpenCLArray<b3BvhInfo>* m_bvhInfoGPU;
  59. b3OpenCLArray<b3QuantizedBvhNode>* m_treeNodesGPU;
  60. b3OpenCLArray<b3BvhSubtreeInfo>* m_subTreesGPU;
  61. b3Config m_config;
  62. };
  63. #endif //B3_GPU_NARROWPHASE_INTERNAL_DATA_H