1 
2 // This file may be redistributed and modified only under the terms of
3 // the GNU General Public License (See COPYING for details).
4 // Copyright (C) 2009 Alistair Riddoch
5 
6 #include <Mercator/Segment.h>
7 
8 #include <wfmath/point.h>
9 #include <wfmath/axisbox.h>
10 
11 #include <cstdlib>
12 
main(int argc,char ** argv)13 int main(int argc, char ** argv)
14 {
15     int iterations = 1;
16 
17     if (argc > 1) {
18         iterations = strtol(argv[1], 0, 10);
19     }
20 
21     Mercator::Segment s(0,0,64);
22 
23     Mercator::Matrix<2,2,Mercator::BasePoint> & points = s.getControlPoints();
24     points(0, 0).roughness() = 1.85;
25     points(1, 0).roughness() = 1.75;
26     points(0, 1).roughness() = 1.65;
27     points(1, 1).roughness() = 1.95;
28 
29     for (int i = 0; i < iterations; ++i) {
30 
31         s.populate();
32 
33     }
34 
35     return 0;
36 }
37 
38 // stubs
39 
40 #include <Mercator/Shader.h>
41 #include <Mercator/Surface.h>
42 
43 namespace Mercator {
44 
45 const float BasePoint::HEIGHT = 8.0;
46 const float BasePoint::ROUGHNESS = 1.25;
47 const float BasePoint::FALLOFF = 0.25;
48 
populate()49 void Surface::populate()
50 {
51 }
52 
newSurface(const Segment & segment) const53 Surface * Shader::newSurface(const Segment & segment) const
54 {
55     return 0;
56 }
57 
58 }
59