
Public Member Functions | |
| void | Initialize (const LinearUnits units, const DRECT &earthextents, float fMinHeight, float fMaxHeight, int cols, int rows) |
| virtual void | SetEarthExtents (const DRECT &ext) |
| bool | CastRayToSurface (const FPoint3 &point, const FPoint3 &dir, FPoint3 &result) const |
| bool | LineOfSight (const FPoint3 &point1, const FPoint3 &point2) const |
| DPoint2 | GetSpacing () const |
| FPoint2 | GetWorldSpacing () const |
| void | GetDimensions (int &nColumns, int &nRows) const |
| void | EarthToGrid (const DPoint2 &epos, IPoint2 &ipos) |
| void | WorldToGrid (const FPoint3 &pos, IPoint2 &ipos) |
| float | GetInterpolatedElevation (double findex_x, double findex_y) const |
| int | FindNumUnknown () |
| virtual float | GetElevation (int iX, int iZ, bool bTrue=false) const =0 |
| virtual void | GetWorldLocation (int i, int j, FPoint3 &loc, bool bTrue=false) const =0 |
| bool | ColorDibFromElevation (vtBitmapBase *pBM, const ColorMap *cmap, int iGranularity, const RGBAi &nodata, bool progress_callback(int)=NULL) |
| bool | ColorDibFromTable (vtBitmapBase *pBM, std::vector< RGBi > &table, float fMin, float fMax, const RGBAi &nodata, bool progress_callback(int)=NULL) |
| void | ShadeDibFromElevation (vtBitmapBase *pBM, const FPoint3 &light_dir, float fLightFactor, float fAmbient=0.1f, float fGamma=1.0f, bool bTrue=false, bool progress_callback(int)=NULL) |
| void | ShadeQuick (vtBitmapBase *pBM, float light_factor, bool bTrue=false, bool progress_callback(int)=NULL) |
| void | ShadowCastDib (vtBitmapBase *pBM, const FPoint3 &ight_dir, float fLightFactor, float fAmbient, bool progress_callback(int)=NULL) |
Protected Attributes | |
| int | m_iColumns |
| int | m_iRows |
| float | m_fXStep |
| float | m_fZStep |
| double | m_dXStep |
| double | m_dYStep |
|
||||||||||||||||
|
Tests a ray against a heightfield grid. Note: This algorithm is not guaranteed to give absolutely correct results, but it is reasonably fast and efficient. It checks a series of points along the ray against the terrain. When a pair of points (segment) is found to straddle the terrain, it refines the segment in a binary fashion. Since the length of the test is proportional to a single grid element, there is a small chance that it will give results that are off by a small distance (less than 1 grid element)
Implements vtHeightField3d. |
|
||||||||||||||||||||||||
|
Use the height data in the grid to fill a bitmap with colors.
|
|
||||||||||||||||||||||||||||
|
Use the height data in the grid and a colormap fill a bitmap with colors. Any undefined heixels in the source will be fill with red (255,0,0).
|
|
||||||||||||
|
Convert a point from earth coordinates to the integer coordinates of the grid. |
|
|
Count the number of unknown (invalid) heixels in this grid. |
|
||||||||||||
|
Get the grid size of the grid. The values are placed into the arguments by reference.
|
|
||||||||||||
|
Get the interpolated height of the grid at a specific grid coordinate, where the coordinates can be non-integer; the result is interpolated between the source heixels when possible (i.e. not at the edge)
|
|
|
Get the grid spacing, the width of each column and row. |
|
||||||||||||
|
|
|
|
Set the geographic extents of the grid. Reimplemented from vtHeightField3d. |
|
||||||||||||||||||||||||||||||||
|
Perform simple shading of a bitmap, based on this grid's elevation values. Lighting is computing using the dot product of the surface normal with the light direction. This is often called "dot-product lighting".
|
|
||||||||||||||||||||
|
Quickly produce a shading-like effect by scanning over the bitmap once, using the east-west slope to produce lightening/darkening. The bitmap must be the same size as the elevation grid, or a power of 2 smaller. |
|
||||||||||||||||||||||||
|
ShadowCastDib - method to create shadows over the terrain based on the angle of the sun.
|
|
||||||||||||
|
Convert a point from world coordinates to the integer coordinates of the grid. |
1.4.5