]> git.mxchange.org Git - simgear.git/commitdiff
A couple changes to allow separate handling of VASI/PAPI lights which
authorcurt <curt>
Wed, 24 Sep 2003 19:56:51 +0000 (19:56 +0000)
committercurt <curt>
Wed, 24 Sep 2003 19:56:51 +0000 (19:56 +0000)
generally are turned on all the time.

simgear/scene/tgdb/obj.cxx
simgear/scene/tgdb/obj.hxx

index 57c8e90cf610fe8c7aff93a515595dcf26c9ebf5..6009eac55d61eb0bc6c030230c4dd25f16399021 100644 (file)
@@ -318,9 +318,10 @@ bool sgBinObjLoad( const string& path, const bool is_base,
                    double *bounding_radius,
                    SGMaterialLib *matlib,
                    bool use_random_objects,
-                   ssgBranch* geometry,
-                   ssgBranch* rwy_lights,
-                   ssgBranch* taxi_lights,
+                   ssgBranch *geometry,
+                   ssgBranch *vasi_lights,
+                   ssgBranch *rwy_lights,
+                   ssgBranch *taxi_lights,
                    ssgVertexArray *ground_lights )
 {
     SGBinObject obj;
@@ -351,7 +352,8 @@ bool sgBinObjLoad( const string& path, const bool is_base,
     group_list const& pts_n = obj.get_pts_n();
     for ( i = 0; i < pts_v.size(); ++i ) {
         // cout << "pts_v.size() = " << pts_v.size() << endl;
-       if ( pt_materials[i].substr(0, 3) == "RWY" ) {
+        if ( pt_materials[i].substr(0, 3) == "RWY" ) {
+            // airport environment lighting
             sgVec3 up;
             sgSetVec3( up, center->x(), center->y(), center->z() );
             // returns a transform -> lod -> leaf structure
@@ -359,16 +361,17 @@ bool sgBinObjLoad( const string& path, const bool is_base,
                                                          pts_v[i], pts_n[i],
                                                          matlib,
                                                          pt_materials[i], up );
-            if ( pt_materials[i].substr(0, 16) == "RWY_BLUE_TAXIWAY_LIGHTS" ) {
-                taxi_lights->addKid( branch );
-            } else if ( pt_materials[i].substr(0, 16)
-                        == "RWY_GREEN_TAXIWAY_LIGHTS" )
+            if ( pt_materials[i] == "RWY_VASI_LIGHTS" ) {
+                vasi_lights->addKid( branch );
+            } else if ( pt_materials[i] == "RWY_BLUE_TAXIWAY_LIGHTS"
+                || pt_materials[i] == "RWY_GREEN_TAXIWAY_LIGHTS" )
             {
                 taxi_lights->addKid( branch );
             } else {
                 rwy_lights->addKid( branch );
             }
         } else {
+            // other geometry
             material = pt_materials[i];
             tex_index.clear();
             ssgLeaf *leaf = sgMakeLeaf( path, GL_POINTS, matlib, material,
index b1b2697867397854574a9acd693afd0690a5aed8..29ac960d1df2ba1c18988d17e63199cdbb6ce081 100644 (file)
@@ -51,15 +51,16 @@ bool sgBinObjLoad( const string& path, const bool is_base,
                    double *bounding_radius,
                    SGMaterialLib *matlib,
                    bool use_random_objects,
-                   ssgBranch* geometry,
-                   ssgBranch* rwy_lights,
-                   ssgBranch* taxi_lights,
+                   ssgBranch *geometry,
+                   ssgBranch *vasi_lights,
+                   ssgBranch *rwy_lights,
+                   ssgBranch *taxi_lights,
                    ssgVertexArray *ground_lights );
 
 // Generate an ocean tile
 bool sgGenTile( const string& path, SGBucket b,
                 Point3D *center, double *bounding_radius,
-                SGMaterialLib *matlib, ssgBranchgeometry );
+                SGMaterialLib *matlib, ssgBranch *geometry );
 
 
 #endif // _SG_OBJ_HXX