Added btCudaBroadphase, some early research & development work to accelerate Bullet using CUDA
Re-uses the NVidia particle demo.
This commit is contained in:
47
Extras/CUDA/particles_kernel.cuh
Normal file
47
Extras/CUDA/particles_kernel.cuh
Normal 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
|
||||
Reference in New Issue
Block a user