In file /home/blah/darwin2k/src/d2k/terrain/terrain.h:

class terrainGenerator

creates mpolys for various types of terrain.

Inheritance:


Public Fields

[more]int mode
mode for creating terrain; see terrainMode enumerated type
[more]int nx
number cells in the x direction
[more]int ny
number cells in the y direction
[more]triple origin
map origin
[more]double xs
x cellsize
[more]double ys
y cellsize
[more]double rz
orientation (rotation about z)

Public Methods

[more]mpoly* generateFlatTerrain(double h)
generates a flat terrain with the given height
[more]mpoly* generateSinusoidalTerrain(double xWavelen, double xAmp, double xPhase, double yWavelen, double yAmp, double yPhase, int funcMode)
generates sinusoidal terrain from the given parameters
[more]mpoly* generateRandomTerrain(int nsamp, double exponent, double max)
generates (bad) random terrain
[more]mpoly* generateRock(int isEllipsoidal, const triple &dim, const triple &center, int detailLevel = 2, int randomOrientation = 0)
generates an mpoly representing a rock
[more]ptrList* createRocksFromDistribution(double coverage, double a2, double d2, double dmin = 0.1, double dmax = 1.5, long seed = -1)
creates rocks of varying size based on a stochastic model
[more]ptrList* createRocksFromDistribution(rockDistribution dist, double dmin = 0.1, double dmax = 1.5, long seed = -1)
creates rocks of varying size from one of several predefined distributions
[more]inline triple toWorld(const triple &xmap)
converts from map to world coordinates

Public Members

[more]enum terrainMode
List of modes for terrain generation.
[more]enum rockDistribution
List of predefined distributions based on Mars data.


Inherited from d2kComponent:

Public Fields

od2kSimulator* sim
oconfiguration* cfg
oconst char* label
oint active

Public Methods

ovirtual int minCfgs(void) const
ovirtual int maxCfgs(void) const
ovirtual const char* getCfgName(int i)
ovirtual int readParams(paramParser* parser)
ovirtual int setVariables(const ptrList* taskParamRecs)
ovirtual int simInit(d2kSimulator* Sim)
ovirtual int init(ptrList* Cfgs)
ovirtual int forceCfgResolution(void)
ovirtual int cleanup(void)
ovirtual int update(int &violated)
ovirtual const cfgLabelRecord* getLabelRec(int i) const


Inherited from synObject:

Public Fields

ostatic int staticClassID
oint objectID
oint verboseLevel

Public Methods

ovirtual const char* className(void) const
ovirtual synObject* copy(void) const
ovirtual int isOfType(int typeNum, int derivedOk)
ostatic int setStaticClassID(void)
ovirtual int classID(void) const


Documentation

creates mpolys for various types of terrain. The most useful methods are generateRock() and createRocksFromDistribution().
oenum terrainMode
List of modes for terrain generation.

oenum rockDistribution
List of predefined distributions based on Mars data.

oint mode
mode for creating terrain; see terrainMode enumerated type

oint nx
number cells in the x direction

oint ny
number cells in the y direction

otriple origin
map origin

odouble xs
x cellsize

odouble ys
y cellsize

odouble rz
orientation (rotation about z)

ompoly* generateFlatTerrain(double h)
generates a flat terrain with the given height

ompoly* generateSinusoidalTerrain(double xWavelen, double xAmp, double xPhase, double yWavelen, double yAmp, double yPhase, int funcMode)
generates sinusoidal terrain from the given parameters

ompoly* generateRandomTerrain(int nsamp, double exponent, double max)
generates (bad) random terrain

ompoly* generateRock(int isEllipsoidal, const triple &dim, const triple &center, int detailLevel = 2, int randomOrientation = 0)
generates an mpoly representing a rock

optrList* createRocksFromDistribution(double coverage, double a2, double d2, double dmin = 0.1, double dmax = 1.5, long seed = -1)
creates rocks of varying size based on a stochastic model

optrList* createRocksFromDistribution(rockDistribution dist, double dmin = 0.1, double dmax = 1.5, long seed = -1)
creates rocks of varying size from one of several predefined distributions

oinline triple toWorld(const triple &xmap)
converts from map to world coordinates


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.