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

Method UpdateVisibility

trinity/Eve/UI/EveCurveLineSet.cpp:60–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void EveCurveLineSet::UpdateVisibility( const EveUpdateContext& updateContext, const Matrix& parentTransform )
61{
62 m_isVisible = false;
63
64 if( !m_display )
65 {
66 return;
67 }
68
69 // local transform
70 Matrix localTransform = TransformationMatrix( m_scaling, m_rotation, m_translation );
71
72 // store final world transform
73 m_worldTransform = localTransform * parentTransform;
74 Vector4 boundingSphere = m_boundingSphere;
75 BoundingSphereTransform( m_worldTransform, boundingSphere );
76
77 // cull!
78 if( updateContext.GetFrustum().IsSphereVisible( &boundingSphere ) )
79 {
80 m_isVisible = true;
81 }
82}
83
84// ------------------------------------------------------------------------------------------------------
85void EveCurveLineSet::GetRenderables( std::vector<ITr2Renderable*>& renderables, Tr2ImpostorManager* impostors )

Callers

nothing calls this directly

Calls 3

BoundingSphereTransformFunction · 0.85
IsSphereVisibleMethod · 0.80
GetFrustumMethod · 0.80

Tested by

no test coverage detected