3#include <marenv/seafloor/BathymetryField.h>
9namespace marenv::seafloor
64 std::vector<double>
b;
65 std::vector<double>
c;
66 std::vector<double>
d;
227 [[nodiscard]]
double DepthAt(
double x,
double y)
const;
230 double TrackDepth(
double x,
double y)
const;
Definition BathymetryField.h:25
Definition ParametricBathymetry.h:203
marenv::Status ComputeSurfaceUnitNormal(const double pos[2], double unitNormalOut[3]) override
double DepthAt(double x, double y) const
ParametricBathymetry(parametric::Spec spec)
marenv::Status GetSoilState(const double pos[3], SoilState &soilOut) override
marenv::Status GetDepth(const double pos[2], double &depthOut) override
Status
Definition marenv.h:44
Window
Edge profiles of the cross-fade between track segments.
Definition ParametricBathymetry.h:86
@ Smoothstep
Cubic smoothstep ramp.
@ Hard
Discontinuous 0/1 gate.
@ RaisedCosine
Raised-cosine ramp (partition-of-unity between neighbours).
Extrap
Behaviour of a 1-D profile outside its node range.
Definition ParametricBathymetry.h:44
@ Extend
Continue the interpolant/polynomial itself (may diverge).
@ Flat
Clamp to the nearest end value (constant beyond the range).
Blend
How a layer's weighted primitive combines with the accumulated depth.
Definition ParametricBathymetry.h:95
@ Replace
Linear blend toward the primitive by the region weight.
@ Max
Blend toward the deeper (larger depth) of the two.
@ Min
Blend toward the shallower (smaller depth) of the two.
@ Add
Add the weighted primitive value.
Primitive
Definition ParametricBathymetry.h:24
@ TransversalInterp
Cross-track profile interpolated through user-specified points.
@ Valley
Trough extruded along the heading (deeper toward the centre-line).
@ Peak
Ridge extruded along the heading (shallower toward the centre-line).
@ Bump
Localised radial feature centred at a point.
@ TransversalSlope
Inclined plane, gradient across the heading direction.
@ Slope
Inclined plane, gradient along the heading direction.
InterpMode
Interpolation method for a 1-D transversal profile.
Definition ParametricBathymetry.h:36
@ Polynomial
Single canonical (monomial) polynomial through all points.
@ Linear
Piecewise linear through the points.
@ CubicSpline
Piecewise cubic spline (natural, or clamped to zero end gradient).
Shape
One-dimensional profile shapes used by Valley/Peak/Bump primitives.
Definition ParametricBathymetry.h:78
@ Cosine
for , else 0 (finite support).
@ Parabola
(finite support).
@ Gaussian
(infinite support).
Definition SoilState.h:14
Definition ParametricBathymetry.h:107
double cosHeading
cos(headingRad); the ParametricBathymetry constructor fills it.
Definition ParametricBathymetry.h:110
double headingRad
Heading [rad], North toward East.
Definition ParametricBathymetry.h:109
Primitive type
Primitive kind.
Definition ParametricBathymetry.h:108
double centerY
Bump centre, East [m].
Definition ParametricBathymetry.h:118
double depth
Datum depth [m].
Definition ParametricBathymetry.h:112
double sinHeading
sin(headingRad); the ParametricBathymetry constructor fills it.
Definition ParametricBathymetry.h:111
double gradient
Slope [m/m] (Slope, TransversalSlope).
Definition ParametricBathymetry.h:113
double width
Characteristic width [m] (Valley/Peak/Bump).
Definition ParametricBathymetry.h:115
double amplitude
Feature amplitude [m] (Valley/Peak/Bump).
Definition ParametricBathymetry.h:114
Shape shape
Profile shape (Valley/Peak/Bump).
Definition ParametricBathymetry.h:119
std::shared_ptr< const Profile1D > profile
Interpolated cross-track profile (TransversalInterp).
Definition ParametricBathymetry.h:121
double crossOffset
Offset of the feature line [m].
Definition ParametricBathymetry.h:116
double centerX
Bump centre, North [m].
Definition ParametricBathymetry.h:117
A primitive applied over a region, combined by a blend operator.
Definition ParametricBathymetry.h:139
Feature feature
The primitive to apply.
Definition ParametricBathymetry.h:140
Region region
Where it is active.
Definition ParametricBathymetry.h:141
Blend blend
How it combines with the accumulator.
Definition ParametricBathymetry.h:142
Definition ParametricBathymetry.h:56
double Evaluate(double v) const
std::vector< double > values
Node values z_i.
Definition ParametricBathymetry.h:60
InterpMode mode
Interpolation method.
Definition ParametricBathymetry.h:57
std::vector< double > poly
Canonical polynomial coefficients (Polynomial).
Definition ParametricBathymetry.h:63
std::vector< double > nodes
Node coordinates v_i (ascending).
Definition ParametricBathymetry.h:59
Extrap extrap
Out-of-range behaviour.
Definition ParametricBathymetry.h:58
std::vector< double > c
Spline 2nd-order coefficients per node.
Definition ParametricBathymetry.h:65
std::vector< double > d
Spline 3rd-order coefficients per node.
Definition ParametricBathymetry.h:66
std::vector< double > b
Spline/linear 1st-order coefficients per node.
Definition ParametricBathymetry.h:64
Definition ParametricBathymetry.h:129
double max
Interval upper bound along the region axis [m].
Definition ParametricBathymetry.h:134
double headingRad
Region axis heading [rad].
Definition ParametricBathymetry.h:130
double sinHeading
sin(headingRad); the ParametricBathymetry constructor fills it.
Definition ParametricBathymetry.h:132
double min
Interval lower bound along the region axis [m].
Definition ParametricBathymetry.h:133
double cosHeading
cos(headingRad); the ParametricBathymetry constructor fills it.
Definition ParametricBathymetry.h:131
One along-track segment: a length and the cross-track profile it presents.
Definition ParametricBathymetry.h:147
double length
Along-track extent [m].
Definition ParametricBathymetry.h:148
Feature profile
Cross-track seabed profile for this segment.
Definition ParametricBathymetry.h:149
Definition ParametricBathymetry.h:174
std::vector< Layer > layers
Optional general composition layers (applied after the track).
Definition ParametricBathymetry.h:178
Track track
Optional along-track profile sequence.
Definition ParametricBathymetry.h:177
double baseDepth
Fallback depth where nothing else applies [m].
Definition ParametricBathymetry.h:175
double rho
Constant seabed density [kg/m^3].
Definition ParametricBathymetry.h:176
Definition ParametricBathymetry.h:161
Window transition
Cross-fade edge profile.
Definition ParametricBathymetry.h:168
double start
Along-track position of the first segment [m].
Definition ParametricBathymetry.h:166
std::vector< Segment > segments
Ordered segments.
Definition ParametricBathymetry.h:169
double headingRad
Track heading [rad], North toward East.
Definition ParametricBathymetry.h:163
double transitionWidth
Cross-fade width [m].
Definition ParametricBathymetry.h:167
double cosHeading
cos(headingRad); the ParametricBathymetry constructor fills it.
Definition ParametricBathymetry.h:164
double sinHeading
sin(headingRad); the ParametricBathymetry constructor fills it.
Definition ParametricBathymetry.h:165
bool present
Whether a track is configured.
Definition ParametricBathymetry.h:162