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

Method GetPickingObjectsToRender

trinity/Eve/EveSpaceScene.cpp:3796–3819  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3794}
3795
3796void EveSpaceScene::GetPickingObjectsToRender( std::vector<ITr2Renderable*>& pickableRenderObjects )
3797{
3798 pickableRenderObjects.clear();
3799
3800 auto oldFrustum = m_updateContext.GetFrustum();
3801 m_updateContext.SetFrustum( CreatePickingFrustum() );
3802
3803 for( IEveSpaceObject2Vector::const_iterator it = m_objects.begin(); it != m_objects.end(); ++it )
3804 {
3805 if( ( *it )->IsPickable() )
3806 {
3807 // Note: Here we are relying on the EveSpaceObject's GetRenderables
3808 // function to decide what objects are pickable in the given frustum.
3809 // This is not necessarily what we want, as some objects might be
3810 // renderable but not pickable (particle clouds?)
3811 ( *it )->UpdateVisibility( m_updateContext, IdentityMatrix() );
3812 ( *it )->GetRenderables( pickableRenderObjects, nullptr );
3813 }
3814 }
3815 m_updateContext.SetFrustum( oldFrustum );
3816
3817 m_cameraAttachmentParent->UpdateVisibility( m_updateContext, IdentityMatrix() );
3818 m_cameraAttachmentParent->GetRenderables( pickableRenderObjects, nullptr );
3819}
3820
3821void EveSpaceScene::UpdatePlanets( const EveUpdateContext& updateContext )
3822{

Callers

nothing calls this directly

Calls 8

CreatePickingFrustumFunction · 0.85
GetFrustumMethod · 0.80
IsPickableMethod · 0.80
SetFrustumMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
UpdateVisibilityMethod · 0.45
GetRenderablesMethod · 0.45

Tested by

no test coverage detected