vtdata library
Public Member Functions | Protected Attributes | List of all members
vtHeightField Class Referenceabstract
Inheritance diagram for vtHeightField:
Inheritance graph

Public Member Functions

void Initialize (const DRECT &extents, float fMinHeight, float fMaxHeight)
virtual bool FindAltitudeOnEarth (const DPoint2 &p, float &fAltitude, bool bTrue=false) const =0
bool ContainsEarthPoint (const DPoint2 &p, bool bInclusive=false) const
DRECTGetEarthExtents ()
const DRECTGetEarthExtents () const
virtual void SetEarthExtents (const DRECT &ext)
void GetHeightExtents (float &fMinHeight, float &fMaxHeight) const

Protected Attributes

float m_fMinHeight
float m_fMaxHeight
DRECT m_EarthExtents

Detailed Description

A heightfield is any collection of surfaces such that, given a horizontal X,Y position, there exists only a single elevation value.

Member Function Documentation

bool vtHeightField::ContainsEarthPoint ( const DPoint2 p,
bool  bInclusive = false 
) const

Test if a point is within the extents of the grid.

DRECT& vtHeightField::GetEarthExtents ( )

Returns the geographic extents of the grid.

void vtHeightField::GetHeightExtents ( float &  fMinHeight,
float &  fMaxHeight 
) const

Gets the minimum and maximum height values. The values are placed in the arguments by reference. You must have first called ComputeHeightExtents.

void vtHeightField::SetEarthExtents ( const DRECT ext)

Set the geographic extents of the grid.

Reimplemented in vtHeightFieldGrid3d, and vtHeightField3d.