HeightMap Class Reference

#include <HeightMap.h>

Inherits HeightMapInterface.

Collaboration diagram for HeightMap:

List of all members.


Public Member Functions

 HeightMap ()
 HeightMap (HeightMap *h)
virtual ~HeightMap ()
bool setup (OSG::Real32 x0, OSG::Real32 y0, OSG::Real32 z0, OSG::Real32 xlen, OSG::Real32 ylen, int xSamples, int ySamples, bool filter=false)
bool setup (OSG::NodePtr sampleMdl, int xSamples, int ySamples, bool filter=false)
bool setup (const char *filename)
bool generateHeightMap (OSG::NodePtr model)
bool generateHeightMap (OSG::NodePtr model, int xSamples, int ySamples, int height, int zRot, bool filter=false)
void dumpHeight (const char *filename, float *minHeight=NULL, float *maxHeight=NULL)
OSG::NodePtr exportGeometry (char *filename, char *normalsArrowModelFile=NULL)
OSG::NodeCorePtr makeGeometryPtr ()
void adjustZ (float scale, float off)
bool writeToFile (const char *filename)
void writeToPPM (const char *filename, float scale, float off, bool findSelf)
void setGaussFilterCoefficients (float smoothness, float rectEps)
void getMinAndMaxHeightValues (float *minHeight=NULL, float *maxHeight=NULL)
OSG::Real32 getZ (OSG::Real32 x, OSG::Real32 y)
virtual float getHeight (float x, float z)
void getNormal (OSG::Real32 x, OSG::Real32 y, OSG::Vec3f *dst)
virtual void getNormal (float x, float z, float *vec3dst)
OSG::Quaternion getNormalRotation (OSG::Real32 x, OSG::Real32 y)

Static Public Member Functions

static OSG::Quaternion getNormalRotation (const OSG::Vec3f &normal)

Protected Member Functions

void doIntersectionTests (OSG::NodePtr model)
bool getWeightsAndIndices (OSG::Real32 x, OSG::Real32 y)

Static Protected Member Functions

static OSG::Real32 conv1D (OSG::Real32 *fun, OSG::Real32 *filterKrnl, OSG::Int32 fmax, OSG::Int32 filterMax, OSG::Int32 filterStart, OSG::Int32 x, OSG::Real32 *areaBelowFilter, char *bInitalized)
static OSG::Real32 conv2D (OSG::Real32 *fun, OSG::Int32 funMaxX, OSG::Int32 funMaxY, OSG::Real32 *filterKrnl, OSG::Int32 filterMaxX, OSG::Int32 filterStartX, OSG::Int32 filterMaxY, OSG::Int32 filterStartY, OSG::Int32 x, OSG::Int32 y, char *bInitialized)
static OSG::Real32 * createGaussKernel (OSG::Real32 sigma, OSG::Int32 *length, OSG::Real32 eps)
static void dumpPPM (OSG::Real32 *data, int xLen, int yLen, OSG::Real32 scale, OSG::Real32 off, const char *file="heightdump.ppm")
static void dumpPPMVec3f (OSG::Vec3f *data, int xLen, int yLen, OSG::Real32 scale, OSG::Real32 off, const char *file="heightdumpvec.ppm")

Protected Attributes

OSG::Real32 * height
OSG::Vec3f * normals
char * bInitialized
int xSamples
int ySamples
OSG::Real32 x0
OSG::Real32 y0
OSG::Real32 z0
OSG::Real32 xlen
OSG::Real32 ylen
OSG::Real32 dx
OSG::Real32 dy
bool applyGaussBlurFilter
float gaussSmoothness
float gaussRectEps
OSG::Real32 weights [4]
int indices [4]

Static Protected Attributes

static const OSG::Vec3f up = Vec3f(0, 1, 0)
static const OSG::Vec3f down = Vec3f(0, -1, 0)
static const OSG::Char8 * GEOMETRY_CORE_NAME = "Geometry\0"
static const float RANGE = 0.0001f

Constructor & Destructor Documentation

HeightMap::HeightMap (  ) 

HeightMap::HeightMap ( HeightMap h  ) 

HeightMap::~HeightMap (  )  [virtual]


Member Function Documentation

void HeightMap::adjustZ ( float  scale,
float  off 
)

static OSG::Real32 HeightMap::conv1D ( OSG::Real32 *  fun,
OSG::Real32 *  filterKrnl,
OSG::Int32  fmax,
OSG::Int32  filterMax,
OSG::Int32  filterStart,
OSG::Int32  x,
OSG::Real32 *  areaBelowFilter,
char *  bInitalized 
) [static, protected]

