|
FhSim
3.1.0
Marine systems simulation
|
#include <FlatSeafloor.h>
Inheritance diagram for marenv::seafloor::FlatSeafloor:
Collaboration diagram for marenv::seafloor::FlatSeafloor:Public Member Functions | |
| FlatSeafloor ()=default | |
| Constructor. | |
| ~FlatSeafloor () override=default | |
| Destructor. | |
| marenv::Status | GetDepth (const double pos[2], double &depthOut) override |
| marenv::Status | ComputeSurfaceUnitNormal (const double pos[2], double unitNormalOut[3]) override |
| marenv::Status | GetSoilState (const double pos[3], SoilState &soilOut) override |
| marenv::Status | ComputeRayIntersection (const double origin[3], const double direction[3], double &distanceOut, double maxSearchDistance=100, double startSearchDistance=-1, double stepSize=1.0, double convergenceTolerance=0.01) override |
Public Member Functions inherited from marenv::seafloor::BathymetryField | |
| virtual | ~BathymetryField ()=default |
| Virtual destructor. | |
Additional Inherited Members | |
Protected Member Functions inherited from marenv::seafloor::BathymetryField | |
| BathymetryField ()=default | |
| Constructor is empty. | |
Static Protected Member Functions inherited from marenv::seafloor::BathymetryField | |
| static bool | IsValidRay (const double origin[3], double directionNorm, double maxSearchDistance) |
| True for an origin with finite coordinates, and a direction norm and a maximum search distance that ComputeRayIntersection accepts: positive and finite. | |
| static double | ValidTolerance (double convergenceTolerance) |
The convergence tolerance ComputeRayIntersection uses: convergenceTolerance, raised to 1e-12 if smaller or NaN. | |
A flat seabed at 200 m depth.
Represents a simple featureless ocean floor.
|
overridevirtual |
Returns the distance along the unit ray to the 200 m plane, exactly: no march, so startSearchDistance and stepSize are not used.
The contract is that of BathymetryField::ComputeRayIntersection: an origin less than convergenceTolerance above the plane, or below it, is a hit at distance 0 (owner ruling R133); a ray that is horizontal, points away from the plane or meets it beyond maxSearchDistance returns marenv::Status::NOT_APPLICABLE_NOT_SET with distance -1 (owner ruling R134, MENV-0063); a zero or non-finite direction, a non-finite origin, or a maxSearchDistance that is not positive and finite, returns marenv::Status::ERROR_NOT_SET with distance -1. For a direction whose computed norm is exactly 1 the hit is (200 - z) / u_z as before MENV-0063, to the bit.
Reimplemented from marenv::seafloor::BathymetryField.
|
overridevirtual |
Returns the unit normal vector of the seafloor at a specific position.
| [in] | pos | Position (x,y) for which the unit normal surface vector is desired. |
| [out] | unitNormalOut | The unit normal surface vector at pos. |
Implements marenv::seafloor::BathymetryField.
|
overridevirtual |
Returns the seafloor depth at a specific position.
| [in] | pos | Position (x,y) for which depth is desired. |
| [out] | depthOut | Depth at pos. |
Implements marenv::seafloor::BathymetryField.
|
overridevirtual |
Returns the default soil, SoilState{} (s_u = 5000 + 2000 z, mu = 0.2, density 2000), everywhere, as BathymetryWaves does (plan D1 phase 2, owner ruling 2026-10-17).
Implements marenv::seafloor::BathymetryField.