Add logging for the total number of random buildings generated.
This commit is contained in:
@@ -69,6 +69,7 @@ namespace simgear
|
||||
|
||||
typedef std::map<std::string, osg::observer_ptr<osg::StateSet> > BuildingStateSetMap;
|
||||
static BuildingStateSetMap statesetmap;
|
||||
static int numBuildings;
|
||||
|
||||
void addBuildingToLeafGeode(Geode* geode, const SGBuildingBin::Building& building)
|
||||
{
|
||||
@@ -602,6 +603,8 @@ osg::Group* createRandomBuildings(SGBuildingBinList buildings, const osg::Matrix
|
||||
|
||||
BOOST_FOREACH(bin, buildings)
|
||||
{
|
||||
numBuildings = numBuildings + bin->getNumBuildings();
|
||||
SG_LOG(SG_TERRAIN, SG_DEBUG, "Total random buildings generated: " << numBuildings);
|
||||
|
||||
ref_ptr<Effect> effect;
|
||||
EffectMap::iterator iter = buildingEffectMap.find(bin->texture);
|
||||
@@ -643,11 +646,10 @@ osg::Group* createRandomBuildings(SGBuildingBinList buildings, const osg::Matrix
|
||||
BuildingTransformer(transInv));
|
||||
quadbuilding.buildQuadTree(rotatedBuildings.begin(), rotatedBuildings.end());
|
||||
|
||||
ref_ptr<Group> group = quadbuilding.getRoot();
|
||||
|
||||
ref_ptr<Group> group = quadbuilding.getRoot();
|
||||
mt->addChild(group);
|
||||
delete bin;
|
||||
}
|
||||
delete bin;
|
||||
}
|
||||
|
||||
buildings.clear();
|
||||
|
||||
|
||||
@@ -726,13 +726,15 @@ struct SGTileGeometryBin {
|
||||
for (l = triangle_buildings.begin(); l != triangle_buildings.end(); ++l) {
|
||||
bin->insert(*l);
|
||||
}
|
||||
|
||||
triangle_buildings.clear();
|
||||
}
|
||||
|
||||
SG_LOG(SG_INPUT, SG_DEBUG, "Random Buildings: " << bin->getNumBuildings());
|
||||
SG_LOG(SG_INPUT, SG_DEBUG, " Dropped due to mask: " << mask_dropped);
|
||||
SG_LOG(SG_INPUT, SG_DEBUG, " Dropped due to triangle edge: " << triangle_dropped);
|
||||
SG_LOG(SG_INPUT, SG_DEBUG, " Dropped due to random object: " << random_dropped);
|
||||
SG_LOG(SG_INPUT, SG_DEBUG, " Dropped due to other building: " << building_dropped);
|
||||
SG_LOG(SG_TERRAIN, SG_DEBUG, "Random Buildings: " << bin->getNumBuildings());
|
||||
SG_LOG(SG_TERRAIN, SG_DEBUG, " Dropped due to mask: " << mask_dropped);
|
||||
SG_LOG(SG_TERRAIN, SG_DEBUG, " Dropped due to triangle edge: " << triangle_dropped);
|
||||
SG_LOG(SG_TERRAIN, SG_DEBUG, " Dropped due to random object: " << random_dropped);
|
||||
SG_LOG(SG_TERRAIN, SG_DEBUG, " Dropped due to other building: " << building_dropped);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user