summaryrefslogtreecommitdiff
path: root/thirdparty/bullet/Bullet3OpenCL/RigidBody/kernels/updateAabbsKernel.cl
blob: ba8ba735d05b455ecf184e7057408c2fe88f5ef1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22


#include "Bullet3Collision/NarrowPhaseCollision/shared/b3UpdateAabbs.h"


__kernel void initializeGpuAabbsFull(  const int numNodes, __global b3RigidBodyData_t* gBodies,__global b3Collidable_t* collidables, __global b3Aabb_t* plocalShapeAABB, __global b3Aabb_t* pAABB)
{
	int nodeID = get_global_id(0);
	if( nodeID < numNodes )
	{
		b3ComputeWorldAabb(nodeID, gBodies, collidables, plocalShapeAABB,pAABB);
	}
}

__kernel void clearOverlappingPairsKernel(  __global int4* pairs, int numPairs)
{
	int pairId = get_global_id(0);
	if( pairId< numPairs )
	{
		pairs[pairId].z = 0xffffffff;
	}
}