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

Method getLights

Engine/source/lighting/lightQuery.cpp:61–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void LightQuery::getLights( LightInfo** outLights, U32 maxLights )
62{
63 PROFILE_SCOPE( LightQuery_getLights );
64
65 // Gather lights if we haven't already.
66 if ( mLights.empty() )
67 _scoreLights();
68
69 U32 lightCount = getMin( (U32)mLights.size(), getMin( mMaxLights, maxLights ) );
70
71 // Copy them over.
72 for ( U32 i = 0; i < lightCount; i++ )
73 {
74 LightInfo *light = mLights[i];
75
76 // If the score reaches zero then we got to
77 // the end of the valid lights for this object.
78 if ( light->getScore() <= 0.0f )
79 break;
80
81 outLights[i] = light;
82 }
83}
84
85void LightQuery::_scoreLights()
86{

Callers 11

innerRenderMethod · 0.80
_renderBlockMethod · 0.80
_updateDecalMethod · 0.80
prepRenderImageMethod · 0.80
prepRenderImageMethod · 0.80
prepRenderImageMethod · 0.80
prepRenderImageMethod · 0.80
prepRenderImageMethod · 0.80
prepRenderImageMethod · 0.80
renderBillboardsMethod · 0.80
prepRenderImageMethod · 0.80

Calls 3

emptyMethod · 0.45
sizeMethod · 0.45
getScoreMethod · 0.45

Tested by

no test coverage detected