b3GpuDynamicsWorld improvements:

apply forces
copy linear/angular velocity every frame at the CPU side, initial velocity works now
hook up setGravity
Note: the 'stepSimulation' for GPU only simulates a single simulation frame.
This commit is contained in:
erwincoumans
2013-06-06 22:01:06 -07:00
parent 74bdccc2cf
commit 9fe48d887d
12 changed files with 243 additions and 57 deletions

View File

@@ -249,6 +249,19 @@ void b3GpuSapBroadphase::calculateOverlappingPairsHost()
}
void b3GpuSapBroadphase::reset()
{
m_allAabbsGPU.resize(0);
m_allAabbsCPU.resize(0);
m_smallAabbsGPU.resize(0);
m_smallAabbsCPU.resize(0);
m_largeAabbsGPU.resize(0);
m_largeAabbsCPU.resize(0);
}
void b3GpuSapBroadphase::calculateOverlappingPairs()
{
int axis = 0;//todo on GPU for now hardcode