Imported Upstream version 2.81
[platform/upstream/libbullet.git] / src / BulletMultiThreaded / btGpu3DGridBroadphaseSharedTypes.h
1 /*
2 Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
3 Copyright (C) 2006, 2009 Sony Computer Entertainment Inc. 
4
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the use of this software.
7 Permission is granted to anyone to use this software for any purpose, 
8 including commercial applications, and to alter it and redistribute it freely, 
9 subject to the following restrictions:
10
11 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.
12 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13 3. This notice may not be removed or altered from any source distribution.
14 */
15
16 //----------------------------------------------------------------------------------------
17
18 // Shared definitions for GPU-based 3D Grid collision detection broadphase
19
20 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
21 //  Keep this file free from Bullet headers
22 //  it is included into both CUDA and CPU code
23 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
24
25 //----------------------------------------------------------------------------------------
26
27 #ifndef BTGPU3DGRIDBROADPHASESHAREDTYPES_H
28 #define BTGPU3DGRIDBROADPHASESHAREDTYPES_H
29
30 //----------------------------------------------------------------------------------------
31
32 #define BT_3DGRID_PAIR_FOUND_FLG (0x40000000)
33 #define BT_3DGRID_PAIR_NEW_FLG   (0x20000000)
34 #define BT_3DGRID_PAIR_ANY_FLG   (BT_3DGRID_PAIR_FOUND_FLG | BT_3DGRID_PAIR_NEW_FLG)
35
36 //----------------------------------------------------------------------------------------
37
38 struct bt3DGridBroadphaseParams 
39 {
40         unsigned int    m_gridSizeX;
41         unsigned int    m_gridSizeY;
42         unsigned int    m_gridSizeZ;
43         unsigned int    m_numCells;
44         float                   m_worldOriginX;
45         float                   m_worldOriginY;
46         float                   m_worldOriginZ;
47         float                   m_cellSizeX;
48         float                   m_cellSizeY;
49         float                   m_cellSizeZ;
50         unsigned int    m_numBodies;
51         unsigned int    m_maxBodiesPerCell;
52 };
53
54 //----------------------------------------------------------------------------------------
55
56 struct bt3DGrid3F1U
57 {
58         float                   fx;
59         float                   fy;
60         float                   fz;
61         unsigned int    uw;
62 };
63
64 //----------------------------------------------------------------------------------------
65
66 #endif // BTGPU3DGRIDBROADPHASESHAREDTYPES_H
67