Mercator
|
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. | |
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. |
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.
Mercator::BasePoint::BasePoint | ( | float | h = HEIGHT , |
float | r = ROUGHNESS , |
||
float | f = FALLOFF |
||
) | [inline, explicit] |
Constructor.
h | height at the base point. |
r | roughness at the base point. |
f | falloff at the base point. |