btGpu3DGridBroadphaseSharedTypes.h

Go to the documentation of this file.
00001 /*
00002 Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
00003 Copyright (C) 2006, 2009 Sony Computer Entertainment Inc. 
00004 
00005 This software is provided 'as-is', without any express or implied warranty.
00006 In no event will the authors be held liable for any damages arising from the use of this software.
00007 Permission is granted to anyone to use this software for any purpose, 
00008 including commercial applications, and to alter it and redistribute it freely, 
00009 subject to the following restrictions:
00010 
00011 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.
00012 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
00013 3. This notice may not be removed or altered from any source distribution.
00014 */
00015 
00016 //----------------------------------------------------------------------------------------
00017 
00018 // Shared definitions for GPU-based 3D Grid collision detection broadphase
00019 
00021 //  Keep this file free from Bullet headers
00022 //  it is included into both CUDA and CPU code
00024 
00025 //----------------------------------------------------------------------------------------
00026 
00027 #ifndef BTGPU3DGRIDBROADPHASESHAREDTYPES_H
00028 #define BTGPU3DGRIDBROADPHASESHAREDTYPES_H
00029 
00030 //----------------------------------------------------------------------------------------
00031 
00032 #define BT_3DGRID_PAIR_FOUND_FLG (0x40000000)
00033 #define BT_3DGRID_PAIR_NEW_FLG   (0x20000000)
00034 #define BT_3DGRID_PAIR_ANY_FLG   (BT_3DGRID_PAIR_FOUND_FLG | BT_3DGRID_PAIR_NEW_FLG)
00035 
00036 //----------------------------------------------------------------------------------------
00037 
00038 struct bt3DGridBroadphaseParams 
00039 {
00040         unsigned int    m_gridSizeX;
00041         unsigned int    m_gridSizeY;
00042         unsigned int    m_gridSizeZ;
00043         unsigned int    m_numCells;
00044         float                   m_worldOriginX;
00045         float                   m_worldOriginY;
00046         float                   m_worldOriginZ;
00047         float                   m_cellSizeX;
00048         float                   m_cellSizeY;
00049         float                   m_cellSizeZ;
00050         unsigned int    m_numBodies;
00051         unsigned int    m_maxBodiesPerCell;
00052 };
00053 
00054 //----------------------------------------------------------------------------------------
00055 
00056 struct bt3DGrid3F1U
00057 {
00058         float                   fx;
00059         float                   fy;
00060         float                   fz;
00061         unsigned int    uw;
00062 };
00063 
00064 //----------------------------------------------------------------------------------------
00065 
00066 #endif // BTGPU3DGRIDBROADPHASESHAREDTYPES_H
00067