add preliminary GPU ray cast (brute-force slow, only against sphere, allocates OpenCL buffers at every cast)

This commit is contained in:
erwin coumans
2013-05-28 18:39:53 -07:00
parent f55473d586
commit a886a978b7
7 changed files with 458 additions and 117 deletions

View File

@@ -678,6 +678,10 @@ cl_mem b3GpuNarrowPhase::getBodiesGpu()
return (cl_mem)m_data->m_bodyBufferGPU->getBufferCL();
}
const struct b3RigidBodyCL* b3GpuNarrowPhase::getBodiesCpu() const
{
return &m_data->m_bodyBufferCPU->at(0);
};
int b3GpuNarrowPhase::getNumBodiesGpu() const
{
@@ -710,6 +714,12 @@ cl_mem b3GpuNarrowPhase::getCollidablesGpu()
return m_data->m_collidablesGPU->getBufferCL();
}
const struct b3Collidable* b3GpuNarrowPhase::getCollidablesCpu() const
{
return &m_data->m_collidablesCPU[0];
}
cl_mem b3GpuNarrowPhase::getAabbBufferGpu()
{
return m_data->m_localShapeAABBGPU->getBufferCL();