#include <iostream>
#include <fstream>
#include <math.h>
#include "common/wave_ex.h"
#include "datahash/datahash_text.h"
#include "datahash/datahash_util.h"
#include "geometry/geometry_2d.h"
#include "geometry/geometry_3d.h"
#include "geometry/xform_2d.h"
#include "perf/perf.h"
#include "pgmppm/pgmppm.h"
#include "util/date.h"
#include "util/file.h"
Go to the source code of this file.
Typedefs | |
typedef std::vector< point3d_t > | vec_points_t |
typedef point2d_t< float > | point_t |
typedef rect2d_t< float > | rect_t |
Functions | |
static float | randX (IN float max) throw () |
static float | randMid (IN float min, IN float max) throw () |
static void | parsePoints (IN hdata_t *hdata, IN const Datahash *input, IN const char *name, IN float yMax, OUT vec_points_t &vec) |
static void | overlayPoints (IN hdata_t *hdata, IN vec_points_t &vec) |
static void | calculateYScale (IN hdata_t *hdata) |
static void | generateFlat (IN hdata_t *hdata, IN const Datahash *algo) |
static void | iterateFractal (IN hdata_t *hdata, IN int dx, IN float dy) |
static void | generateFractal (IN hdata_t *hdata, IN const Datahash *algo) |
static void | getTransform (IN float X, IN float Z, OUT xform_2d_t &T) |
static void | addSplit (IN hdata_t *hdata, IN const xform_2d_t &T, IN float dy) throw () |
static void | generateSplit (IN hdata_t *hdata, IN const Datahash *algo) |
static smart_ptr< hdata_t > | createHeightfield (IN Datahash *input) |
static smart_ptr< hdata_t > | createHeightfield (IN const char *inputFile) |
static int | writePgmPixel (IN void *context, IN int x, IN int z) |
static void | writeHeightfield (IN const hdata_t *hdata, IN const char *outputName) |
int | main (IN int argc, IN const char *argv[]) |
Variables | |
static const int | s_minGrid = 2 |
static const char * | s_hfieldVersion = "0.1" |
static const int | s_yIntExtent = 255 |
typedef std::vector<point3d_t> vec_points_t |
Definition at line 59 of file terrain/terraHeightGen/main.cpp.
typedef point2d_t<float> point_t |
Definition at line 61 of file terrain/terraHeightGen/main.cpp.
typedef rect2d_t<float> rect_t |
Definition at line 62 of file terrain/terraHeightGen/main.cpp.
static float randX | ( | IN float | max | ) | throw () [static] |
Definition at line 168 of file terrain/terraHeightGen/main.cpp.
static float randMid | ( | IN float | min, | |
IN float | max | |||
) | throw () [static] |
Definition at line 182 of file terrain/terraHeightGen/main.cpp.
static void parsePoints | ( | IN hdata_t * | hdata, | |
IN const Datahash * | input, | |||
IN const char * | name, | |||
IN float | yMax, | |||
OUT vec_points_t & | vec | |||
) | [static] |
Definition at line 199 of file terrain/terraHeightGen/main.cpp.
static void overlayPoints | ( | IN hdata_t * | hdata, | |
IN vec_points_t & | vec | |||
) | [static] |
Definition at line 250 of file terrain/terraHeightGen/main.cpp.
static void calculateYScale | ( | IN hdata_t * | hdata | ) | [static] |
Definition at line 272 of file terrain/terraHeightGen/main.cpp.
static void generateFlat | ( | IN hdata_t * | hdata, | |
IN const Datahash * | algo | |||
) | [static] |
Definition at line 308 of file terrain/terraHeightGen/main.cpp.
static void iterateFractal | ( | IN hdata_t * | hdata, | |
IN int | dx, | |||
IN float | dy | |||
) | [static] |
Definition at line 334 of file terrain/terraHeightGen/main.cpp.
static void generateFractal | ( | IN hdata_t * | hdata, | |
IN const Datahash * | algo | |||
) | [static] |
Definition at line 392 of file terrain/terraHeightGen/main.cpp.
static void getTransform | ( | IN float | X, | |
IN float | Z, | |||
OUT xform_2d_t & | T | |||
) | [static] |
Definition at line 437 of file terrain/terraHeightGen/main.cpp.
static void addSplit | ( | IN hdata_t * | hdata, | |
IN const xform_2d_t & | T, | |||
IN float | dy | |||
) | throw () [static] |
Definition at line 465 of file terrain/terraHeightGen/main.cpp.
static void generateSplit | ( | IN hdata_t * | hdata, | |
IN const Datahash * | algo | |||
) | [static] |
Definition at line 502 of file terrain/terraHeightGen/main.cpp.
static smart_ptr<hdata_t> createHeightfield | ( | IN Datahash * | input | ) | [static] |
Definition at line 538 of file terrain/terraHeightGen/main.cpp.
static smart_ptr<hdata_t> createHeightfield | ( | IN const char * | inputFile | ) | [static] |
Definition at line 605 of file terrain/terraHeightGen/main.cpp.
static int writePgmPixel | ( | IN void * | context, | |
IN int | x, | |||
IN int | z | |||
) | [static] |
Definition at line 630 of file terrain/terraHeightGen/main.cpp.
static void writeHeightfield | ( | IN const hdata_t * | hdata, | |
IN const char * | outputName | |||
) | [static] |
Definition at line 653 of file terrain/terraHeightGen/main.cpp.
int main | ( | IN int | argc, | |
IN const char * | argv[] | |||
) |
Definition at line 713 of file terrain/terraHeightGen/main.cpp.
const int s_minGrid = 2 [static] |
Definition at line 51 of file terrain/terraHeightGen/main.cpp.
const char* s_hfieldVersion = "0.1" [static] |
Definition at line 53 of file terrain/terraHeightGen/main.cpp.
const int s_yIntExtent = 255 [static] |
Definition at line 55 of file terrain/terraHeightGen/main.cpp.