]> git.mxchange.org Git - flightgear.git/blob - src/Objects/obj.hxx
Removed support of old Ascii scenery format. The loader had not been
[flightgear.git] / src / Objects / obj.hxx
1 // obj.hxx -- routines to handle loading scenery and building the plib
2 //            scene graph.
3 //
4 // Written by Curtis Olson, started October 1997.
5 //
6 // Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 // General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 //
22 // $Id$
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 #include <simgear/compiler.h>
39
40 #include STL_STRING
41
42 #include <plib/ssg.h>           // plib include
43
44 #include <simgear/bucket/newbucket.hxx>
45 #include <simgear/math/sg_types.hxx>
46
47 SG_USING_STD(string);
48
49
50 // duplicated from the TerraGear tools
51 #define FG_MAX_NODES 4000
52
53
54 // Load a Binary obj file
55 bool fgBinObjLoad( const string& path, const bool is_base,
56                    Point3D *center,
57                    double *bounding_radius,
58                    ssgBranch* geometry,
59                    ssgBranch* rwy_lights,
60                    ssgBranch* taxi_lights,
61                    ssgVertexArray *ground_lights );
62
63 // Generate an ocean tile
64 bool fgGenTile( const string& path, SGBucket b,
65                 Point3D *center,
66                 double *bounding_radius,
67                 ssgBranch* geometry );
68
69
70 // Create a ssg leaf
71 ssgLeaf *gen_leaf( const string& path,
72                    const GLenum ty, const string& material,
73                    const point_list& nodes, const point_list& normals,
74                    const point_list& texcoords,
75                    const int_list& node_index,
76                    const int_list& normal_index,
77                    const int_list& tex_index,
78                    const bool calc_lights, ssgVertexArray *lights );
79
80
81 #endif // _OBJ_HXX