Added btCudaBroadphase, some early research & development work to accelerate Bullet using CUDA

Re-uses the NVidia particle demo.
This commit is contained in:
erwin.coumans
2008-09-04 23:24:11 +00:00
parent d8a5bf2c9c
commit aef74321d7
25 changed files with 6570 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
#ifndef PARTICLES_KERNEL_H
#define PARTICLES_KERNEL_H
#define BLOCKDIM 64
#define USE_SORT 1
#ifndef __DEVICE_EMULATION__
#define USE_TEX 1
#endif
#ifdef USE_TEX
#define FETCH(t, i) tex1Dfetch(t##Tex, i)
#else
#define FETCH(t, i) t[i]
#endif
#include "vector_types.h"
typedef unsigned int uint;
struct SimParams {
float4 colliderPos;
float colliderRadius;
float3 gravity;
float globalDamping;
float particleRadius;
uint3 gridSize;
uint numCells;
float3 worldOrigin;
float3 cellSize;
float3 worldSize;
uint3 m_gridSize;
uint numBodies;
uint maxParticlesPerCell;
float spring;
float damping;
float shear;
float attraction;
float boundaryDamping;
};
#endif