vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
APNature::TerrainUtility Class Reference

#include <TerrainUtility.h>

Static Public Member Functions

static void Info (const std::string &message)
 
static void Error (const std::string &message)
 
static void SetPointHeight (osg::Vec3 &point, float height)
 
static std::string LowerCase (const std::string &input)
 
static std::string UpperCase (const std::string &input)
 
static int GreatestCommonDivisor (int x, int y)
 
static float LinearMapping (float fromMin, float fromMax, float fromX, float toMin, float toMax)
 
static void ListDirectory (const std::string &dirpath, const std::string &mask, std::vector< std::string > *fileNames)
 

Member Function Documentation

void TerrainUtility::Error ( const std::string &  message)
static

Prints the given error message in a unified format.

Parameters
[in]messageMessage to be printed.
int TerrainUtility::GreatestCommonDivisor ( int  x,
int  y 
)
static

Computes the greatest common divisor - based on the well-known euclidian algorithm.

[Based] on a well-known Euclidean algorithm

Parameters
[in]xThe first number
[in]yThe second number
Returns
Greatest common divisor of the input numbers 'x' and 'y'
void TerrainUtility::Info ( const std::string &  message)
static

Prints the given informative message in a unified format.

Parameters
[in]messageMessage to be printed.
static float APNature::TerrainUtility::LinearMapping ( float  fromMin,
float  fromMax,
float  fromX,
float  toMin,
float  toMax 
)
inlinestatic

Computes the linear mapping between two real intervals.

Parameters
[in]fromMinLower boundary of the source interval.
[in]fromMaxUpper boundary of the source interval.
[in]fromXSource value, which will be linearly mapped from source to destination interval.
[in]toMinLower boundary of the destination interval.
[in]toMaxUpper boundary of the destination interval.
void TerrainUtility::ListDirectory ( const std::string &  dirpath,
const std::string &  mask,
std::vector< std::string > *  fileNames 
)
static

Returns all files from the given directory complying the given mask. [Written] by Jiri Chmelik. Copied from DynamicArt/Common/DAEnvironment.{h|cpp} until both methods are moved to vreckoUtils.

Parameters
[in]dirpathDirectory in which the search is executed.
[in]maskFileformat mask, e.g. "*.png" finds all PNG files.
[in,out]fileNamesValid pointer to vector in which all found results should be stored.
std::string TerrainUtility::LowerCase ( const std::string &  input)
static

Returns the copy of the input string in which all characters are lowercase.

Parameters
[in]inputInput string to be converted to lowercase. Original string remains unchanged.
Returns
Copy of the original string with all characters converted to lowercase.
static void APNature::TerrainUtility::SetPointHeight ( osg::Vec3 &  point,
float  height 
)
inlinestatic

Sets the Y value of the given osg::Vec3 instance to the given value.

Parameters
[in]pointPoint the Y value of which is to be changed.
[in]heightDesired Y value which is to be placed in the osg::Vec3 given instance.
std::string TerrainUtility::UpperCase ( const std::string &  input)
static

Returns the copy of the input string in which all characters are uppercase.

Parameters
[in]inputInput string to be converted to uppercase. Original string remains unchanged.
Returns
Copy of the original string with all characters converted to uppercase.

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