heightmap Class Reference

#include <heightmap.hpp>

Collaboration diagram for heightmap:

Collaboration graph
[legend]

List of all members.


Detailed Description

Definition at line 47 of file platform/heightmap.hpp.


Public Types

enum  { WRAP_S = 1 << 0, WRAP_T = 1 << 1 }
 Flags for controlling wrapping. More...
enum  interpolate_mode { INTERPOLATE_BILINEAR = 1, INTERPOLATE_BICUBIC = 2 }
 Tells the interpolation function what method to use. More...

Public Member Functions

const gsgl::index_tget_height () const
const gsgl::index_tget_width () const
 heightmap (const gsgl::index_t &width, const gsgl::index_t &height, gsgl::real_t *data=0)
gsgl::real_t interpolate (const gsgl::real_t &s, const gsgl::real_t &t, const interpolate_mode mode=INTERPOLATE_BILINEAR, const gsgl::flags_t flags=WRAP_S|WRAP_T)
virtual ~heightmap ()

Private Attributes

gsgl::real_tdata
const gsgl::index_t height
bool own_pointer
const gsgl::index_t width

Member Enumeration Documentation

anonymous enum

Flags for controlling wrapping.

Enumerator:
WRAP_S 
WRAP_T 

Definition at line 65 of file platform/heightmap.hpp.

Tells the interpolation function what method to use.

Enumerator:
INTERPOLATE_BILINEAR 
INTERPOLATE_BICUBIC 

Definition at line 62 of file platform/heightmap.hpp.


Constructor & Destructor Documentation

heightmap ( const gsgl::index_t width,
const gsgl::index_t height,
gsgl::real_t data = 0 
)

Definition at line 46 of file platform/heightmap.cpp.

~heightmap (  )  [virtual]

Definition at line 54 of file platform/heightmap.cpp.

References heightmap::data, and heightmap::own_pointer.


Member Function Documentation

const gsgl::index_t& get_height (  )  const [inline]

Definition at line 59 of file platform/heightmap.hpp.

const gsgl::index_t& get_width (  )  const [inline]

Definition at line 58 of file platform/heightmap.hpp.

gsgl::real_t interpolate ( const gsgl::real_t s,
const gsgl::real_t t,
const interpolate_mode  mode = INTERPOLATE_BILINEAR,
const gsgl::flags_t  flags = WRAP_S | WRAP_T 
)


Member Data Documentation

gsgl::real_t* data [private]

Definition at line 51 of file platform/heightmap.hpp.

Referenced by heightmap::interpolate(), and heightmap::~heightmap().

const gsgl::index_t height [private]

Definition at line 50 of file platform/heightmap.hpp.

Referenced by heightmap::interpolate().

bool own_pointer [private]

Definition at line 52 of file platform/heightmap.hpp.

Referenced by heightmap::~heightmap().

const gsgl::index_t width [private]

Definition at line 49 of file platform/heightmap.hpp.

Referenced by heightmap::interpolate().


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

Generated on Sat Mar 1 13:50:07 2008 for Periapsis Project by  doxygen 1.5.5