]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scenery/tileentry.hxx
Lots of changes to the ATC/AI system for initial revision of random AI GA VFR traffic
[flightgear.git] / src / Scenery / tileentry.hxx
index 3ed1027740c627ec1d27a4e1f11d88a14237cf06..2bf8130b90aac0fac6769ac8d6028982e98c155c 100644 (file)
@@ -120,6 +120,7 @@ private:
 
     // pointer to ssg transform for this tile
     ssgTransform *terra_transform;
+    ssgTransform *vasi_lights_transform;
     ssgTransform *rwy_lights_transform;
     ssgTransform *taxi_lights_transform;
     ssgTransform *gnd_lights_transform;
@@ -136,6 +137,7 @@ private:
     // via a call back would be nifty, but then the call back needs to
     // know about the higher level application's global state which is
     // a problem if we move the code into simgear.)
+    ssgSelector *vasi_lights_selector;
     ssgSelector *rwy_lights_selector;
     ssgSelector *taxi_lights_selector;
 
@@ -155,6 +157,7 @@ private:
 
     bool obj_load( const string& path,
                    ssgBranch* geometry,
+                   ssgBranch* vasi_lights,
                    ssgBranch* rwy_lights,
                    ssgBranch* taxi_lights,
                    ssgVertexArray* gound_lights,
@@ -165,16 +168,28 @@ private:
 
     double timestamp;
 
+    /**
+     * this value is used by the tile scheduler/loader to mark which
+     * tiles are in the primary ring (i.e. the current tile or the
+     * surrounding eight.)  Other routines then can use this as an
+     * optimization and not do some operation to tiles outside of this
+     * inner ring.  (For instance vasi color updating)
+     */
+    bool is_inner_ring;
 
-    // this variable tracks the status of the incremental memory freeing.
+    /**
+     * this variable tracks the status of the incremental memory
+     * freeing.
+     */
     enum {
         NODES = 0x01,
         VEC_PTRS = 0x02,
         TERRA_NODE = 0x04,
         GROUND_LIGHTS = 0x08,
-        RWY_LIGHTS = 0x10,
-        TAXI_LIGHTS = 0x20,
-        LIGHTMAPS = 0x40
+        VASI_LIGHTS = 0x10,
+        RWY_LIGHTS = 0x20,
+        TAXI_LIGHTS = 0x40,
+        LIGHTMAPS = 0x80
     };
     int free_tracker;
 
@@ -238,10 +253,11 @@ public:
     /**
      * Add terrain mesh and ground lighting to scene graph.
      */
-    void add_ssg_nodes( ssgBranch* terrain_branch,
-                       ssgBranch* gnd_lights_branch,
-                       ssgBranch* rwy_lights_branch,
-                       ssgBranch* taxi_lights_branch );
+    void add_ssg_nodes( ssgBranch *terrain_branch,
+                       ssgBranch *gnd_lights_branch,
+                        ssgBranch *vasi_lights_branch,
+                       ssgBranch *rwy_lights_branch,
+                       ssgBranch *taxi_lights_branch );
 
     /**
      * disconnect terrain mesh and ground lighting nodes from scene
@@ -255,10 +271,11 @@ public:
      */
     inline ssgTransform *get_terra_transform() { return terra_transform; }
 
-    void set_timestamp(double time_ms) { timestamp = time_ms; }
-
     inline double get_timestamp() const { return timestamp; }
+    inline void set_timestamp( double time_ms ) { timestamp = time_ms; }
 
+    inline bool get_inner_ring() const { return is_inner_ring; }
+    inline void set_inner_ring( bool val ) { is_inner_ring = val; }
 };