/// <summary>
        /// Sets up a ring model instance
        /// </summary>
        public override void SetupInstance( IPlanetEnvironmentModel model, ModelTemplateInstanceContext context )
        {
            base.SetupInstance( model, context );

            ISpherePlanetRingModel ringModel = ( ISpherePlanetRingModel )model;
            double radius = Range.Mid( InnerRadiusMultiple, ( float )context.Random.NextDouble( ) );
            ringModel.InnerRadius = new Units.Metres( radius );
        }
 /// <summary>
 /// Sets up a ring model instance
 /// </summary>
 public override void SetupInstance( IPlanetEnvironmentModel model, ModelTemplateInstanceContext context )
 {
     IPlanetRingModel ringModel = ( IPlanetRingModel )model;
     double width = RingWidth.Minimum + ( RingWidth.Maximum - RingWidth.Minimum ) * context.Random.NextDouble( );
     ringModel.Width = new Units.Metres( width );
 }
 /// <summary>
 /// Atmosphere model creation
 /// </summary>
 public override void SetupInstance( IPlanetEnvironmentModel model, ModelTemplateInstanceContext context )
 {
     IPlanetAtmosphereModel atmosphereModel = ( IPlanetAtmosphereModel )model;
 }
        /// <summary>
        /// Creates an instance of this template
        /// </summary>
        /// <param name="model">Planet model to create</param>
        /// <param name="context">Instancing context</param>
        public override void SetupInstance( IPlanetEnvironmentModel model, ModelTemplateInstanceContext context )
        {
            Arguments.CheckNotNull( model, "planetModel" );
            Arguments.CheckNotNull( context, "context" );

            SetupCloudModel( ( IPlanetCloudModel )model, context );
        }
        /// <summary>
        /// Sets up a cloud model created by <see cref="CreateCloudModel"/>
        /// </summary>
        protected virtual void SetupCloudModel( IPlanetCloudModel model, ModelTemplateInstanceContext context )
        {
            model.CloudLayerMinHeight = Range.Mid( CloudLayerHeightRange, context.Random.NextDouble( ) );

            float min = Range.Mid( LowCoverageRange, ( float )context.Random.NextDouble( ) );
            float max = Range.Mid( HighCoverageRange, ( float )context.Random.NextDouble( ) );
            model.CoverageRange = new Range<float>( Utils.Min( min, max ), Utils.Max( min, max ) );
        }
 /// <summary>
 /// Sets up an ocean model instance
 /// </summary>
 public override void SetupInstance( IPlanetEnvironmentModel model, ModelTemplateInstanceContext context )
 {
     IPlanetOceanModel oceanModel = ( IPlanetOceanModel )model;
     oceanModel.SeaLevel = Range.Mid( SeaLevel, ( float )context.Random.NextDouble( ) );
 }