static OSG::Real32 HeightMap::conv2D ( OSG::Real32 *  fun,
OSG::Int32  funMaxX,
OSG::Int32  funMaxY,
OSG::Real32 *  filterKrnl,
OSG::Int32  filterMaxX,
OSG::Int32  filterStartX,
OSG::Int32  filterMaxY,
OSG::Int32  filterStartY,
OSG::Int32  x,
OSG::Int32  y,
char *  bInitialized 
) [static, protected]

static OSG::Real32* HeightMap::createGaussKernel ( OSG::Real32  sigma,
OSG::Int32 *  length,
OSG::Real32  eps 
) [static, protected]

void HeightMap::doIntersectionTests ( OSG::NodePtr  model  )  [protected]

void HeightMap::dumpHeight ( const char *  filename,
float *  minHeight = NULL,
float *  maxHeight = NULL 
)

static void HeightMap::dumpPPM ( OSG::Real32 *  data,
int  xLen,
int  yLen,
OSG::Real32  scale,
OSG::Real32  off,
const char *  file = "heightdump.ppm" 
) [static, protected]

static void HeightMap::dumpPPMVec3f ( OSG::Vec3f *  data,
int  xLen,
int  yLen,
OSG::Real32  scale,
OSG::Real32  off,
const char *  file = "heightdumpvec.ppm" 
) [static, protected]

NodePtr HeightMap::exportGeometry ( char *  filename,
char *  normalsArrowModelFile = NULL 
)

bool HeightMap::generateHeightMap ( OSG::NodePtr  model,
int  xSamples,
int  ySamples,
int  height,
int  zRot,
bool  filter = false 
)

bool HeightMap::generateHeightMap ( OSG::NodePtr  model  ) 

float HeightMap::getHeight ( float  x,
float  z 
) [virtual]

Implements HeightMapInterface.

void HeightMap::getMinAndMaxHeightValues ( float *  minHeight = NULL,
float *  maxHeight = NULL 
)

void HeightMap::getNormal ( float  x,
float  z,
float *  vec3dst 
) [virtual]

Implements HeightMapInterface.

void HeightMap::getNormal ( OSG::Real32  x,
OSG::Real32  y,
OSG::Vec3f *  dst 
)

static OSG::Quaternion HeightMap::getNormalRotation ( const OSG::Vec3f &  normal  )  [static]

OSG::Quaternion HeightMap::getNormalRotation ( OSG::Real32  x,
OSG::Real32  y 
)

bool HeightMap::getWeightsAndIndices ( OSG::Real32  x,
OSG::Real32  y 
) [protected]

OSG::Real32 HeightMap::getZ ( OSG::Real32  x,
OSG::Real32  y 
)

NodeCorePtr HeightMap::makeGeometryPtr (  ) 

void HeightMap::setGaussFilterCoefficients ( float  smoothness,
float  rectEps 
)

bool HeightMap::setup ( const char *  filename  ) 

bool HeightMap::setup ( OSG::NodePtr  sampleMdl,
int  xSamples,
int  ySamples,
bool  filter = false 
)

bool HeightMap::setup ( OSG::Real32  x0,
OSG::Real32  y0,
OSG::Real32  z0,
OSG::Real32  xlen,
OSG::Real32  ylen,
int  xSamples,
int  ySamples,
bool  filter = false 
)

bool HeightMap::writeToFile ( const char *  filename  ) 

void HeightMap::writeToPPM ( const char *  filename,
float  scale,
float  off,
bool  findSelf 
)


Member Data Documentation

char* HeightMap::bInitialized [protected]

const Vec3f HeightMap::down = Vec3f(0, -1, 0) [static, protected]

OSG::Real32 HeightMap::dx [protected]

OSG::Real32 HeightMap::dy [protected]

float HeightMap::gaussRectEps [protected]

float HeightMap::gaussSmoothness [protected]

const Char8 * HeightMap::GEOMETRY_CORE_NAME = "Geometry\0" [static, protected]

OSG::Real32* HeightMap::height [protected]

int HeightMap::indices[4] [protected]

OSG::Vec3f* HeightMap::normals [protected]

const float HeightMap::RANGE = 0.0001f [static, protected]

const Vec3f HeightMap::up = Vec3f(0, 1, 0) [static, protected]

OSG::Real32 HeightMap::weights[4] [protected]

OSG::Real32 HeightMap::x0 [protected]

OSG::Real32 HeightMap::xlen [protected]

int HeightMap::xSamples [protected]

OSG::Real32 HeightMap::y0 [protected]

OSG::Real32 HeightMap::ylen [protected]

int HeightMap::ySamples [protected]

OSG::Real32 HeightMap::z0 [protected]


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

Generated on Wed Oct 20 16:11:56 2010 for inVRs by doxygen 1.5.8