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

Helper to interpolate in a quad. More...

Public Member Functions

float calc (float locX, float locY)
 Determine the interpolated value within the quad. More...
 
 QuadInterp (float size, float e1, float e2, float e3, float e4)
 Constructor. More...
 

Public Attributes

float ep1
 Values at the four corners. More...
 
float ep2
 
float ep3
 
float ep4
 

Detailed Description

Helper to interpolate in a quad.

The quad specified is assumed to be square of integer size, and the position specified for interpolation is specified in integer form. A check is included to avoid calculation if the value of each corner is the same.

Definition at line 68 of file HeightMap.cpp.

Constructor & Destructor Documentation

Mercator::QuadInterp::QuadInterp ( float  size,
float  e1,
float  e2,
float  e3,
float  e4 
)
inline

Constructor.

Parameters
sizelength of one side of the square quad.
e1value at one corner of the square quad.
e2value at one corner of the square quad.
e3value at one corner of the square quad.
e4value at one corner of the square quad.

Definition at line 91 of file HeightMap.cpp.

Member Function Documentation

float Mercator::QuadInterp::calc ( float  locX,
float  locY 
)
inline

Determine the interpolated value within the quad.

Definition at line 78 of file HeightMap.cpp.

Referenced by Mercator::HeightMap::fill2d().

Member Data Documentation

float Mercator::QuadInterp::ep1

Values at the four corners.

Definition at line 76 of file HeightMap.cpp.


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