GRE::TERRAIN Class Reference

Base class for 3D terrain models. More...

#include <gre/3dterra.h>

Inheritance diagram for GRE::TERRAIN:
Inheritance graph
[legend]

List of all members.

Classes

class  IMPL_FACTORY

Public Types

enum  MODEL {
  MODEL_Default = 0, MODEL_TIN = 0, MODEL_VariableTriangulation = 1, MODEL_PiecewiseTIN = 2,
  MODEL_FlatTriangulation = 3, MODEL_Count = 4
}

Public Member Functions

virtual ~TERRAIN ()
ERRVALUE Build (const GRE::LAYER *layer)
void ClearBoundary ()
ERRVALUE ComputeProfile (const POLYLINE &polyline, POLYLINE &profile, SIMPLE_ARRAY< INT32 > &index)
TERRAINCreateInstance ()
ERRVALUE DrawScene (CONTROLLER &controller, DRAWINGCONTEXT3D &drawing, TEXTURE *texture, TEXTUREFILTER *texturefilter)
void Free ()
float GetAngleToNorth (const float x, const float y) const
const REGION2DGetBoundary ()
const SPATREF::COORDREFSYS GetCoordRefSys () const
ERRVALUE GetDefaultScene (SCENE3D &scene)
const char * GetDescription () const
float GetElevation (const float x, const float y)
const DRECT3DGetExtents ()
const MODEL GetModel () const
const char * GetName () const
POINTSFIELDGetPointsField ()
bool HasNull () const
bool IsBoundaryChanged () const
bool IsBuilt () const
bool IsNull (const float x, const float y) const
bool IsObjectTypeSupported (const RVC::OBJTYPE objtype) const
bool IsTerrainDynamic () const
void SetCoordRefSys (const SPATREF::COORDREFSYS &CoordRefSys)
ERRVALUE SetScene (const SCENE3D &scene, const SIMPLE_ARRAY< GEOMETRIC3D * > &geometrics, const bool wireframe)
ERRVALUE SetScene (const SCENE3D &scene, const SIMPLE_ARRAY< TEXTURE * > &textures)

Static Public Member Functions

static const char * GetDescription (const MODEL model)
static TERRAINGetInstance (const MODEL model)
static const char * GetName (const MODEL model)
static void Register (IMPL_FACTORY *factory, const MODEL model)

Protected Member Functions

 TERRAIN (const char *name, const char *desc, const MODEL model)
void SetBuilt (const bool built)

Private Member Functions

virtual ERRVALUE v_Build (const GRE::LAYER *layer)=0
virtual ERRVALUE v_ComputeProfile (const POLYLINE &polyline, POLYLINE &profile, SIMPLE_ARRAY< INT32 > &index)=0
virtual void v_CreateBoundary (REGION2D &boundary)=0
virtual TERRAINv_CreateInstance ()=0
virtual ERRVALUE v_DrawScene (CONTROLLER &controller, DRAWINGCONTEXT3D &drawing, TEXTURE *texture, TEXTUREFILTER *texturefilter)=0
virtual void v_Free ()=0
virtual float v_GetAngleToNorth (const float x, const float y) const =0
virtual const SPATREF::COORDREFSYS v_GetCoordRefSys () const =0
virtual ERRVALUE v_GetDefaultScene (SCENE3D &scene) const =0
virtual float v_GetElevation (const float x, const float y) const =0
virtual const DRECT3Dv_GetExtents ()=0
virtual bool v_HasNull () const =0
virtual bool v_IsNull (const float x, const float y) const =0
virtual bool v_IsObjectTypeSupported (const RVC::OBJTYPE objtype) const =0
virtual void v_SetCoordRefSys (const SPATREF::COORDREFSYS &CoordRefSys)=0
virtual ERRVALUE v_SetScene (const SCENE3D &scene, const SIMPLE_ARRAY< GEOMETRIC3D * > &geometrics, const bool wireframe)=0
virtual ERRVALUE v_SetScene (const SCENE3D &scene, const SIMPLE_ARRAY< TEXTURE * > &textures)=0

