|
FhSim
3.1.0
Marine systems simulation
|
#include <GridTerrain.h>
Inheritance diagram for marenv::terrain::GridTerrain:
Collaboration diagram for marenv::terrain::GridTerrain:Classes | |
| struct | Grid |
| The grid. More... | |
Public Member Functions | |
| GridTerrain (Grid grid) | |
| Status | GetElevation (const double pos[2], double &zOut) const override |
| TerrainField. | |
| double | Spacing () const override |
| TerrainField: the smaller spacing. | |
| bool | Covers (const double pos[2]) const override |
| TerrainField: inside the grid, in a cell with data at a corner at least. | |
| const Grid & | GetGrid () const |
| The grid. | |
Public Member Functions inherited from marenv::terrain::TerrainField | |
| virtual Status | ComputeSurfaceUnitNormal (const double pos[2], double nOut[3]) const |
A regular grid of ground heights, interpolated bilinearly (D-F): the form a site's elevation grid comes in.
Sample (i, j) is at x = x0 + i dx (north), y = y0 + j dy (east), with height heights[j * nx + i] [m] above the sea level (positive up). A height at or below 0 is the sea (or the seabed of a grid that holds both): the ground there is at the sea level, so a coast slopes down into the sea, and a point whose interpolated height is not above 0 has no ground. A NaN height is no data: a cell with no data at its four corners is not covered (Covers(): a hole, which a coarser field fills), and missing corners of a cell with data count as the sea level. Outside the grid there is no ground and no data.
|
explicit |
| [in] | grid | The grid. |
| std::invalid_argument | for a spacing <= 0, fewer than 2 samples along an axis, or a wrong number of heights. |
|
overridevirtual |
Reimplemented from marenv::terrain::TerrainField.
|
overridevirtual |
Implements marenv::terrain::TerrainField.
|
overridevirtual |
Implements marenv::terrain::TerrainField.