|
FhSim
3.1.0
Marine systems simulation
|
#include <TerrainField.h>
Inheritance diagram for marenv::terrain::TerrainField:
Collaboration diagram for marenv::terrain::TerrainField:Public Member Functions | |
| virtual Status | GetElevation (const double pos[2], double &zOut) const =0 |
| virtual Status | ComputeSurfaceUnitNormal (const double pos[2], double nOut[3]) const |
| virtual double | Spacing () const =0 |
| The horizontal size of the field's detail [m], > 0: of several fields covering a point, the finest is used. | |
| virtual bool | Covers (const double pos[2]) const |
The ground above the sea: the land's elevation at a horizontal position (owner decision D-F of fhsim_environment's doc/plans/volumetric-fog-and-media.md), for whoever cares (fog that pools in hollows, a vessel's grounding check above the sea level, a line of sight), at the modest fidelity of a marine simulator.
Elevations are NED: z is negative above the mean sea level (a hill 120 m high is z = -120). A field that has no ground at a position (the sea, outside its extent, a hole in its data) returns Status::NOT_APPLICABLE_NOT_SET and z = +infinity, so z < pos[2] never holds there. The seabed is the bathymetry's (seafloor::BathymetryField), not this.
Queries are const and thread-safe; a field is set up before the simulation starts (EnvironmentFacade::AddTerrainField).
|
virtual |
The ground's upward unit normal, NED (pointing up: its z component is negative).
| [in] | pos | Horizontal position [m]. |
| [out] | nOut | The unit normal; (0, 0, -1) where there is no ground. |
|
inlinevirtual |
Whether the field has data at a position (ground or sea): of several fields, the finest that covers a point decides it, its sea included. The default: wherever GetElevation() returns Status::OK.
Reimplemented in marenv::terrain::GridTerrain.
|
pure virtual |
The ground's elevation at a horizontal position.
| [in] | pos | Horizontal position (x north, y east) [m]. |
| [out] | zOut | The ground's z [m], NED (negative above the sea level); +infinity where there is none. |
Implemented in marenv::terrain::GridTerrain.
|
pure virtual |
Implemented in marenv::terrain::GridTerrain.