MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / renderScene

Method renderScene

examples/Tutorial/Tutorial.cpp:552–570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550 m_app->m_renderer->writeTransforms();
551 }
552 virtual void renderScene()
553 {
554 m_app->m_renderer->renderScene();
555 m_app->drawText3D("X", 1, 0, 0, 1);
556 m_app->drawText3D("Y", 0, 1, 0, 1);
557 m_app->drawText3D("Z", 0, 0, 1, 1);
558
559 for (int i = 0; i < m_contactPoints.size(); i++)
560 {
561 const LWContactPoint& contact = m_contactPoints[i];
562 b3Vector3 color = b3MakeVector3(1, 1, 0);
563 float lineWidth = 3;
564 if (contact.m_distance < 0)
565 {
566 color.setValue(1, 0, 0);
567 }
568 m_app->m_renderer->drawLine(contact.m_ptOnAWorld, contact.m_ptOnBWorld, color, lineWidth);
569 }
570 }
571
572 virtual void physicsDebugDraw(int debugDrawFlags)
573 {

Callers

nothing calls this directly

Calls 5

b3MakeVector3Function · 0.85
drawText3DMethod · 0.45
sizeMethod · 0.45
setValueMethod · 0.45
drawLineMethod · 0.45

Tested by

no test coverage detected