#ifndef MYLANDSCAPE_HXX
#define MYLANDSCAPE_HXX

#include "../../Shared/Fractals/fractal.h"
#include "MyBumpMap.hxx"


/**
   Describes the landscape that is used for the Rendering Competition.
*/
class MyLandscape : public AbstractLandscape
{
 public:
    MyLandscape() {

	// quality / speed
	speedup = 0.25;
	skipFactor = 2;
	skipRatio = 0.5;
    
	// size
	maxX = 400;
	maxY = 300;
	domain = Vec3f(1,1,0);
	stretch = Vec3f(1.2,1.2,30);

	// camera
	cameraFrom = Vec3f((int)(maxX * stretch.x / 2),-47,100);
	cameraAt = Vec3f((int)(maxX * stretch.x / 2),0,90);
	cameraUp = Vec3f(0,0,1);
	resolution = Vec3f(1280,1024,0);
	//resolution = Vec3f(320,256,0);
	
	// sun
	sunDirection = Vec3f(-20,10,-10);
	
	// background
	bgColor = Vec3f(0.41,0.74,0.8);
    
	// earth
	kd_earth = 1;
	ks_earth = 0;
	colorMap = new ColorMap("SceneSpecific/colormap.txt");
	
	// water
	kd_water = 1;
	ks_water = 0.5;
	sealevel = 37;
	bumpMap = new MyBumpMap();

	
	Init_Noise(); // needed by the fractal functions
	init();
    }

    virtual ~MyLandscape() {
	delete colorMap;
	delete bumpMap;
    }

    virtual float getHeight(Vec3f point) const {
	return HybridMultifractal(point, 0.12, 2, 8, 0.7, 1); // fractal
    }

};

#endif // MYLANDSCAPE_HXX
