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

Function drawLine

examples/ExampleBrowser/OpenGLGuiHelper.cpp:64–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 }
63
64 virtual void drawLine(const btVector3& from1, const btVector3& to1, const btVector3& color1)
65 {
66 //float from[4] = {from1[0],from1[1],from1[2],from1[3]};
67 //float to[4] = {to1[0],to1[1],to1[2],to1[3]};
68 //float color[4] = {color1[0],color1[1],color1[2],color1[3]};
69 //m_glApp->m_instancingRenderer->drawLine(from,to,color);
70 if (m_currentLineColor != color1 || m_linePoints.size() >= BT_LINE_BATCH_SIZE)
71 {
72 flushLines();
73 m_currentLineColor = color1;
74 }
75 MyDebugVec3 from(from1);
76 MyDebugVec3 to(to1);
77
78 m_linePoints.push_back(from);
79 m_linePoints.push_back(to);
80
81 m_lineIndices.push_back(m_lineIndices.size());
82 m_lineIndices.push_back(m_lineIndices.size());
83 }
84
85 virtual void drawContactPoint(const btVector3& PointOnB, const btVector3& normalOnB, btScalar distance, int lifeTime, const btVector3& color)
86 {

Callers 13

drawContactPointFunction · 0.70
drawLineMethod · 0.50
drawTriangleMethod · 0.50
drawAabbMethod · 0.50
drawTransformMethod · 0.50
drawArcMethod · 0.50
drawSpherePatchMethod · 0.50
drawBoxMethod · 0.50
drawCapsuleMethod · 0.50
drawCylinderMethod · 0.50
drawConeMethod · 0.50
drawPlaneMethod · 0.50

Calls 3

flushLinesFunction · 0.85
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected