~jtaylor/ubuntu/oneiric/flightgear/fix-749249

« back to all changes in this revision

Viewing changes to src/Scenery/tileentry.hxx

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2006-01-05 12:48:11 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060105124811-xsr6rtcrb88w19c8
Tags: 0.9.9-1ubuntu1
Resynchronise with Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
// along with this program; if not, write to the Free Software
19
19
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
20
//
21
 
// $Id: tileentry.hxx,v 1.18 2004/11/19 22:10:43 curt Exp $
 
21
// $Id: tileentry.hxx,v 1.21 2005/10/26 09:03:49 ehofman Exp $
22
22
 
23
23
 
24
24
#ifndef _TILEENTRY_HXX
58
58
class ssgLeaf;
59
59
class ssgBranch;
60
60
class ssgTransform;
 
61
class ssgPlacementTransform;
61
62
class ssgSelector;
62
63
class ssgRangeSelector;
63
64
class ssgVertexArray;
81
82
public:
82
83
 
83
84
    inline FGDeferredModel() { }
84
 
    inline FGDeferredModel( const string mp, const string tp, SGBucket b,
 
85
    inline FGDeferredModel( const string& mp, const string& tp, SGBucket b,
85
86
                     FGTileEntry *t, ssgTransform *ot )
86
87
    {
87
88
        model_path = mp;
91
92
        obj_trans = ot;
92
93
    }
93
94
    inline ~FGDeferredModel() { }
94
 
    inline string get_model_path() const { return model_path; }
95
 
    inline string get_texture_path() const { return texture_path; }
96
 
    inline SGBucket get_bucket() const { return bucket; }
 
95
    inline const string& get_model_path() const { return model_path; }
 
96
    inline const string& get_texture_path() const { return texture_path; }
 
97
    inline const SGBucket& get_bucket() const { return bucket; }
97
98
    inline FGTileEntry *get_tile() const { return tile; }
98
99
    inline ssgTransform *get_obj_trans() const { return obj_trans; }
99
100
};
109
110
    // global tile culling data
110
111
    Point3D center;
111
112
    double bounding_radius;
112
 
    Point3D offset;
113
113
 
114
114
    // this tile's official location in the world
115
115
    SGBucket tile_bucket;
128
128
    //                 - kidn(fan)
129
129
 
130
130
    // pointer to ssg transform for this tile
131
 
    ssgTransform *terra_transform;
132
 
    ssgTransform *vasi_lights_transform;
133
 
    ssgTransform *rwy_lights_transform;
134
 
    ssgTransform *taxi_lights_transform;
135
 
    ssgTransform *gnd_lights_transform;
 
131
    ssgPlacementTransform *terra_transform;
 
132
    ssgPlacementTransform *vasi_lights_transform;
 
133
    ssgPlacementTransform *rwy_lights_transform;
 
134
    ssgPlacementTransform *taxi_lights_transform;
 
135
    ssgPlacementTransform *gnd_lights_transform;
136
136
 
137
137
    // pointer to ssg range selector for this tile
138
138
    ssgRangeSelector *terra_range;
218
218
    // completely freed.
219
219
    bool free_tile();
220
220
 
221
 
    // Calculate this tile's offset
222
 
    void SetOffset( const Point3D& p)
223
 
    {
224
 
        offset = center - p;
225
 
    }
226
 
 
227
 
    // Return this tile's offset
228
 
    inline Point3D get_offset() const { return offset; }
229
 
 
230
221
    // Update the ssg transform node for this tile so it can be
231
222
    // properly drawn relative to our (0,0,0) point
232
223
    void prep_ssg_node( const Point3D& p, sgVec3 up, float vis);
257
248
    /**
258
249
     * Return the "bucket" for this tile
259
250
     */
260
 
    inline SGBucket get_tile_bucket() const { return tile_bucket; }
 
251
    inline const SGBucket& get_tile_bucket() const { return tile_bucket; }
261
252
 
262
253
    /**
263
254
     * Apply ssgLeaf::makeDList to all leaf of a branch
283
274
    /**
284
275
     * return the SSG Transform node for the terrain
285
276
     */
286
 
    inline ssgTransform *get_terra_transform() { return terra_transform; }
 
277
    inline ssgPlacementTransform *get_terra_transform() const { return terra_transform; }
287
278
 
288
279
    inline double get_timestamp() const { return timestamp; }
289
280
    inline void set_timestamp( double time_ms ) { timestamp = time_ms; }