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

Method SetScaling

trinity/Eve/SpaceObjectFactory/EveSOFData.cpp:764–782  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

762}
763
764void EveSOFDataHullBanner::SetScaling( const Vector3& scaling )
765{
766 m_scaling = scaling;
767 if( m_maintainAspectRatio )
768 {
769 float ratio = GetAspectRatio();
770 if( GetTargetAspectRatio() < 1 )
771 {
772 if( ratio != 0 )
773 {
774 m_scaling.x *= GetTargetAspectRatio() / ratio;
775 }
776 }
777 else
778 {
779 m_scaling.y *= ratio / GetTargetAspectRatio();
780 }
781 }
782}
783
784EveSOFDataHullBannerSet::EveSOFDataHullBannerSet( IRoot* lockobj ) :
785 PARENTLOCK( m_banners ),

Callers 3

SetupEffectChildrenMethod · 0.45
SetupDecalSetsMethod · 0.45

Calls 1

GetAspectRatioFunction · 0.85

Tested by

no test coverage detected