]> git.mxchange.org Git - flightgear.git/blob - Simulator/Scenery/tilemgr.hxx
Initial revision
[flightgear.git] / Simulator / Scenery / tilemgr.hxx
1 // tilemgr.hxx -- routines to handle dynamic management of scenery tiles
2 //
3 // Written by Curtis Olson, started January 1998.
4 //
5 // Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 //
21 // $Id$
22 // (Log is kept at end of this file)
23
24
25 #ifndef _TILEMGR_HXX
26 #define _TILEMGR_HXX
27
28
29 #ifndef __cplusplus                                                          
30 # error This library requires C++
31 #endif                                   
32
33
34 #include <Bucket/newbucket.hxx>
35
36
37 // Initialize the Tile Manager subsystem
38 int fgTileMgrInit( void );
39
40
41 // given the current lon/lat, fill in the array of local chunks.  If
42 // the chunk isn't already in the cache, then read it from disk.
43 int fgTileMgrUpdate( void );
44
45
46 // Determine scenery altitude.  Normally this just happens when we
47 // render the scene, but we'd also like to be able to do this
48 // explicitely.  lat & lon are in radians.  abs_view_pos in meters.
49 // Returns result in meters.
50 double fgTileMgrCurElevNEW( const FGBucket& p );
51 double fgTileMgrCurElev( double lon, double lat, const Point3D& abs_view_pos );
52
53
54 // Render the local tiles --- hack, hack, hack
55 void fgTileMgrRender( void );
56
57
58 #endif // _TILEMGR_HXX
59
60
61 // $Log$
62 // Revision 1.1  1999/04/05 21:32:49  curt
63 // Initial revision
64 //
65 // Revision 1.8  1999/03/25 19:03:29  curt
66 // Converted to use new bucket routines.
67 //
68 // Revision 1.7  1999/01/27 04:49:49  curt
69 // Fixes so that the sim can start out at an airport below sea level.
70 //
71 // Revision 1.6  1998/12/03 01:18:19  curt
72 // Converted fgFLIGHT to a class.
73 // Tweaks for Sun Portability.
74 // Tweaked current terrain elevation code as per NHV.
75 //
76 // Revision 1.5  1998/10/16 00:55:52  curt
77 // Converted to Point3D class.
78 //
79 // Revision 1.4  1998/09/09 20:58:11  curt
80 // Tweaks to loop constructs with STL usage.
81 //
82 // Revision 1.3  1998/08/22  14:49:59  curt
83 // Attempting to iron out seg faults and crashes.
84 // Did some shuffling to fix a initialization order problem between view
85 // position, scenery elevation.
86 //
87 // Revision 1.2  1998/05/20 20:53:56  curt
88 // Moved global ref point and radius (bounding sphere info, and offset) to
89 // data file rather than calculating it on the fly.
90 // Fixed polygon winding problem in scenery generation stage rather than
91 // compensating for it on the fly.
92 // Made a fgTILECACHE class.
93 //
94 // Revision 1.1  1998/04/22 13:22:49  curt
95 // C++ - ifing the code a bit.
96 //
97 // Revision 1.6  1998/04/21 17:02:45  curt
98 // Prepairing for C++ integration.
99 //
100 // Revision 1.5  1998/02/12 21:59:53  curt
101 // Incorporated code changes contributed by Charlie Hotchkiss
102 // <chotchkiss@namg.us.anritsu.com>
103 //
104 // Revision 1.4  1998/01/22 02:59:42  curt
105 // Changed #ifdef FILE_H to #ifdef _FILE_H
106 //
107 // Revision 1.3  1998/01/19 18:40:38  curt
108 // Tons of little changes to clean up the code and to remove fatal errors
109 // when building with the c++ compiler.
110 //
111 // Revision 1.2  1998/01/13 00:23:11  curt
112 // Initial changes to support loading and management of scenery tiles.  Note,
113 // there's still a fair amount of work left to be done.
114 //
115 // Revision 1.1  1998/01/07 23:50:51  curt
116 // "area" renamed to "tile"