From Don Tidrow, Added support for locally referenced origins.

This commit is contained in:
Robert Osfield
2005-09-27 14:48:09 +00:00
parent 600349dce8
commit 2092016c7b
6 changed files with 140 additions and 67 deletions

View File

@@ -49,6 +49,18 @@ TXPArchive::~TXPArchive()
}
void TXPArchive::getExtents(osg::BoundingBox& extents)
{
TileInfo sw, ne;
trpg2iPoint tileExtents;
this->GetHeader()->GetLodSize(0, tileExtents);
this->getTileInfo(0, 0, 0, sw);
this->getTileInfo(tileExtents.x-1, tileExtents.y-1, 0, ne);
extents.set(sw.bbox._min, sw.bbox._max);
extents.expandBy(ne.bbox);
}
bool TXPArchive::openFile(const std::string& archiveName)
{