updateAabbsKernel.cl 591 B

12345678910111213141516171819202122
  1. #include "Bullet3Collision/NarrowPhaseCollision/shared/b3UpdateAabbs.h"
  2. __kernel void initializeGpuAabbsFull( const int numNodes, __global b3RigidBodyData_t* gBodies,__global b3Collidable_t* collidables, __global b3Aabb_t* plocalShapeAABB, __global b3Aabb_t* pAABB)
  3. {
  4. int nodeID = get_global_id(0);
  5. if( nodeID < numNodes )
  6. {
  7. b3ComputeWorldAabb(nodeID, gBodies, collidables, plocalShapeAABB,pAABB);
  8. }
  9. }
  10. __kernel void clearOverlappingPairsKernel( __global int4* pairs, int numPairs)
  11. {
  12. int pairId = get_global_id(0);
  13. if( pairId< numPairs )
  14. {
  15. pairs[pairId].z = 0xffffffff;
  16. }
  17. }