MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / drawLine

Method drawLine

Engine/source/T3D/physics/bullet/btDebugDraw.cpp:32–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31
32void BtDebugDraw::drawLine( const btVector3 &fromBt, const btVector3 &toBt, const btVector3 &color )
33{
34 Point3F from = btCast<Point3F>( fromBt );
35 Point3F to = btCast<Point3F>( toBt );
36
37 // Cull first if we have a frustum.
38 //F32 distSquared = ( mCuller->getPosition() - from ).lenSquared();
39 //if ( mCuller && distSquared > ( 150 * 150 ) ) //!mCuller->clipSegment( from, to ) )
40 //return;
41
42 // Do we need to flush the builder?
43 if ( mVertexCount + 2 >= 1000 )
44 flush();
45
46 // Are we starting a new primitive?
47 if ( mVertexCount == 0 )
48 PrimBuild::begin( GFXLineList, 1000 );
49
50 PrimBuild::color3f( color.x(), color.y(), color.z() );
51 PrimBuild::vertex3f( from.x, from.y, from.z );
52 PrimBuild::vertex3f( to.x, to.y, to.z );
53
54 mVertexCount += 2;
55}
56
57void BtDebugDraw::drawTriangle( const btVector3 &v0,
58 const btVector3 &v1,

Callers 1

_renderScannerMethod · 0.45

Calls 3

beginFunction · 0.85
color3fFunction · 0.85
vertex3fFunction · 0.85

Tested by

no test coverage detected