Panda3D
|
Public Member Functions | |
ValueType | calc_bilinear_interpolation (PN_stdfloat u, PN_stdfloat v) const |
Interpolates the value at (u, v) between its four nearest neighbors. | |
ValueType | calc_smooth (PN_stdfloat u, PN_stdfloat v, PN_stdfloat radius) const |
Approximates the average value at (u, v) over the indicated radius, assuming a polynomial curve. | |
ValueType | get_nearest_neighbor (PN_stdfloat u, PN_stdfloat v) const |
Returns the value nearest to (u, v) in the data. | |
bool | is_present () const |
Returns true if the data is present--that is, reset() was called with non-zero values--or false otherwise. | |
void | reset (int width, int height) |
Resets the array to an empty array of width x height cells. | |
Public Attributes | |
pvector< ValueType > | _data |
int | _height |
int | _width |
Definition at line 70 of file stBasicTerrain.h.
ValueType STBasicTerrain::InterpolationData< ValueType >::calc_bilinear_interpolation | ( | PN_stdfloat | u, |
PN_stdfloat | v | ||
) | const |
Interpolates the value at (u, v) between its four nearest neighbors.
Definition at line 114 of file stBasicTerrain.I.
Referenced by STBasicTerrain::get_height(), and STBasicTerrain::get_slope().
ValueType STBasicTerrain::InterpolationData< ValueType >::calc_smooth | ( | PN_stdfloat | u, |
PN_stdfloat | v, | ||
PN_stdfloat | radius | ||
) | const |
Approximates the average value at (u, v) over the indicated radius, assuming a polynomial curve.
Definition at line 150 of file stBasicTerrain.I.
Referenced by STBasicTerrain::get_smooth_height().
ValueType STBasicTerrain::InterpolationData< ValueType >::get_nearest_neighbor | ( | PN_stdfloat | u, |
PN_stdfloat | v | ||
) | const |
Returns the value nearest to (u, v) in the data.
Definition at line 98 of file stBasicTerrain.I.
bool STBasicTerrain::InterpolationData< ValueType >::is_present | ( | ) | const |
Returns true if the data is present--that is, reset() was called with non-zero values--or false otherwise.
Definition at line 191 of file stBasicTerrain.I.
void STBasicTerrain::InterpolationData< ValueType >::reset | ( | int | width, |
int | height | ||
) |
Resets the array to an empty array of width x height cells.
Definition at line 84 of file stBasicTerrain.I.
Referenced by STBasicTerrain::compute_slope(), and STBasicTerrain::read_height_map().