void ConcaveRaycastDemo::clientMoveAndDisplay() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); float dt = getDeltaTimeMicroseconds() * 0.000001f; if (m_animatedMesh) { static float offset=0.f; offset+=0.01f; setVertexPositions(waveheight,offset); btVector3 worldMin(-1000,-1000,-1000); btVector3 worldMax(1000,1000,1000); trimeshShape->refitTree(worldMin,worldMax); //clear all contact points involving mesh proxy. Note: this is a slow/unoptimized operation. m_dynamicsWorld->getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(staticBody->getBroadphaseHandle(),getDynamicsWorld()->getDispatcher()); } m_dynamicsWorld->stepSimulation(1./60.,0); //optional but useful: debug drawing m_dynamicsWorld->debugDrawWorld(); raycastBar.move (dt); raycastBar.cast (m_dynamicsWorld); renderme(); raycastBar.draw (); glFlush(); glutSwapBuffers(); }
void ConcaveRaycastDemo::displayCallback(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); renderme(); raycastBar.draw (); glFlush(); glutSwapBuffers(); }
void ConcaveRaycastDemo::displayCallback(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //optional but useful: debug drawing if (m_dynamicsWorld) m_dynamicsWorld->debugDrawWorld(); renderme(); raycastBar.draw (); glFlush(); glutSwapBuffers(); }