add support for picking, using point 2 point constraint

allow to remove constraints by unique id
added tiny wavefront loader, plan to use this instead of existing slow wavefront loader
This commit is contained in:
erwin coumans
2013-07-10 00:21:23 -07:00
parent 9610b369a3
commit 2aad8419b7
18 changed files with 1005 additions and 14 deletions

View File

@@ -335,7 +335,7 @@ void GpuRaytraceScene::renderScene2()
shadowRays[i].m_from = hits[i].m_hitPoint;
shadowRays[i].m_to = lightPos;
shadowHits[i].m_hitFraction=1.f;
shadowHits[i].m_hitResult2 = hits[i].m_hitResult0;
shadowHits[i].m_hitBody = hits[i].m_hitBody;
} else
{
shadowRays[i].m_from.setValue(0,0,0);
@@ -377,7 +377,7 @@ void GpuRaytraceScene::renderScene2()
m_raytraceData->m_texels[(i)*3+1] = 128+128.f*hits[i].m_hitNormal.y;
m_raytraceData->m_texels[(i)*3+2] = 128+128.f*hits[i].m_hitNormal.z;
if (hits[i].m_hitResult0==0)
if (hits[i].m_hitBody==0)
{
m_raytraceData->m_texels[(i)*3+0] = 255;
m_raytraceData->m_texels[(i)*3+1] = 255;