| 557 | } |
| 558 | |
| 559 | void 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 | |
| 587 | void Tr2InteriorScene::RenderFullForward( Tr2RenderContext& renderContext ) |
| 588 | { |
nothing calls this directly
no test coverage detected