Pioneer
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Terrain Class Referenceabstract

#include <Terrain.h>

Inheritance diagram for Terrain:
Inheritance graph
[legend]
Collaboration diagram for Terrain:
Collaboration graph
[legend]

Classes

struct  MinBodyData
 

Public Types

enum  SurfaceEffectFlags { EFFECT_LAVA = 1 << 0 , EFFECT_WATER = 2 }
 

Public Member Functions

virtual ~Terrain ()
 
void SetFracDef (const unsigned int index, const double featureHeightMeters, const double featureWidthMeters, const double smallestOctaveMeters=20.0)
 
const fracdef_tGetFracDef (const unsigned int index) const
 
virtual double GetHeight (const vector3d &p) const =0
 
virtual vector3d GetColor (const vector3d &p, double height, const vector3d &norm) const =0
 
virtual const char * GetHeightFractalName () const =0
 
virtual const char * GetColorFractalName () const =0
 
double GetMaxHeight () const
 
Uint32 GetSurfaceEffects () const
 
double BiCubicInterpolation (const vector3d &p) const
 
void DebugDump () const
 
- Public Member Functions inherited from RefCounted
 RefCounted ()
 
virtual ~RefCounted ()
 
void IncRefCount () const
 
void DecRefCount () const
 
int GetRefCount () const
 
- Public Member Functions inherited from LuaWrappable
virtual ~LuaWrappable ()
 

Static Public Member Functions

static TerrainInstanceTerrain (const SystemBody *body)
 

Protected Member Functions

 Terrain (const SystemBody *body)
 

Protected Attributes

Uint32 m_seed
 
Random m_rand
 
double m_sealevel
 
double m_icyness
 
double m_volcanic
 
Uint32 m_surfaceEffects
 
std::unique_ptr< double[]> m_heightMap
 
double m_heightScaling
 
double m_minh
 
int m_heightMapSizeX
 
int m_heightMapSizeY
 
double m_maxHeight
 
double m_maxHeightInMeters
 
double m_invMaxHeight
 
double m_planetRadius
 
double m_invPlanetRadius
 
double m_planetEarthRadii
 
double m_entropy [12]
 
vector3d m_rockColor [8]
 
vector3d m_darkrockColor [8]
 
vector3d m_greyrockColor [8]
 
vector3d m_plantColor [8]
 
vector3d m_darkplantColor [8]
 
vector3d m_sandColor [8]
 
vector3d m_darksandColor [8]
 
vector3d m_dirtColor [8]
 
vector3d m_darkdirtColor [8]
 
vector3d m_gglightColor [8]
 
vector3d m_ggdarkColor [8]
 
fracdef_t m_fracdef [MAX_FRACDEFS]
 
MinBodyData m_minBody
 

Static Protected Attributes

static const Uint32 MAX_FRACDEFS = 10
 

Member Enumeration Documentation

◆ SurfaceEffectFlags

Enumerator
EFFECT_LAVA 
EFFECT_WATER 

Constructor & Destructor Documentation

◆ ~Terrain()

Terrain::~Terrain ( )
virtual

◆ Terrain()

Terrain::Terrain ( const SystemBody body)
protected
Here is the call graph for this function:

Member Function Documentation

◆ BiCubicInterpolation()

double Terrain::BiCubicInterpolation ( const vector3d p) const
Here is the call graph for this function:

◆ DebugDump()

void Terrain::DebugDump ( ) const
Here is the call graph for this function:

◆ GetColor()

virtual vector3d Terrain::GetColor ( const vector3d p,
double  height,
const vector3d norm 
) const
pure virtual

◆ GetColorFractalName()

virtual const char * Terrain::GetColorFractalName ( ) const
pure virtual

◆ GetFracDef()

const fracdef_t & Terrain::GetFracDef ( const unsigned int  index) const
inline

◆ GetHeight()

virtual double Terrain::GetHeight ( const vector3d p) const
pure virtual

◆ GetHeightFractalName()

virtual const char * Terrain::GetHeightFractalName ( ) const
pure virtual

◆ GetMaxHeight()

double Terrain::GetMaxHeight ( ) const
inline

◆ GetSurfaceEffects()

Uint32 Terrain::GetSurfaceEffects ( ) const
inline

◆ InstanceTerrain()

Terrain * Terrain::InstanceTerrain ( const SystemBody body)
static
Here is the call graph for this function:

◆ SetFracDef()

void Terrain::SetFracDef ( const unsigned int  index,
const double  featureHeightMeters,
const double  featureWidthMeters,
const double  smallestOctaveMeters = 20.0 
)

Feature width means roughly one perlin noise blob or grain. This will end up being one hill, mountain or continent, roughly.

Member Data Documentation

◆ m_darkdirtColor

vector3d Terrain::m_darkdirtColor[8]
protected

◆ m_darkplantColor

vector3d Terrain::m_darkplantColor[8]
protected

◆ m_darkrockColor

vector3d Terrain::m_darkrockColor[8]
protected

◆ m_darksandColor

vector3d Terrain::m_darksandColor[8]
protected

◆ m_dirtColor

vector3d Terrain::m_dirtColor[8]
protected

◆ m_entropy

double Terrain::m_entropy[12]
protected

◆ m_fracdef

fracdef_t Terrain::m_fracdef[MAX_FRACDEFS]
protected

◆ m_ggdarkColor

vector3d Terrain::m_ggdarkColor[8]
protected

◆ m_gglightColor

vector3d Terrain::m_gglightColor[8]
protected

◆ m_greyrockColor

vector3d Terrain::m_greyrockColor[8]
protected

◆ m_heightMap

std::unique_ptr<double[]> Terrain::m_heightMap
protected

◆ m_heightMapSizeX

int Terrain::m_heightMapSizeX
protected

◆ m_heightMapSizeY

int Terrain::m_heightMapSizeY
protected

◆ m_heightScaling

double Terrain::m_heightScaling
protected

◆ m_icyness

double Terrain::m_icyness
protected

◆ m_invMaxHeight

double Terrain::m_invMaxHeight
protected

◆ m_invPlanetRadius

double Terrain::m_invPlanetRadius
protected

◆ m_maxHeight

double Terrain::m_maxHeight
protected

General attributes

◆ m_maxHeightInMeters

double Terrain::m_maxHeightInMeters
protected

◆ m_minBody

MinBodyData Terrain::m_minBody
protected

◆ m_minh

double Terrain::m_minh
protected

◆ m_planetEarthRadii

double Terrain::m_planetEarthRadii
protected

◆ m_planetRadius

double Terrain::m_planetRadius
protected

◆ m_plantColor

vector3d Terrain::m_plantColor[8]
protected

◆ m_rand

Random Terrain::m_rand
protected

◆ m_rockColor

vector3d Terrain::m_rockColor[8]
protected

◆ m_sandColor

vector3d Terrain::m_sandColor[8]
protected

◆ m_sealevel

double Terrain::m_sealevel
protected

◆ m_seed

Uint32 Terrain::m_seed
protected

◆ m_surfaceEffects

Uint32 Terrain::m_surfaceEffects
protected

◆ m_volcanic

double Terrain::m_volcanic
protected

◆ MAX_FRACDEFS

const Uint32 Terrain::MAX_FRACDEFS = 10
staticprotected

The documentation for this class was generated from the following files: