MCPcopy Create free account
hub / github.com/carbonengine/trinity / SetDepth

Method SetDepth

trinity/Sprite2d/Tr2Sprite2dScene.cpp:485–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483}
484
485void Tr2Sprite2dScene::SetDepth( float depth )
486{
487 //CCP_STATS_ZONE( __FUNCTION__ );
488
489 if( m_is2dRenderContext )
490 {
491 return;
492 }
493
494 const Vector2& currentDepthValues = m_depthStack->back();
495 float depthRange = currentDepthValues.y - currentDepthValues.x;
496 float normDepth = 0.5f * ( depth + 1.0f );
497 m_depth = currentDepthValues.x + normDepth * depthRange;
498}
499
500void Tr2Sprite2dScene::PushTransform( const Matrix& m )
501{

Callers 5

GatherSpritesMethod · 0.45
SetRegularRenderStateMethod · 0.45
SetGlowRenderStateMethod · 0.45
SetShadowRenderStateMethod · 0.45
GatherSpritesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected