コード例 #1
0
 public static void SetDefaults()
 {
     SunProperties          = new MySunProperties(MySunProperties.Default);
     FogProperties          = MyFogProperties.Default;
     ImpostorProperties     = new VRageRender.MyImpostorProperties[1];
     ParticleDustProperties = new MyParticleDustProperties();
     GodRaysProperties      = new MyGodRaysProperties();
     BackgroundTexture      = "BackgroundCube";
 }
コード例 #2
0
ファイル: MySector.cs プロジェクト: Krulac/SpaceEngineers
 public static void SetDefaults()
 {
     SunProperties = MySunProperties.Default;
     FogProperties = MyFogProperties.Default;
     ImpostorProperties = new VRageRender.MyImpostorProperties[1];
     ParticleDustProperties = new MyParticleDustProperties();
     GodRaysProperties = new MyGodRaysProperties();
     BackgroundTexture = "BackgroundCube";
 }
コード例 #3
0
 /// <param name="interpolator">0 - use this object, 1 - use other object</param>
 public MyGodRaysProperties InterpolateWith(MyGodRaysProperties otherProperties, float interpolator)
 {
     var result = new MyGodRaysProperties();
     result.Density = MathHelper.Lerp(Density, otherProperties.Density, interpolator);
     result.Weight = MathHelper.Lerp(Weight, otherProperties.Weight, interpolator);
     result.Decay = MathHelper.Lerp(Decay, otherProperties.Decay, interpolator);
     result.Exposition = MathHelper.Lerp(Exposition, otherProperties.Exposition, interpolator);
     result.Enabled = MathHelper.Lerp(Enabled ? 1 : 0, otherProperties.Enabled ? 1 : 0, interpolator) > 0.5f;
     return result;
 }
コード例 #4
0
        /// <param name="interpolator">0 - use this object, 1 - use other object</param>
        public MyGodRaysProperties InterpolateWith(MyGodRaysProperties otherProperties, float interpolator)
        {
            var result = new MyGodRaysProperties();

            result.Density    = MathHelper.Lerp(Density, otherProperties.Density, interpolator);
            result.Weight     = MathHelper.Lerp(Weight, otherProperties.Weight, interpolator);
            result.Decay      = MathHelper.Lerp(Decay, otherProperties.Decay, interpolator);
            result.Exposition = MathHelper.Lerp(Exposition, otherProperties.Exposition, interpolator);
            result.Enabled    = MathHelper.Lerp(Enabled ? 1 : 0, otherProperties.Enabled ? 1 : 0, interpolator) > 0.5f;
            return(result);
        }