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

Method drawLine

Engine/source/gui/3d/guiTSControl.cpp:733–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

731//-----------------------------------------------------------------------------
732
733void GuiTSCtrl::drawLine( Point3F p0, Point3F p1, const ColorI &color, F32 width )
734{
735 if ( !mSaveFrustum.clipSegment( p0, p1 ) )
736 return;
737
738 MathUtils::mProjectWorldToScreen( p0, &p0, mSaveViewport, mSaveModelview, mSaveProjection );
739 MathUtils::mProjectWorldToScreen( p1, &p1, mSaveViewport, mSaveModelview, mSaveProjection );
740
741 p0.x = mClampF( p0.x, 0.0f, mSaveViewport.extent.x );
742 p0.y = mClampF( p0.y, 0.0f, mSaveViewport.extent.y );
743 p1.x = mClampF( p1.x, 0.0f, mSaveViewport.extent.x );
744 p1.y = mClampF( p1.y, 0.0f, mSaveViewport.extent.y );
745 p0.z = p1.z = 0.0f;
746
747 _drawLine( p0, p1, color, width );
748}
749
750//-----------------------------------------------------------------------------
751

Callers 15

onRenderMethod · 0.45
renderRaisedBoxFunction · 0.45
renderSlightlyRaisedBoxFunction · 0.45
renderLoweredBoxFunction · 0.45
renderSlightlyLoweredBoxFunction · 0.45
renderBorderFunction · 0.45
onRenderMethod · 0.45
onRenderMethod · 0.45
drawNutsMethod · 0.45
onRenderMethod · 0.45
drawCrossSectionFunction · 0.45
onRenderMethod · 0.45

Calls 4

mProjectWorldToScreenFunction · 0.85
mClampFFunction · 0.85
_drawLineFunction · 0.85
clipSegmentMethod · 0.45

Tested by

no test coverage detected