From: curt Date: Tue, 4 Jul 2000 03:32:02 +0000 (+0000) Subject: Updates to control span (or lateral size of cloud layer square) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;ds=sidebyside;h=dc7bbdce1198128af6e803a21c516ab54997599b;p=simgear.git Updates to control span (or lateral size of cloud layer square) --- diff --git a/simgear/sky/sky.cxx b/simgear/sky/sky.cxx index 1b485d27..36c3c257 100644 --- a/simgear/sky/sky.cxx +++ b/simgear/sky/sky.cxx @@ -248,10 +248,11 @@ void SGSky::postDraw( float alt ) { } -void SGSky::add_cloud_layer( double asl, double thickness, double transition, +void SGSky::add_cloud_layer( double span, double asl, + double thickness, double transition, ssgSimpleState *state ) { SGCloudLayer *layer = new SGCloudLayer; - layer->build( 40000.0f, asl, thickness, transition, state ); + layer->build( span, asl, thickness, transition, state ); layer_list_iterator current = cloud_layers.begin(); layer_list_iterator last = cloud_layers.end(); @@ -272,17 +273,19 @@ void SGSky::add_cloud_layer( double asl, double thickness, double transition, } -void SGSky::add_cloud_layer( double asl, double thickness, double transition, +void SGSky::add_cloud_layer( double span, double asl, + double thickness, double transition, const string &tex_path ) { ssgSimpleState *state = SGCloudMakeState( tex_path ); - add_cloud_layer( asl, thickness, transition, state ); + add_cloud_layer( span, asl, thickness, transition, state ); } -void SGSky::add_cloud_layer( double asl, double thickness, double transition, +void SGSky::add_cloud_layer( double span, double asl, + double thickness, double transition, SGCloudType type ) { if ( type > 0 && type < SG_MAX_CLOUD_TYPES ) { - add_cloud_layer( asl, thickness, transition, cloud_mats[type] ); + add_cloud_layer( span, asl, thickness, transition, cloud_mats[type] ); } } diff --git a/simgear/sky/sky.hxx b/simgear/sky/sky.hxx index eaaf3f4f..95665fd7 100644 --- a/simgear/sky/sky.hxx +++ b/simgear/sky/sky.hxx @@ -153,11 +153,14 @@ public: } // add a cloud layer (above sea level in meters) - void add_cloud_layer( double asl, double thickness, double transition, + void add_cloud_layer( double span, double asl, + double thickness, double transition, SGCloudType type ); - void add_cloud_layer( double asl, double thickness, double transition, + void add_cloud_layer( double span, double asl, + double thickness, double transition, const string &tex_path ); - void add_cloud_layer( double asl, double thickness, double transition, + void add_cloud_layer( double span, double asl, + double thickness, double transition, ssgSimpleState *state ); inline int get_num_layers() const { return cloud_layers.size(); }