Detailed Description

Base class for 3D terrain models.


Member Enumeration Documentation

Enumerator:
MODEL_Default 
MODEL_TIN 
MODEL_VariableTriangulation 
MODEL_PiecewiseTIN 
MODEL_FlatTriangulation 
MODEL_Count 

Constructor & Destructor Documentation

virtual GRE::TERRAIN::~TERRAIN (  )  [virtual]
GRE::TERRAIN::TERRAIN ( const char *  name,
const char *  desc,
const MODEL  model 
) [protected]
Parameters:
name Constructor

Member Function Documentation

ERRVALUE GRE::TERRAIN::Build ( const GRE::LAYER layer  )  [inline]

Build internal structures for terrain construction for given surface layer.

Returns:
0 if built or < 0 if an error
void GRE::TERRAIN::ClearBoundary (  )  [inline]
ERRVALUE GRE::TERRAIN::ComputeProfile ( const POLYLINE polyline,
POLYLINE profile,
SIMPLE_ARRAY< INT32 > &  index 
) [inline]

Get profile on elevation along polyline.

Returns:
0 or an error
TERRAIN* GRE::TERRAIN::CreateInstance (  )  [inline]

Create new instance of terrain model.

Returns:
instance of texture model
ERRVALUE GRE::TERRAIN::DrawScene ( CONTROLLER controller,
DRAWINGCONTEXT3D drawing,
TEXTURE texture,
TEXTUREFILTER texturefilter 
) [inline]

Draw given texture with given texture filter on this terrain with preset scene.

Returns:
>= 0 if set is done
void GRE::TERRAIN::Free (  )  [inline]

Free internal structures for terrain construction.

float GRE::TERRAIN::GetAngleToNorth ( const float  x,
const float  y 
) const [inline]

Get angle to elevation at map projection coordinates (x, y).

Returns:
angle to north in radians
const REGION2D& GRE::TERRAIN::GetBoundary (  )  [inline]
const SPATREF::COORDREFSYS GRE::TERRAIN::GetCoordRefSys (  )  const [inline]

Get map projection be used for output data.

ERRVALUE GRE::TERRAIN::GetDefaultScene ( SCENE3D scene  )  [inline]

GetDefaultScene initializes scene with default parameters for this model.

Returns:
>= 0 if initialization is done
const char* GRE::TERRAIN::GetDescription (  )  const [inline]

GetDescription returns a description of the model.

Returns:
char pointer of the description
static const char* GRE::TERRAIN::GetDescription ( const MODEL  model  )  [static]

static GetDescription returns a description of the given model enum

Returns:
char pointer of the description
float GRE::TERRAIN::GetElevation ( const float  x,
const float  y 
) [inline]

Get elevation at map projection coordinates (x, y).

Returns:
elevation in meters
const DRECT3D& GRE::TERRAIN::GetExtents (  )  [inline]

Get extents in map projection coordinates.

Returns:
extents
static TERRAIN* GRE::TERRAIN::GetInstance ( const MODEL  model  )  [static]

static GetInstance returns a new instance of the given model enum

Returns:
pointer to new model
const MODEL GRE::TERRAIN::GetModel (  )  const [inline]

GetModel returns an enum of the model.

Returns:
enum of the model
const char* GRE::TERRAIN::GetName (  )  const [inline]

GetName returns a name of the model.

Returns:
char pointer of the name
static const char* GRE::TERRAIN::GetName ( const MODEL  model  )  [static]

static GetName returns a name of the given model enum

Returns:
char pointer of the name
POINTSFIELD& GRE::TERRAIN::GetPointsField (  )  [inline]
bool GRE::TERRAIN::HasNull (  )  const [inline]

Has null areas.

Returns:
true if has null areas
bool GRE::TERRAIN::IsBoundaryChanged (  )  const [inline]
bool GRE::TERRAIN::IsBuilt (  )  const [inline]

Is internal structures for terrain construction built?

Returns:
true if built or false if an error
bool GRE::TERRAIN::IsNull ( const float  x,
const float  y 
) const [inline]

