|
Marine systems simulation
|
#include <Environment.h>
Inheritance diagram for marenv::Environment:
Collaboration diagram for marenv::Environment:Classes | |
| struct | EnvironmentQuery |
| Struct for containing the data for a environment query. More... | |
Public Member Functions | |
| virtual | ~Environment ()=0 |
| Virtual destructor. | |
| virtual Status | GetSubmergence (double time, const double pos[3], double &submergence)=0 |
| virtual Status | GetSurfaceElevation (double time, const double pos[2], double &elevationOut)=0 |
| virtual Status | GetSurfaceUnitNormal (double time, const double pos[2], double unitNormalOut[3])=0 |
| virtual Status | GetParticleVelocity (double time, const double pos[3], double velOut[3])=0 |
| virtual Status | GetParticleAcceleration (double time, const double pos[3], double accOut[3])=0 |
| virtual Status | GetDynamicPressure (double time, const double pos[3], double &pressureOut)=0 |
| virtual Status | GetTotalPressure (double time, const double pos[3], double &pressureOut)=0 |
| virtual Status | GetSeaDepth (const double pos[2], double &depthOut)=0 |
| virtual Status | ComputeRayIntersection (const double origin[3], const double direction[3], double &distanceOut, double maxSearchDistance=100, double startSearchDistance=-1.0, double stepSize=1.0, double convergenceTolerance=0.01)=0 |
| virtual Status | GetCurrentVelocity (double time, const double pos[3], double velOut[3])=0 |
| virtual Status | GetDensity (double time, const double pos[3], double &density)=0 |
| virtual Status | PointEnvironmentQuery (double time, const double pos[3], EnvironmentQuery &queryResult)=0 |
Protected Member Functions | |
| Environment ()=default | |
| The constructor is protected. | |
Defines the public interface of an environment .
The role of an environment is to answer all requests for information about the simulated environment. It is supposed to be implemented by classes implementing all methods, typically by being composed by several other classes which implements different aspects of the environment. Such aspects are typically waves, currents, sea floor, wind and effects from e.g. ships in motion.
|
pure virtual |
Returns the distance a ray must travel before intercepting the seafloor.
| [in] | origin | Position (x,y,z) of the origin of the ray |
| [in] | direction | The unit direction (x,y,z) of the ray |
| [out] | distanceOut | The distance the beam travelled before reaching the seabed. |
| [in] | maxSearchDistance | The maximum distance from the origin to search for an intersection. |
| [in] | startSearchDistance | The distance from the origin to start searching for an intersection (initial guess). |
| [in] | stepSize | The search step size. |
| [in] | convergenceTolerance | The vertical error tolerance between a computed point on the ray and a point on the seafloor to consider an intersection found. |
Implemented in marenv::EnvironmentFacade.
|
pure virtual |
Returns the water current velocity at a specific position.
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y,z) for which the current velocity is desired. |
| [out] | velOut | The current velocity at pos. |
Includes effects of only currents, not waves.
|
pure virtual |
Returns the water density at a specific position
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y,z) for which the water current velocity producer is desired. |
| [out] | density | The water density at given position and time. |
Implemented in marenv::EnvironmentFacade.
|
pure virtual |
Returns the dynamic pressure at a specific position.
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y,z) for which the pressure is desired. |
| [out] | pressureOut | The pressure at pos. |
Implemented in marenv::EnvironmentFacade.
|
pure virtual |
Returns the particle acceleration at a specific position.
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y,z) for which the particle acceleration is desired. |
| [out] | accOut | The particle acceleration at pos. |
Includes effects of both current and waves.
|
pure virtual |
Returns the particle velocity at a specific position.
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y,z) for which the particle velocity is desired. |
| [out] | velOut | The particle velocity at pos. |
Includes effects of both current and waves.
|
pure virtual |
Returns the sea depth at a specific position.
| [in] | pos | Position (x,y) for which sea depth is desired. |
| [out] | depthOut | The sea depth at pos. |
Implemented in marenv::EnvironmentFacade.
|
pure virtual |
Calculates the submergence of a specific position.
| [in] | time | Time |
| [in] | pos | Position |
| [out] | submergence | The submergence of the position |
Implemented in marenv::EnvironmentFacade.
|
pure virtual |
Returns the surface elevation at a specific position.
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y) for which surface elevation is desired. |
| [out] | elevationOut | Surface elevation at pos. |
Implemented in marenv::EnvironmentFacade.
|
pure virtual |
Returns the unit normal vector of the surface at a specific position.
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y) for which the unit normal surface vector is desired. |
| [out] | unitNormalOut | The unit normal surface vector at pos. |
|
pure virtual |
Returns the total pressure at a specific position.
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y,z) for which the pressure is desired. |
| [out] | pressureOut | The pressure at pos. |
Includes both dynamic and static pressure.
Implemented in marenv::EnvironmentFacade.
|
pure virtual |
Calculates multiple properties of the environment in one call.
| [in] | time | Simulation time. |
| [in] | pos | Position. |
| [out] | queryResult | The result of the query. |
Implemented in marenv::EnvironmentFacade.