| 208 | } |
| 209 | |
| 210 | void 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 | } |
nothing calls this directly
no test coverage detected