]> git.mxchange.org Git - flightgear.git/blob - Objects/obj.hxx
Changes contributed by Bernie Bright <bbright@c031.aone.net.au>
[flightgear.git] / Objects / obj.hxx
1 // obj.hxx -- routines to handle WaveFront .obj-ish format files.
2 //
3 // Written by Curtis Olson, started October 1997.
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 _OBJ_HXX
26 #define _OBJ_HXX
27
28
29 #ifndef __cplusplus                                                          
30 # error This library requires C++
31 #endif                                   
32
33
34 #ifdef HAVE_CONFIG_H
35 #  include <config.h>
36 #endif
37
38 #ifdef HAVE_WINDOWS_H
39 #  include <windows.h>
40 #endif
41
42 #include <GL/glut.h>
43
44 #include <string>
45
46 #include <Include/fg_types.h>
47
48 #include <Scenery/tile.hxx>
49
50
51 // Load a .obj file and build the GL fragment list
52 int fgObjLoad(const string& path, fgTILE *tile);
53
54
55 #endif // _OBJ_HXX
56
57
58 // $Log$
59 // Revision 1.2  1998/09/01 19:03:10  curt
60 // Changes contributed by Bernie Bright <bbright@c031.aone.net.au>
61 //  - The new classes in libmisc.tgz define a stream interface into zlib.
62 //    I've put these in a new directory, Lib/Misc.  Feel free to rename it
63 //    to something more appropriate.  However you'll have to change the
64 //    include directives in all the other files.  Additionally you'll have
65 //    add the library to Lib/Makefile.am and Simulator/Main/Makefile.am.
66 //
67 //    The StopWatch class in Lib/Misc requires a HAVE_GETRUSAGE autoconf
68 //    test so I've included the required changes in config.tgz.
69 //
70 //    There are a fair few changes to Simulator/Objects as I've moved
71 //    things around.  Loading tiles is quicker but thats not where the delay
72 //    is.  Tile loading takes a few tenths of a second per file on a P200
73 //    but it seems to be the post-processing that leads to a noticeable
74 //    blip in framerate.  I suppose its time to start profiling to see where
75 //    the delays are.
76 //
77 //    I've included a brief description of each archives contents.
78 //
79 // Lib/Misc/
80 //   zfstream.cxx
81 //   zfstream.hxx
82 //     C++ stream interface into zlib.
83 //     Taken from zlib-1.1.3/contrib/iostream/.
84 //     Minor mods for STL compatibility.
85 //     There's no copyright associated with these so I assume they're
86 //     covered by zlib's.
87 //
88 //   fgstream.cxx
89 //   fgstream.hxx
90 //     FlightGear input stream using gz_ifstream.  Tries to open the
91 //     given filename.  If that fails then filename is examined and a
92 //     ".gz" suffix is removed or appended and that file is opened.
93 //
94 //   stopwatch.hxx
95 //     A simple timer for benchmarking.  Not used in production code.
96 //     Taken from the Blitz++ project.  Covered by GPL.
97 //
98 //   strutils.cxx
99 //   strutils.hxx
100 //     Some simple string manipulation routines.
101 //
102 // Simulator/Airports/
103 //   Load airports database using fgstream.
104 //   Changed fgAIRPORTS to use set<> instead of map<>.
105 //   Added bool fgAIRPORTS::search() as a neater way doing the lookup.
106 //   Returns true if found.
107 //
108 // Simulator/Astro/
109 //   Modified fgStarsInit() to load stars database using fgstream.
110 //
111 // Simulator/Objects/
112 //   Modified fgObjLoad() to use fgstream.
113 //   Modified fgMATERIAL_MGR::load_lib() to use fgstream.
114 //   Many changes to fgMATERIAL.
115 //   Some changes to fgFRAGMENT but I forget what!
116 //
117 // Revision 1.1  1998/08/25 16:51:26  curt
118 // Moved from ../Scenery
119 //
120 // Revision 1.4  1998/05/24 02:49:10  curt
121 // Implimented fragment level view frustum culling.
122 //
123 // Revision 1.3  1998/05/23 14:09:21  curt
124 // Added tile.cxx and tile.hxx.
125 // Working on rewriting the tile management system so a tile is just a list
126 // fragments, and the fragment record contains the display list for that
127 // fragment. 
128 //
129 // Revision 1.2  1998/05/02 01:52:15  curt
130 // Playing around with texture coordinates.
131 //
132 // Revision 1.1  1998/04/30 12:35:29  curt
133 // Added a command line rendering option specify smooth/flat shading.
134 //
135 // Revision 1.11  1998/04/25 22:06:31  curt
136 // Edited cvs log messages in source files ... bad bad bad!
137 //
138 // Revision 1.10  1998/04/24 00:51:07  curt
139 // Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
140 // Tweaked the scenery file extentions to be "file.obj" (uncompressed)
141 // or "file.obz" (compressed.)
142 //
143 // Revision 1.9  1998/04/22 13:22:45  curt
144 // C++ - ifing the code a bit.
145 //
146 // Revision 1.8  1998/04/21 17:02:43  curt
147 // Prepairing for C++ integration.
148 //
149 // Revision 1.7  1998/04/03 22:11:37  curt
150 // Converting to Gnu autoconf system.
151 //
152 // Revision 1.6  1998/01/31 00:43:25  curt
153 // Added MetroWorks patches from Carmen Volpe.
154 //
155 // Revision 1.5  1998/01/27 00:48:03  curt
156 // Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
157 // system and commandline/config file processing code.
158 //
159 // Revision 1.4  1998/01/22 02:59:41  curt
160 // Changed #ifdef FILE_H to #ifdef _FILE_H
161 //
162 // Revision 1.3  1998/01/19 19:27:17  curt
163 // Merged in make system changes from Bob Kuehne <rpk@sgi.com>
164 // This should simplify things tremendously.
165 //
166 // Revision 1.2  1998/01/13 00:23:10  curt
167 // Initial changes to support loading and management of scenery tiles.  Note,
168 // there's still a fair amount of work left to be done.
169 //
170 // Revision 1.1  1997/10/28 21:14:55  curt
171 // Initial revision.
172