117 SG_LOG( SG_TERRAIN, SG_DEBUG,
"removing a not-fully loaded tile!" );
119 SG_LOG( SG_TERRAIN, SG_DEBUG,
"removing a fully loaded tile! _node = " <<
_node.get() );
123 if ((
_node->getNumChildren() > 0) &&
124 (
_node->getChild(0)->getName() ==
"Ocean") &&
125 (
_node->getNumParents() > 0 ) ) {
127 osg::Group *parent =
_node->getParent( 0 ) ;
130 parent->removeChild(
_node.get() );
151 std::string zipFileName =
"vpb/" + b.gen_base_path() +
".zip";
154 auto filePathList =
options->getDatabasePathList();
155 for (
auto path : filePathList) {
162 SGPath archive(path, zipFileName);
163 if (archive.exists()) {
177 _node->setRange(0, 0.0, 160000.0);
180 double lat = floor(b.get_center_lat()) + 0.5;
181 double lon = floor(b.get_center_lon()) + 0.5;
182 SG_LOG( SG_TERRAIN, SG_DEBUG,
"Generating Ocean Tile for " << lat <<
", " << lon);
187 osg::Node* oceanTile = SGOceanTile(lat, lon, 1.0, 1.0,
options->getMaterialLib(), 15, 15);
188 _node->addChild(oceanTile, 0, 250000.0);
STGTileEntry(const SGBucket &b)
void prep_ssg_node(float vis)
void addToSceneGraph(osg::Group *terrain_branch)
Add terrain mesh and ground lighting to scene graph.
bool is_loaded() const
Return true if the tile entry is loaded, otherwise return false indicating that the loading thread is...
void removeFromSceneGraph()
disconnect terrain mesh and ground lighting nodes from scene graph for this tile.
TileEntry(const SGBucket &b)
osg::ref_ptr< osg::LOD > _node
VPBTileEntry(const SGBucket &b, osg::ref_ptr< simgear::SGReaderWriterOptions > options)