Is value at map projection coordinates (x, y) null.

Returns:
true if value is null
bool GRE::TERRAIN::IsObjectTypeSupported ( const RVC::OBJTYPE  objtype  )  const [inline]

What rvc object type are supported in surface layer for this model (RVC::TIN or RVC::RASTER).

Returns:
true if built or false if an error
bool GRE::TERRAIN::IsTerrainDynamic (  )  const [inline]
static void GRE::TERRAIN::Register ( IMPL_FACTORY factory,
const MODEL  model 
) [static]
void GRE::TERRAIN::SetBuilt ( const bool  built  )  [inline, protected]

Set built state.

void GRE::TERRAIN::SetCoordRefSys ( const SPATREF::COORDREFSYS CoordRefSys  )  [inline]

Set model map projection be used for output data.

ERRVALUE GRE::TERRAIN::SetScene ( const SCENE3D scene,
const SIMPLE_ARRAY< GEOMETRIC3D * > &  geometrics,
const bool  wireframe 
) [inline]

Set scene for the model and array of geometrics to be drawn on it.

Returns:
>= 0 if set is done
ERRVALUE GRE::TERRAIN::SetScene ( const SCENE3D scene,
const SIMPLE_ARRAY< TEXTURE * > &  textures 
) [inline]

Set scene for the model and array of textures to be drawn on it.

Returns:
>= 0 if set is done
virtual ERRVALUE GRE::TERRAIN::v_Build ( const GRE::LAYER layer  )  [private, pure virtual]
virtual ERRVALUE GRE::TERRAIN::v_ComputeProfile ( const POLYLINE polyline,
POLYLINE profile,
SIMPLE_ARRAY< INT32 > &  index 
) [private, pure virtual]
virtual void GRE::TERRAIN::v_CreateBoundary ( REGION2D boundary  )  [private, pure virtual]
virtual TERRAIN* GRE::TERRAIN::v_CreateInstance (  )  [private, pure virtual]
virtual ERRVALUE GRE::TERRAIN::v_DrawScene ( CONTROLLER controller,
DRAWINGCONTEXT3D drawing,
TEXTURE texture,
TEXTUREFILTER texturefilter 
) [private, pure virtual]
virtual void GRE::TERRAIN::v_Free (  )  [private, pure virtual]
virtual float GRE::TERRAIN::v_GetAngleToNorth ( const float  x,
const float  y 
) const [private, pure virtual]
virtual const SPATREF::COORDREFSYS GRE::TERRAIN::v_GetCoordRefSys (  )  const [private, pure virtual]
virtual ERRVALUE GRE::TERRAIN::v_GetDefaultScene ( SCENE3D scene  )  const [private, pure virtual]
virtual float GRE::TERRAIN::v_GetElevation ( const float  x,
const float  y 
) const [private, pure virtual]
virtual const DRECT3D& GRE::TERRAIN::v_GetExtents (  )  [private, pure virtual]
virtual bool GRE::TERRAIN::v_HasNull (  )  const [private, pure virtual]
virtual bool GRE::TERRAIN::v_IsNull ( const float  x,
const float  y 
) const [private, pure virtual]
virtual bool GRE::TERRAIN::v_IsObjectTypeSupported ( const RVC::OBJTYPE  objtype  )  const [private, pure virtual]
virtual void GRE::TERRAIN::v_SetCoordRefSys ( const SPATREF::COORDREFSYS CoordRefSys  )  [private, pure virtual]
virtual ERRVALUE GRE::TERRAIN::v_SetScene ( const SCENE3D scene,
const SIMPLE_ARRAY< GEOMETRIC3D * > &  geometrics,
const bool  wireframe 
) [private, pure virtual]
virtual ERRVALUE GRE::TERRAIN::v_SetScene ( const SCENE3D scene,
const SIMPLE_ARRAY< TEXTURE * > &  textures 
) [private, pure virtual]

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

Generated on Sun Oct 7 21:34:51 2012 for TNTsdk 2012 by  doxygen 1.6.1