Terrain: remove debug code

openmw-37
scrawl 9 years ago
parent ef18f4217f
commit 7ca8e45d5d

@ -1,7 +1,6 @@
#include "storage.hpp"
#include <set>
#include <iostream>
#include <osg/Image>
#include <osg/Plane>
@ -343,13 +342,6 @@ namespace ESMTerrain
// So we're always adding _land_default.dds as the base layer here, even if it's not referenced in this cell.
textureIndices.insert(std::make_pair(0,0));
/*
_________
| | | | - | | | | -
| | | | - | | | | -
*/
for (int y=colStart; y<colEnd; ++y)
for (int x=rowStart; x<rowEnd; ++x)
{

@ -1,7 +1,6 @@
#include "buffercache.hpp"
#include <cassert>
#include <iostream>
#include <osg/PrimitiveSet>
@ -209,8 +208,6 @@ namespace Terrain
{
unsigned int verts = mNumVerts;
std::cout << "getting index buffer for " << verts << std::endl;
if (mIndexBufferMap.find(flags) != mIndexBufferMap.end())
{
return mIndexBufferMap[flags];

@ -1,8 +1,6 @@
#include "terraingrid.hpp"
#include <memory>
#include <osg/io_utils>
#include <iostream>
#include <components/resource/resourcesystem.hpp>
#include <components/resource/texturemanager.hpp>
@ -77,7 +75,7 @@ osg::ref_ptr<osg::Node> TerrainGrid::buildTerrain (osg::Group* parent, float chu
osg::ref_ptr<osg::Group> group (new osg::Group);
if (parent)
parent->addChild(group);
std::cout << "splitting " << chunkSize << " " << std::endl;
float newChunkSize = chunkSize/2.f;
buildTerrain(group, newChunkSize, chunkCenter + osg::Vec2f(newChunkSize/2.f, newChunkSize/2.f));
buildTerrain(group, newChunkSize, chunkCenter + osg::Vec2f(newChunkSize/2.f, -newChunkSize/2.f));
@ -91,8 +89,6 @@ osg::ref_ptr<osg::Node> TerrainGrid::buildTerrain (osg::Group* parent, float chu
if (!mStorage->getMinMaxHeights(chunkSize, chunkCenter, minH, maxH))
return NULL; // no terrain defined
std::cout << "creating " << chunkSize << " " << chunkCenter << std::endl;
osg::Vec2f worldCenter = chunkCenter*mStorage->getCellWorldSize();
osg::ref_ptr<osg::PositionAttitudeTransform> transform (new osg::PositionAttitudeTransform);
transform->setPosition(osg::Vec3f(worldCenter.x(), worldCenter.y(), 0.f));
@ -194,6 +190,7 @@ void TerrainGrid::loadCell(int x, int y)
element->mNode = terrainNode;
mTerrainRoot->addChild(element->mNode);
// kdtree probably not needed with mNumSplits=4
/*
// build a kdtree to speed up intersection tests with the terrain
// Note, the build could be optimized using a custom kdtree builder, since we know that the terrain can be represented by a quadtree

Loading…
Cancel
Save