Esempio n. 1
0
 public static void SetDefaults()
 {
     MySolarSystemArea defaults = MySolarSystemConstants.GetDefaultArea();
     SunProperties = defaults.SectorData.SunProperties;
     FogProperties = defaults.SectorData.FogProperties;
     DebrisProperties = defaults.SectorData.DebrisProperties;
     ImpostorProperties = defaults.SectorData.ImpostorProperties;
     ParticleDustProperties = defaults.SectorData.ParticleDustProperties;
     GodRaysProperties = defaults.SectorData.GodRaysProperties;
     BackgroundTexture = defaults.SectorData.BackgroundTexture;
 }
        /// <param name="interpolator">0 - use this object, 1 - use other object</param>
        public MySunProperties InterpolateWith(MySunProperties otherProperties, float interpolator)
        {
            var result = new MySunProperties();

            result.SunDiffuse = Vector3.Lerp(SunDiffuse, otherProperties.SunDiffuse, interpolator);
            result.SunIntensity = MathHelper.Lerp(SunIntensity, otherProperties.SunIntensity, interpolator);
            result.SunSpecular = Vector3.Lerp(SunSpecular, otherProperties.SunSpecular, interpolator);

            result.BackSunIntensity = MathHelper.Lerp(BackSunIntensity, otherProperties.BackSunIntensity, interpolator);
            result.BackSunDiffuse = Vector3.Lerp(BackSunDiffuse, otherProperties.BackSunDiffuse, interpolator);

            result.AmbientColor = Vector3.Lerp(AmbientColor, otherProperties.AmbientColor, interpolator);
            result.AmbientMultiplier = MathHelper.Lerp(AmbientMultiplier, otherProperties.AmbientMultiplier, interpolator);
            result.EnvironmentAmbientIntensity = MathHelper.Lerp(EnvironmentAmbientIntensity, otherProperties.EnvironmentAmbientIntensity, interpolator);
            result.SunSizeMultiplier = MathHelper.Lerp(SunSizeMultiplier, otherProperties.SunSizeMultiplier, interpolator);

            result.BackgroundColor = Vector3.Lerp(BackgroundColor, otherProperties.BackgroundColor, interpolator);
            result.SunRadiationDamagePerSecond = MathHelper.Lerp(SunRadiationDamagePerSecond, otherProperties.SunRadiationDamagePerSecond, interpolator);
 
            return result;
        }
Esempio n. 3
0
        /// <param name="interpolator">0 - use this object, 1 - use other object</param>
        public MySunProperties InterpolateWith(MySunProperties otherProperties, float interpolator)
        {
            var result = new MySunProperties();

            result.SunDiffuse   = Vector3.Lerp(SunDiffuse, otherProperties.SunDiffuse, interpolator);
            result.SunIntensity = MathHelper.Lerp(SunIntensity, otherProperties.SunIntensity, interpolator);
            result.SunSpecular  = Vector3.Lerp(SunSpecular, otherProperties.SunSpecular, interpolator);

            result.BackSunIntensity = MathHelper.Lerp(BackSunIntensity, otherProperties.BackSunIntensity, interpolator);
            result.BackSunDiffuse   = Vector3.Lerp(BackSunDiffuse, otherProperties.BackSunDiffuse, interpolator);

            result.AmbientColor                = Vector3.Lerp(AmbientColor, otherProperties.AmbientColor, interpolator);
            result.AmbientMultiplier           = MathHelper.Lerp(AmbientMultiplier, otherProperties.AmbientMultiplier, interpolator);
            result.EnvironmentAmbientIntensity = MathHelper.Lerp(EnvironmentAmbientIntensity, otherProperties.EnvironmentAmbientIntensity, interpolator);
            result.SunSizeMultiplier           = MathHelper.Lerp(SunSizeMultiplier, otherProperties.SunSizeMultiplier, interpolator);

            result.BackgroundColor             = Vector3.Lerp(BackgroundColor, otherProperties.BackgroundColor, interpolator);
            result.SunRadiationDamagePerSecond = MathHelper.Lerp(SunRadiationDamagePerSecond, otherProperties.SunRadiationDamagePerSecond, interpolator);

            return(result);
        }