]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scenery/tileentry.hxx
Mathias Fröhlich:
[flightgear.git] / src / Scenery / tileentry.hxx
index bcc669c47378e878d5cdef2dea11f46dac32e5be..e7f6fd3b21c15dce5d8bde4b015b33189c47c8b4 100644 (file)
@@ -58,6 +58,7 @@ typedef point_list::const_iterator const_point_list_iterator;
 class ssgLeaf;
 class ssgBranch;
 class ssgTransform;
+class ssgPlacementTransform;
 class ssgSelector;
 class ssgRangeSelector;
 class ssgVertexArray;
@@ -81,7 +82,7 @@ private:
 public:
 
     inline FGDeferredModel() { }
-    inline FGDeferredModel( const string mp, const string tp, SGBucket b,
+    inline FGDeferredModel( const string& mp, const string& tp, SGBucket b,
                     FGTileEntry *t, ssgTransform *ot )
     {
        model_path = mp;
@@ -91,9 +92,9 @@ public:
        obj_trans = ot;
     }
     inline ~FGDeferredModel() { }
-    inline string get_model_path() const { return model_path; }
-    inline string get_texture_path() const { return texture_path; }
-    inline SGBucket get_bucket() const { return bucket; }
+    inline const string& get_model_path() const { return model_path; }
+    inline const string& get_texture_path() const { return texture_path; }
+    inline const SGBucket& get_bucket() const { return bucket; }
     inline FGTileEntry *get_tile() const { return tile; }
     inline ssgTransform *get_obj_trans() const { return obj_trans; }
 };
@@ -109,7 +110,6 @@ public:
     // global tile culling data
     Point3D center;
     double bounding_radius;
-    Point3D offset;
 
     // this tile's official location in the world
     SGBucket tile_bucket;
@@ -128,11 +128,11 @@ private:
     //                 - kidn(fan)
 
     // 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;
+    ssgPlacementTransform *terra_transform;
+    ssgPlacementTransform *vasi_lights_transform;
+    ssgPlacementTransform *rwy_lights_transform;
+    ssgPlacementTransform *taxi_lights_transform;
+    ssgPlacementTransform *gnd_lights_transform;
 
     // pointer to ssg range selector for this tile
     ssgRangeSelector *terra_range;
@@ -218,15 +218,6 @@ public:
     // completely freed.
     bool free_tile();
 
-    // Calculate this tile's offset
-    void SetOffset( const Point3D& p)
-    {
-       offset = center - p;
-    }
-
-    // Return this tile's offset
-    inline Point3D get_offset() const { return offset; }
-
     // Update the ssg transform node for this tile so it can be
     // properly drawn relative to our (0,0,0) point
     void prep_ssg_node( const Point3D& p, sgVec3 up, float vis);
@@ -257,7 +248,7 @@ public:
     /**
      * Return the "bucket" for this tile
      */
-    inline SGBucket get_tile_bucket() const { return tile_bucket; }
+    inline const SGBucket& get_tile_bucket() const { return tile_bucket; }
 
     /**
      * Apply ssgLeaf::makeDList to all leaf of a branch
@@ -283,7 +274,7 @@ public:
     /**
      * return the SSG Transform node for the terrain
      */
-    inline ssgTransform *get_terra_transform() { return terra_transform; }
+    inline ssgPlacementTransform *get_terra_transform() const { return terra_transform; }
 
     inline double get_timestamp() const { return timestamp; }
     inline void set_timestamp( double time_ms ) { timestamp = time_ms; }