24#ifndef _TERRAIN_STG_HXX
25#define _TERRAIN_STG_HXX
29# error This library requires C++
35#include <simgear/compiler.h>
36#include <simgear/math/SGMath.hxx>
37#include <simgear/scene/model/particles.hxx>
38#include <simgear/structure/subsystem_mgr.hxx>
57 void init ( osg::Group* terrain );
75 const simgear::BVHMaterial** material,
76 const osg::Node* butNotFrom = 0);
91 const simgear::BVHMaterial** material,
92 const osg::Node* butNotFrom = 0);
101 const osg::Node* butNotFrom = 0);
109 bool schedule_scenery(
const SGGeod& position,
double range_m,
double duration=0.0);
119 osg::ref_ptr<osg::Group> terrain_branch;
static const char * staticSubsystemClassId()
bool schedule_scenery(const SGGeod &position, double range_m, double duration=0.0)
bool get_elevation_m(const SGGeod &geod, double &alt, const simgear::BVHMaterial **material, const osg::Node *butNotFrom=0)
Compute the elevation of the scenery at geodetic latitude lat, geodetic longitude lon and not higher ...
bool scenery_available(const SGGeod &position, double range_m)
Returns true if scenery is available for the given lat, lon position within a range of range_m.
bool get_cart_elevation_m(const SGVec3d &pos, double max_altoff, double &elevation, const simgear::BVHMaterial **material, const osg::Node *butNotFrom=0)
Compute the elevation of the scenery below the cartesian point pos.
bool get_cart_ground_intersection(const SGVec3d &start, const SGVec3d &dir, SGVec3d &nearestHit, const osg::Node *butNotFrom=0)
Compute the nearest intersection point of the line starting from start going in direction dir with th...
void init(osg::Group *terrain)
void materialLibChanged()