|
mercator
0.4.0
A terrain generation library for the Worldforge system.
|
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 |
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.
|
inline |
Constructor.
| size | length of one side of the square quad. |
| e1 | value at one corner of the square quad. |
| e2 | value at one corner of the square quad. |
| e3 | value at one corner of the square quad. |
| e4 | value at one corner of the square quad. |
Definition at line 91 of file HeightMap.cpp.
References ep1.
|
inline |
Determine the interpolated value within the quad.
Definition at line 78 of file HeightMap.cpp.
References ep1.
Referenced by Mercator::HeightMap::fill2d().
| float Mercator::QuadInterp::ep1 |
Values at the four corners.
Definition at line 76 of file HeightMap.cpp.
Referenced by calc(), and QuadInterp().