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

@@ -427,7 +427,7 @@ void GpuRaytraceScene::renderScene()
}
m_raycaster->castRaysHost(rays, hits, this->m_data->m_np->getNumBodiesGpu(), m_data->m_np->getBodiesCpu(), m_data->m_np->getNumCollidablesGpu(), m_data->m_np->getCollidablesCpu());
m_raycaster->castRaysHost(rays, hits, this->m_data->m_np->getNumRigidBodies(), m_data->m_np->getBodiesCpu(), m_data->m_np->getNumCollidablesGpu(), m_data->m_np->getCollidablesCpu());
{
B3_PROFILE("write texels");