#include <heightmap.hpp>
Definition at line 49 of file scenegraph/heightmap.hpp.
Public Member Functions | |
double | get_altitude () const |
void | get_data (const double s, const double t, double &hval, double &alpha) |
Returns the normalized (0-1) height value at the given coordinates. | |
unsigned int | get_height () const |
unsigned int | get_width () const |
heightmap (const gsgl::string &fname, double alt) | |
~heightmap () | |
Private Member Functions | |
void | init (const gsgl::string &fname) |
Private Attributes | |
double | altitude |
unsigned int | height |
SDL_Surface * | surface |
unsigned int | width |
heightmap | ( | const gsgl::string & | fname, | |
double | alt | |||
) |
~heightmap | ( | ) |
double get_altitude | ( | ) | const [inline] |
Definition at line 63 of file scenegraph/heightmap.hpp.
void get_data | ( | const double | s, | |
const double | t, | |||
double & | hval, | |||
double & | alpha | |||
) |
Returns the normalized (0-1) height value at the given coordinates.
Definition at line 107 of file scenegraph/heightmap.cpp.
References heightmap::height, heightmap::surface, and heightmap::width.
unsigned int get_height | ( | ) | const [inline] |
Definition at line 62 of file scenegraph/heightmap.hpp.
unsigned int get_width | ( | ) | const [inline] |
Definition at line 61 of file scenegraph/heightmap.hpp.
void init | ( | const gsgl::string & | fname | ) | [private] |
Definition at line 90 of file scenegraph/heightmap.cpp.
References string::c_string(), file::exists(), heightmap::height, heightmap::surface, string::w_string(), and heightmap::width.
Referenced by heightmap::heightmap().
double altitude [private] |
Definition at line 53 of file scenegraph/heightmap.hpp.
unsigned int height [private] |
Definition at line 52 of file scenegraph/heightmap.hpp.
Referenced by heightmap::get_data(), and heightmap::init().
SDL_Surface* surface [private] |
Definition at line 55 of file scenegraph/heightmap.hpp.
Referenced by heightmap::get_data(), heightmap::init(), and heightmap::~heightmap().
unsigned int width [private] |
Definition at line 52 of file scenegraph/heightmap.hpp.
Referenced by heightmap::get_data(), and heightmap::init().