00001
00002
00003 #ifndef __FRACTAL_MOUNT_H
00004 #define __FRACTAL_MOUNT_H
00005
00006 #include <esg/Definitions.h>
00007 #include <gra/scene/Scene.h>
00008 #include <esg/spacesorting/SDS.h>
00009
00010 namespace gra {
00011
00020 class GRA_EXPORT FractalMount : public Scene {
00021 protected:
00022 unsigned _factor;
00023 double _roughness;
00024 unsigned _mountainNo;
00025 double _xCorner;
00026 double _yCorner;
00027 double _width;
00028
00029 protected:
00030 void _create_lights (void);
00031 AutoPtr<Material>** _create_crystal_materials (unsigned&);
00032 AutoPtr<Material>** _create_mount_materials (unsigned&);
00033 void _create_spheres (const Vector4&, AutoPtr<Material>**, unsigned);
00034 void _grow_mountain (double, int, int, int, double, double, double,
00035 double, AutoPtr<Material>**, unsigned);
00036
00037 public:
00063 FractalMount (const SDS& proto,
00064 unsigned factor,
00065 unsigned mn = 21,
00066 double xc = -0.4,
00067 double yc = -0.4,
00068 double w = 0.8);
00069 };
00070
00071 }
00072
00073 #endif // __FRACTAL_MOUNT_H