Cafu Engine
cf::MapFileTerrainT Struct Reference

Public Member Functions

 MapFileTerrainT ()
 The default constructor. More...
 
 MapFileTerrainT (TextParserT &TP)
 
Vector3dT GetSpatial (unsigned long x, unsigned long y) const
 Returns the spatial coordinate for the given (logical) height field position. More...
 

Public Attributes

BoundingBox3dT Bounds
 The terrains bounds. More...
 
MaterialTMaterial
 The terrains material. More...
 
unsigned long SideLength
 Side length of the terrains height data. More...
 
ArrayT< unsigned short > HeightData
 The SideLength*SideLength array of height data. More...
 

Constructor & Destructor Documentation

cf::MapFileTerrainT::MapFileTerrainT ( )
inline

The default constructor.

MapFileTerrainT::MapFileTerrainT ( TextParserT TP)
Exceptions
TextParserT::ParseErroron problems.

Member Function Documentation

Vector3dT cf::MapFileTerrainT::GetSpatial ( unsigned long  x,
unsigned long  y 
) const
inline

Returns the spatial coordinate for the given (logical) height field position.

Note that for processing all vertices of a terrain quickly, specialized loops should be preferred over this relatively slow (repetitive) method.

Parameters
xThe horizontal component of the logical height field position.
yThe vertical component of the logical height field position.
Returns
the spatial coordinate for the given (logical) height field position.

Member Data Documentation

BoundingBox3dT cf::MapFileTerrainT::Bounds

The terrains bounds.

ArrayT<unsigned short> cf::MapFileTerrainT::HeightData

The SideLength*SideLength array of height data.

MaterialT* cf::MapFileTerrainT::Material

The terrains material.

unsigned long cf::MapFileTerrainT::SideLength

Side length of the terrains height data.


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