Mercator
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
Mercator::BasePoint Class Reference

Point on the fundamental grid that is used as the basis for terrain. More...

#include <BasePoint.h>

Public Member Functions

 BasePoint (float h=HEIGHT, float r=ROUGHNESS, float f=FALLOFF)
 Constructor. More...
 
const float height () const
 Accessor for the height at the base point.
 
float & height ()
 Accessor for the height at the base point.
 
const float roughness () const
 Accessor for the roughness at the base point.
 
float & roughness ()
 Accessor for the roughness at the base point.
 
const float falloff () const
 Accessor for the falloff at the base point.
 
float & falloff ()
 Accessor for the falloff at the base point.
 
unsigned int seed () const
 Calculate the random seed used at this base point.
 

Static Public Attributes

static const float HEIGHT = 8.0
 Default height at the base point.
 
static const float ROUGHNESS = 1.25
 Default roughness at the base point.
 
static const float FALLOFF = 0.25
 Default falloff at the base point.
 

Private Attributes

float m_height
 The height at the base point.
 
float m_roughness
 The roughness at the base point.
 
float m_falloff
 The falloff at the base point.
 

Detailed Description

Point on the fundamental grid that is used as the basis for terrain.

The terrain is defined by a sparse grid of evenly spaced points, each of which is defined by an instance of this class. The most fundamental property of each point is its elevation stored as height, as this is also used to seed the random number generators. Additional parameters for roughness and falloff are often specified.

Constructor & Destructor Documentation

Mercator::BasePoint::BasePoint ( float  h = HEIGHT,
float  r = ROUGHNESS,
float  f = FALLOFF 
)
inlineexplicit

Constructor.

Parameters
hheight at the base point.
rroughness at the base point.
ffalloff at the base point.

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