[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-physics / third-party / bullet3 / src / Bullet3OpenCL / RigidBody / b3GpuRigidBodyPipelineInternalData.h
1 /*
2 Copyright (c) 2013 Advanced Micro Devices, Inc.  
3
4 This software is provided 'as-is', without any express or implied warranty.
5 In no event will the authors be held liable for any damages arising from the use of this software.
6 Permission is granted to anyone to use this software for any purpose, 
7 including commercial applications, and to alter it and redistribute it freely, 
8 subject to the following restrictions:
9
10 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.
11 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
12 3. This notice may not be removed or altered from any source distribution.
13 */
14 //Originally written by Erwin Coumans
15
16 #ifndef B3_GPU_RIGIDBODY_PIPELINE_INTERNAL_DATA_H
17 #define B3_GPU_RIGIDBODY_PIPELINE_INTERNAL_DATA_H
18
19 #include "Bullet3OpenCL/Initialize/b3OpenCLInclude.h"
20 #include "Bullet3Common/b3AlignedObjectArray.h"
21
22 #include "Bullet3OpenCL/ParallelPrimitives/b3OpenCLArray.h"
23 #include "Bullet3Collision/NarrowPhaseCollision/shared/b3Collidable.h"
24
25 #include "Bullet3OpenCL/BroadphaseCollision/b3SapAabb.h"
26 #include "Bullet3Dynamics/ConstraintSolver/b3TypedConstraint.h"
27 #include "Bullet3Collision/NarrowPhaseCollision/b3Config.h"
28
29 #include "Bullet3Collision/BroadPhaseCollision/b3OverlappingPair.h"
30 #include "Bullet3OpenCL/RigidBody/b3GpuGenericConstraint.h"
31
32 struct b3GpuRigidBodyPipelineInternalData
33 {
34         cl_context m_context;
35         cl_device_id m_device;
36         cl_command_queue m_queue;
37
38         cl_kernel m_integrateTransformsKernel;
39         cl_kernel m_updateAabbsKernel;
40         cl_kernel m_clearOverlappingPairsKernel;
41
42         class b3PgsJacobiSolver* m_solver;
43
44         class b3GpuPgsConstraintSolver* m_gpuSolver;
45
46         class b3GpuPgsContactSolver* m_solver2;
47         class b3GpuJacobiContactSolver* m_solver3;
48         class b3GpuRaycast* m_raycaster;
49
50         class b3GpuBroadphaseInterface* m_broadphaseSap;
51
52         struct b3DynamicBvhBroadphase* m_broadphaseDbvt;
53         b3OpenCLArray<b3SapAabb>* m_allAabbsGPU;
54         b3AlignedObjectArray<b3SapAabb> m_allAabbsCPU;
55         b3OpenCLArray<b3BroadphasePair>* m_overlappingPairsGPU;
56
57         b3OpenCLArray<b3GpuGenericConstraint>* m_gpuConstraints;
58         b3AlignedObjectArray<b3GpuGenericConstraint> m_cpuConstraints;
59
60         b3AlignedObjectArray<b3TypedConstraint*> m_joints;
61         int m_constraintUid;
62         class b3GpuNarrowPhase* m_narrowphase;
63         b3Vector3 m_gravity;
64
65         b3Config m_config;
66 };
67
68 #endif  //B3_GPU_RIGIDBODY_PIPELINE_INTERNAL_DATA_H