]> git.mxchange.org Git - simgear.git/blob - simgear/scene/tgdb/obj.hxx
Merge branch 'maint' into next
[simgear.git] / simgear / scene / tgdb / 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  - http://www.flightgear.org/~curt
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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 //
22 // $Id$
23
24
25 #ifndef _SG_OBJ_HXX
26 #define _SG_OBJ_HXX
27
28 #ifndef __cplusplus
29 # error This library requires C++
30 #endif
31
32 #include <simgear/compiler.h>
33
34 #include <string>
35
36 #include <osg/Node>
37 #include <osg/Group>
38
39 #include "SGOceanTile.hxx"
40
41 using std::string;
42
43 class SGBucket;
44 class SGMaterialLib;
45
46 // Generate an ocean tile
47 inline bool SGGenTile( const std::string&, const SGBucket& b,
48                        SGMaterialLib *matlib, osg::Group* group )
49 {
50   // Generate an ocean tile
51   osg::Node* node = SGOceanTile(b, matlib);
52   if (!node)
53     return false;
54   group->addChild(node);
55   return true;
56 }
57
58 osg::Node*
59 SGLoadBTG(const std::string& path, SGMaterialLib *matlib, bool calc_lights, bool use_random_objects, bool use_random_vegetation);
60
61 #endif // _SG_OBJ_HXX