mercator  0.4.0
A terrain generation library for the Worldforge system.
Mercator::LinInterp Class Reference

Helper to interpolate on a line. More...

Public Member Functions

float calc (float loc)
 Determine the interpolated value along the line. More...
 
 LinInterp (float size, float l, float h)
 Constructor. More...
 

Public Attributes

float ep1
 Values at the two ends. More...
 
float ep2
 

Detailed Description

Helper to interpolate on a line.

The line specified is of integer length, and the position specified as an integer. A check is included to avoid calculation if the value at each end is the same.

Definition at line 32 of file HeightMap.cpp.

Constructor & Destructor Documentation

◆ LinInterp()

Mercator::LinInterp::LinInterp ( float  size,
float  l,
float  h 
)
inline

Constructor.

Parameters
sizelength of the line.
lvalue at one end of the line.
hvalue at one end of the line.

Definition at line 52 of file HeightMap.cpp.

Member Function Documentation

◆ calc()

float Mercator::LinInterp::calc ( float  loc)
inline

Determine the interpolated value along the line.

Definition at line 42 of file HeightMap.cpp.

Member Data Documentation

◆ ep1

float Mercator::LinInterp::ep1

Values at the two ends.

Definition at line 40 of file HeightMap.cpp.


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