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

Method UpdatePlanetVisibility

trinity/Eve/EvePlanet.cpp:119–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void EvePlanet::UpdatePlanetVisibility( const EveUpdateContext& updateContext, float renderScale )
120{
121 const auto scaledTransform = CalculatePlanetScaleTransform( m_worldTransform, renderScale );
122
123 // pixel diameters, also for the max possible
124 m_estimatedPixelDiameter = EstimatePixelDiameterPos( reinterpret_cast<const Vector3*>( &scaledTransform._41 ), 1.f / Tr2Renderer::GetProjectionTransform()._11, renderScale );
125 m_estimatedMaxPixelDiameter = EstimatePixelDiameterPos( reinterpret_cast<const Vector3*>( &scaledTransform._41 ), tanf( FOV_MIN / 2.f ), renderScale );
126
127 for( auto it = m_effectChildren.begin(); it != m_effectChildren.end(); ++it )
128 {
129 ( *it )->UpdateVisibility( updateContext, scaledTransform, m_lodLevel );
130 }
131}
132
133void EvePlanet::UpdateZOnlyVisibility( const EveUpdateContext& updateContext )
134{

Callers 2

RenderReflectionPassMethod · 0.80
RenderBackgroundPassMethod · 0.80

Calls 4

GetProjectionTransformFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
UpdateVisibilityMethod · 0.45

Tested by

no test coverage detected