b3GpuRigidBodyPipelineInternalData.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. Copyright (c) 2013 Advanced Micro Devices, Inc.
  3. This software is provided 'as-is', without any express or implied warranty.
  4. In no event will the authors be held liable for any damages arising from the use of this software.
  5. Permission is granted to anyone to use this software for any purpose,
  6. including commercial applications, and to alter it and redistribute it freely,
  7. subject to the following restrictions:
  8. 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  9. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  10. 3. This notice may not be removed or altered from any source distribution.
  11. */
  12. //Originally written by Erwin Coumans
  13. #ifndef B3_GPU_RIGIDBODY_PIPELINE_INTERNAL_DATA_H
  14. #define B3_GPU_RIGIDBODY_PIPELINE_INTERNAL_DATA_H
  15. #include "Bullet3OpenCL/Initialize/b3OpenCLInclude.h"
  16. #include "Bullet3Common/b3AlignedObjectArray.h"
  17. #include "Bullet3OpenCL/ParallelPrimitives/b3OpenCLArray.h"
  18. #include "Bullet3Collision/NarrowPhaseCollision/shared/b3Collidable.h"
  19. #include "Bullet3OpenCL/BroadphaseCollision/b3SapAabb.h"
  20. #include "Bullet3Dynamics/ConstraintSolver/b3TypedConstraint.h"
  21. #include "Bullet3Collision/NarrowPhaseCollision/b3Config.h"
  22. #include "Bullet3Collision/BroadPhaseCollision/b3OverlappingPair.h"
  23. #include "Bullet3OpenCL/RigidBody/b3GpuGenericConstraint.h"
  24. struct b3GpuRigidBodyPipelineInternalData
  25. {
  26. cl_context m_context;
  27. cl_device_id m_device;
  28. cl_command_queue m_queue;
  29. cl_kernel m_integrateTransformsKernel;
  30. cl_kernel m_updateAabbsKernel;
  31. cl_kernel m_clearOverlappingPairsKernel;
  32. class b3PgsJacobiSolver* m_solver;
  33. class b3GpuPgsConstraintSolver* m_gpuSolver;
  34. class b3GpuPgsContactSolver* m_solver2;
  35. class b3GpuJacobiContactSolver* m_solver3;
  36. class b3GpuRaycast* m_raycaster;
  37. class b3GpuBroadphaseInterface* m_broadphaseSap;
  38. struct b3DynamicBvhBroadphase* m_broadphaseDbvt;
  39. b3OpenCLArray<b3SapAabb>* m_allAabbsGPU;
  40. b3AlignedObjectArray<b3SapAabb> m_allAabbsCPU;
  41. b3OpenCLArray<b3BroadphasePair>* m_overlappingPairsGPU;
  42. b3OpenCLArray<b3GpuGenericConstraint>* m_gpuConstraints;
  43. b3AlignedObjectArray<b3GpuGenericConstraint> m_cpuConstraints;
  44. b3AlignedObjectArray<b3TypedConstraint*> m_joints;
  45. int m_constraintUid;
  46. class b3GpuNarrowPhase* m_narrowphase;
  47. b3Vector3 m_gravity;
  48. b3Config m_config;
  49. };
  50. #endif //B3_GPU_RIGIDBODY_PIPELINE_INTERNAL_DATA_H