]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scenery/tileentry.hxx
Mathias Fröhlich:
[flightgear.git] / src / Scenery / tileentry.hxx
index d3476c061d54ca4a923cdaed8521d153a3c16076..90471243beff45d5c245f27974e493538ed66216 100644 (file)
@@ -2,7 +2,7 @@
 //
 // Written by Curtis Olson, started May 1998.
 //
-// Copyright (C) 1998 - 2001  Curtis L. Olson  - curt@flightgear.org
+// Copyright (C) 1998 - 2001  Curtis L. Olson  - http://www.flightgear.org/~curt
 //
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
@@ -38,8 +38,6 @@
 #include <vector>
 #include STL_STRING
 
-#include <plib/ssg.h>          // plib includes
-
 #include <simgear/bucket/newbucket.hxx>
 #include <simgear/math/point3d.hxx>
 #include <simgear/misc/sg_path.hxx>
@@ -56,6 +54,14 @@ typedef vector < Point3D > point_list;
 typedef point_list::iterator point_list_iterator;
 typedef point_list::const_iterator const_point_list_iterator;
 
+
+class ssgLeaf;
+class ssgBranch;
+class ssgTransform;
+class ssgPlacementTransform;
+class ssgSelector;
+class ssgRangeSelector;
+class ssgVertexArray;
 class FGTileEntry;
 
 
@@ -104,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;
@@ -123,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;
@@ -213,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);
@@ -254,6 +250,11 @@ public:
      */
     inline SGBucket get_tile_bucket() const { return tile_bucket; }
 
+    /**
+     * Apply ssgLeaf::makeDList to all leaf of a branch
+     */
+    void makeDList( ssgBranch *b );
+
     /**
      * Add terrain mesh and ground lighting to scene graph.
      */
@@ -273,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() { return terra_transform; }
 
     inline double get_timestamp() const { return timestamp; }
     inline void set_timestamp( double time_ms ) { timestamp = time_ms; }