port/mars-tycoon
Last change
on this file was 80a6a52, checked in by Jonathan Neufeld <support@…>, 4 years ago |
Get to a compile state for terrain procedural generation
|
-
Property mode
set to
100644
|
File size:
990 bytes
|
Rev | Line | |
---|
[80a6a52] | 1 | #ifndef __ROUGHGEOMORPH_H__
|
---|
| 2 | #define __ROUGHGEOMORPH_H__
|
---|
| 3 |
|
---|
| 4 | #include <mars_util.h>
|
---|
| 5 |
|
---|
| 6 | #include "geomorph.h"
|
---|
| 7 | #include "gmregistry.h"
|
---|
| 8 | #include "synthsession.h"
|
---|
| 9 | #include "geoworld.h"
|
---|
| 10 | #include "gwtypes.h"
|
---|
| 11 | #include "gwutil.h"
|
---|
| 12 |
|
---|
| 13 | namespace geoworld
|
---|
| 14 | {
|
---|
| 15 | class RoughGM : public HeightMapGeoMorph
|
---|
| 16 | {
|
---|
| 17 | private:
|
---|
| 18 | NoiseGenerator< float > _ngen;
|
---|
| 19 |
|
---|
| 20 | public:
|
---|
| 21 | RoughGM(const float fCoarseness, const float fBrownIterations)
|
---|
| 22 | : _ngen(fBrownIterations, fCoarseness) {}
|
---|
| 23 |
|
---|
| 24 | void init (SynthesisSession & manager, const IGeoWorldAccessor & accessor, const unsigned short nMaxWidth, const unsigned short nMaxHeight) {}
|
---|
| 25 | void doMorph (LockedGWSection & section) const;
|
---|
| 26 | };
|
---|
| 27 |
|
---|
| 28 | class RoughGTFactory : public GeoTemplateFactory, public IOpenGeoMorphFactory
|
---|
| 29 | {
|
---|
| 30 | private:
|
---|
| 31 | mars::RangeX< float >
|
---|
| 32 | _mmfCoarseness,
|
---|
| 33 | _mmfBrownIterations;
|
---|
| 34 |
|
---|
| 35 | public:
|
---|
| 36 | virtual GeoMorph * createRandomInstance () const;
|
---|
| 37 | virtual void configure (IConfigGTFactory * pFactoryConfig, const IConfigGTFactory::Settings & settings);
|
---|
| 38 | };
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | #endif |
---|
Note:
See
TracBrowser
for help on using the repository browser.