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

Method _renderViz

Engine/source/T3D/spotLight.cpp:210–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210void SpotLight::_renderViz( SceneRenderState *state )
211{
212 GFXDrawUtil *draw = GFX->getDrawUtil();
213
214 GFXStateBlockDesc desc;
215 desc.setZReadWrite( true, false );
216 desc.setCullMode( GFXCullNone );
217 desc.setBlend( true );
218
219 // Base the color on the light color.
220 ColorI color = mColor.toColorI();
221 color.alpha = 16;
222
223 F32 radius = mRange * mSin( mDegToRad( mOuterConeAngle * 0.5f ) );
224 draw->drawCone( desc,
225 getPosition() + ( getTransform().getForwardVector() * mRange ),
226 getPosition(),
227 radius,
228 color );
229}

Callers

nothing calls this directly

Calls 10

mSinFunction · 0.85
mDegToRadFunction · 0.85
getPositionFunction · 0.85
getDrawUtilMethod · 0.80
setZReadWriteMethod · 0.80
setCullModeMethod · 0.80
setBlendMethod · 0.80
toColorIMethod · 0.80
drawConeMethod · 0.45
getForwardVectorMethod · 0.45

Tested by

no test coverage detected