00001 // obj.hxx -- routines to handle loading scenery and building the plib 00002 // scene graph. 00003 // 00004 // Written by Curtis Olson, started October 1997. 00005 // 00006 // Copyright (C) 1997 Curtis L. Olson - http://www.flightgear.org/~curt 00007 // 00008 // This program is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU General Public License as 00010 // published by the Free Software Foundation; either version 2 of the 00011 // License, or (at your option) any later version. 00012 // 00013 // This program is distributed in the hope that it will be useful, but 00014 // WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 // General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU General Public License 00019 // along with this program; if not, write to the Free Software 00020 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00021 // 00022 // $Id: obj_8hxx_source.html,v 1.3 2010/02/23 22:10:15 curt Exp $ 00023 00024 00025 #ifndef _SG_OBJ_HXX 00026 #define _SG_OBJ_HXX 00027 00028 #ifndef __cplusplus 00029 # error This library requires C++ 00030 #endif 00031 00032 #include <simgear/compiler.h> 00033 00034 #include <string> 00035 00036 #include <osg/Node> 00037 #include <osg/Group> 00038 00039 #include "SGOceanTile.hxx" 00040 00041 using std::string; 00042 00043 class SGBucket; 00044 class SGMaterialLib; 00045 00046 // Generate an ocean tile 00047 inline bool SGGenTile( const std::string&, const SGBucket& b, 00048 SGMaterialLib *matlib, osg::Group* group ) 00049 { 00050 // Generate an ocean tile 00051 osg::Node* node = SGOceanTile(b, matlib); 00052 if (!node) 00053 return false; 00054 group->addChild(node); 00055 return true; 00056 } 00057 00058 osg::Node* 00059 SGLoadBTG(const std::string& path, SGMaterialLib *matlib, bool calc_lights, bool use_random_objects, bool use_random_vegetation); 00060 00061 #endif // _SG_OBJ_HXX