add raycast accelerator for btHeightfieldTerrainShape, thanks to Marc Zylann, see https://github.com/bulletphysics/bullet3/pull/2062
it can be disabled by setting the flag cb.m_flags |= btTriangleRaycastCallback::kF_DisableHeightfieldAccelerator; acceleration is disabled for z axis up. add btHeightfieldTerrainShape example to example browser
This commit is contained in:
@@ -313,35 +313,6 @@ public:
|
||||
m_guiHelper->getRenderInterface()->drawLines(&points[0].m_floats[0], lineColor, points.size(), sizeof(btVector3FloatData), &indices[0], indices.size(), 1);
|
||||
}
|
||||
|
||||
#if 0
|
||||
glDisable (GL_LIGHTING);
|
||||
glColor3f (0.0, 1.0, 0.0);
|
||||
glBegin (GL_LINES);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NUMRAYS; i++)
|
||||
{
|
||||
glVertex3f (source[i][0], source[i][1], source[i][2]);
|
||||
glVertex3f (hit[i][0], hit[i][1], hit[i][2]);
|
||||
}
|
||||
glEnd ();
|
||||
glColor3f (1.0, 1.0, 1.0);
|
||||
glBegin (GL_LINES);
|
||||
for (i = 0; i < NUMRAYS; i++)
|
||||
{
|
||||
glVertex3f (hit[i][0], hit[i][1], hit[i][2]);
|
||||
glVertex3f (hit[i][0] + normal[i][0], hit[i][1] + normal[i][1], hit[i][2] + normal[i][2]);
|
||||
}
|
||||
glEnd ();
|
||||
glColor3f (0.0, 1.0, 1.0);
|
||||
glBegin (GL_POINTS);
|
||||
for ( i = 0; i < NUMRAYS; i++)
|
||||
{
|
||||
glVertex3f (hit[i][0], hit[i][1], hit[i][2]);
|
||||
}
|
||||
glEnd ();
|
||||
glEnable (GL_LIGHTING);
|
||||
#endif //USE_GRAPHICAL_BENCHMARK
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user