3#include <marenv/seafloor/BathymetryField.h>
65 std::vector<double>
b;
66 std::vector<double>
c;
67 std::vector<double>
d;
215 static std::shared_ptr<ParametricBathymetry>
FromJsonString(
const std::string& jsonText);
223 static std::shared_ptr<ParametricBathymetry>
FromFile(
const std::string& path);
242 double& distanceOut,
double maxSearchDistance = 100.0,
double startSearchDistance = -1.0,
243 double stepSize = 1.0,
double convergenceTolerance = 0.01)
override;
251 [[nodiscard]]
double DepthAt(
double x,
double y)
const;
254 double TrackDepth(
double x,
double y)
const;
Definition ParametricBathymetry.h:200
static std::shared_ptr< ParametricBathymetry > FromJsonString(const std::string &jsonText)
double DepthAt(double x, double y) const
static std::shared_ptr< ParametricBathymetry > FromFile(const std::string &path)
marenv::Status ComputeSurfaceUnitNormal(const double pos[2], double unitNormalOut[3]) override
marenv::Status GetDepth(const double pos[2], double &depthOut) override
marenv::Status ComputeRayIntersection(const double origin[3], const double direction[3], double &distanceOut, double maxSearchDistance=100.0, double startSearchDistance=-1.0, double stepSize=1.0, double convergenceTolerance=0.01) override
ParametricBathymetry(parametric::Spec spec)
marenv::Status GetSeabedTau(const double pos[3], double &tauOut) override
marenv::Status GetSeabedRho(const double pos[3], double &rhoOut) override
marenv::Status GetSeabedSigma(const double pos[3], double &sigmaOut) override
Definition BathymetryField.h:24
Status
Definition marenv.h:40
Extrap
Behaviour of a 1-D profile outside its node range.
Definition ParametricBathymetry.h:45
@ Extend
Continue the interpolant/polynomial itself (may diverge).
@ Flat
Clamp to the nearest end value (constant beyond the range).
Window
Spatial window (validity interval) edge profiles.
Definition ParametricBathymetry.h:87
@ Smoothstep
Cubic smoothstep ramp.
@ Hard
Discontinuous 0/1 gate.
@ RaisedCosine
Raised-cosine ramp (partition-of-unity between neighbours).
Shape
One-dimensional profile shapes used by Valley/Peak/Bump primitives.
Definition ParametricBathymetry.h:79
@ Cosine
for , else 0 (finite support).
@ Parabola
(finite support).
@ Gaussian
(infinite support).
Blend
How a layer's weighted primitive combines with the accumulated depth.
Definition ParametricBathymetry.h:96
@ 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.
InterpMode
Interpolation method for a 1-D transversal profile.
Definition ParametricBathymetry.h:37
@ Polynomial
Single canonical (monomial) polynomial through all points.
@ Linear
Piecewise linear through the points.
@ CubicSpline
Piecewise cubic spline (natural or clamped end slopes).
Primitive
Definition ParametricBathymetry.h:25
@ 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.
Environment SimObjects.
Definition Environment.h:25
Definition ParametricBathymetry.h:108
double width
Characteristic width [m] (Valley/Peak/Bump).
Definition ParametricBathymetry.h:114
Shape shape
Profile shape (Valley/Peak/Bump).
Definition ParametricBathymetry.h:118
double depth
Datum depth [m].
Definition ParametricBathymetry.h:111
double centerX
Bump centre, North [m].
Definition ParametricBathymetry.h:116
double amplitude
Feature amplitude [m] (Valley/Peak/Bump).
Definition ParametricBathymetry.h:113
double gradient
Slope [m/m] (Slope, TransversalSlope).
Definition ParametricBathymetry.h:112
double headingRad
Heading [rad], North toward East.
Definition ParametricBathymetry.h:110
std::shared_ptr< const Profile1D > profile
Interpolated cross-track profile (TransversalInterp).
Definition ParametricBathymetry.h:120
double crossOffset
Offset of the feature line [m].
Definition ParametricBathymetry.h:115
double centerY
Bump centre, East [m].
Definition ParametricBathymetry.h:117
Primitive type
Primitive kind.
Definition ParametricBathymetry.h:109
A primitive applied over a region, combined by a blend operator.
Definition ParametricBathymetry.h:139
Region region
Where it is active.
Definition ParametricBathymetry.h:141
Blend blend
How it combines with the accumulator.
Definition ParametricBathymetry.h:142
Feature feature
The primitive to apply.
Definition ParametricBathymetry.h:140
Definition ParametricBathymetry.h:57
std::vector< double > values
Node values z_i.
Definition ParametricBathymetry.h:61
std::vector< double > poly
Canonical polynomial coefficients (Polynomial).
Definition ParametricBathymetry.h:64
std::vector< double > b
Spline/linear 1st-order coefficients per node.
Definition ParametricBathymetry.h:65
std::vector< double > c
Spline 2nd-order coefficients per node.
Definition ParametricBathymetry.h:66
InterpMode mode
Interpolation method.
Definition ParametricBathymetry.h:58
double Evaluate(double v) const
std::vector< double > nodes
Node coordinates v_i (ascending).
Definition ParametricBathymetry.h:60
Extrap extrap
Out-of-range behaviour.
Definition ParametricBathymetry.h:59
std::vector< double > d
Spline 3rd-order coefficients per node.
Definition ParametricBathymetry.h:67
Definition ParametricBathymetry.h:129
double headingRad
Region axis heading [rad].
Definition ParametricBathymetry.h:130
double min
Interval lower bound along the region axis [m].
Definition ParametricBathymetry.h:131
double max
Interval upper bound along the region axis [m].
Definition ParametricBathymetry.h:132
Window window
Edge profile.
Definition ParametricBathymetry.h:133
double falloff
Transition band width [m].
Definition ParametricBathymetry.h:134
One along-track segment: a length and the cross-track profile it presents.
Definition ParametricBathymetry.h:147
Feature profile
Cross-track seabed profile for this segment.
Definition ParametricBathymetry.h:149
double length
Along-track extent [m].
Definition ParametricBathymetry.h:148
Definition ParametricBathymetry.h:172
double rho
Constant seabed density [kg/m^3].
Definition ParametricBathymetry.h:174
Track track
Optional along-track profile sequence.
Definition ParametricBathymetry.h:175
double baseDepth
Fallback depth where nothing else applies [m].
Definition ParametricBathymetry.h:173
std::vector< Layer > layers
Optional general composition layers (applied after the track).
Definition ParametricBathymetry.h:176
Definition ParametricBathymetry.h:161
double transitionWidth
Cross-fade width [m].
Definition ParametricBathymetry.h:165
std::vector< Segment > segments
Ordered segments.
Definition ParametricBathymetry.h:167
double start
Along-track position of the first segment [m].
Definition ParametricBathymetry.h:164
double headingRad
Track heading [rad], North toward East.
Definition ParametricBathymetry.h:163
bool present
Whether a track is configured.
Definition ParametricBathymetry.h:162
Window transition
Cross-fade edge profile.
Definition ParametricBathymetry.h:166