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

Method ResolveVisibility

trinity/Interior/Tr2InteriorScene.cpp:559–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

557}
558
559void Tr2InteriorScene::ResolveVisibility( const Matrix& view, const Matrix& projection, size_t maxDepth )
560{
561 CTriViewport viewport;
562 TriFrustum frustum;
563 XMVECTOR det;
564 Matrix viewInv( XMMatrixInverse( &det, view ) );
565 frustum.DeriveFrustum( &view, (Vector3*)( &viewInv._41 ), &projection, viewport );
566
567 OnQueryBegin();
568
569 for( auto it = m_dynamics.begin(); it != m_dynamics.end(); ++it )
570 {
571 Matrix objectToWorld;
572 if( ( *it )->IsInFrustum( frustum, objectToWorld ) )
573 {
574 OnInstanceVisible( *it, objectToWorld );
575 }
576 }
577 for( auto it = m_lights.begin(); it != m_lights.end(); ++it )
578 {
579 Matrix objectToWorld;
580 if( ( *it )->IsInFrustum( frustum, objectToWorld ) )
581 {
582 OnInstanceVisible( *it, objectToWorld );
583 }
584 }
585}
586
587void Tr2InteriorScene::RenderFullForward( Tr2RenderContext& renderContext )
588{

Callers

nothing calls this directly

Calls 4

DeriveFrustumMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
IsInFrustumMethod · 0.45

Tested by

no test coverage detected