// This file may be redistributed and modified only under the terms of // the GNU General Public License (See COPYING for details). // Copyright (C) 2003 Alistair Riddoch #include #include #include #include int main() { Mercator::Terrain terrain(Mercator::Terrain::SHADED); const WFMath::Ball<2> circ2(WFMath::Point<2>(0.0,0.0), 12.0); Mercator::LevelTerrainMod > mod2(10.0f, circ2); terrain.addMod(mod2); const WFMath::RotBox<2> rot(WFMath::Point<2>(-80.,-130.) , WFMath::Vector<2>(150.0,120.0), WFMath::RotMatrix<2>().rotation(WFMath::Pi/4)); Mercator::LevelTerrainMod > mod3(10.0f, rot); terrain.addMod(mod3); terrain.setBasePoint(0, 0, 2.8); terrain.setBasePoint(1, 0, 7.1); terrain.setBasePoint(0, 1, 0.2); terrain.setBasePoint(1, 1, 14.7); Mercator::Segment * segment = terrain.getSegment(0, 0); if (segment == 0) { std::cerr << "Segment not created by addition of required basepoints" << std::endl << std::flush; return 1; } return 0; }