X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscene%2Ftgdb%2Fobj.hxx;h=126ed6ccab3645d05fe7afe7f38accb8f4039cef;hb=7e7ce2f38e87d6244e05730fa4382da088bb25f1;hp=883336ea1b8b8d17b331b027f0f64142a6a60786;hpb=dcb95d131bc6aef1abe25d1f415e309f06e52436;p=simgear.git diff --git a/simgear/scene/tgdb/obj.hxx b/simgear/scene/tgdb/obj.hxx index 883336ea..126ed6cc 100644 --- a/simgear/scene/tgdb/obj.hxx +++ b/simgear/scene/tgdb/obj.hxx @@ -25,42 +25,37 @@ #ifndef _SG_OBJ_HXX #define _SG_OBJ_HXX - #ifndef __cplusplus # error This library requires C++ #endif - #include -#include STL_STRING +#include -#include // plib include +#include +#include -#include +#include "SGOceanTile.hxx" -SG_USING_STD(string); +using std::string; class SGBucket; class SGMaterialLib; - -// Load a Binary obj file -bool sgBinObjLoad( const string& path, const bool is_base, - Point3D *center, - double *bounding_radius, - SGMaterialLib *matlib, - bool use_random_objects, - ssgBranch *geometry, - ssgBranch *vasi_lights, - ssgBranch *rwy_lights, - ssgBranch *taxi_lights, - ssgVertexArray *ground_lights ); - // Generate an ocean tile -bool sgGenTile( const string& path, SGBucket b, - Point3D *center, double *bounding_radius, - SGMaterialLib *matlib, ssgBranch *geometry ); - +inline bool SGGenTile( const std::string&, const SGBucket& b, + SGMaterialLib *matlib, osg::Group* group ) +{ + // Generate an ocean tile + osg::Node* node = SGOceanTile(b, matlib); + if (!node) + return false; + group->addChild(node); + return true; +} + +osg::Node* +SGLoadBTG(const std::string& path, SGMaterialLib *matlib, bool calc_lights, bool use_random_objects, bool use_random_vegetation); #endif // _SG_OBJ_HXX