FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
visual::VisualSettings Class Reference

#include <VisualSettings.h>

+ Collaboration diagram for visual::VisualSettings:

Public Types

enum  VisualQuality { Fast , Fair , Nice }
 Visual quality levels. More...
 

Public Member Functions

VisualQuality QualityFromInt (int quality)
 
 VisualSettings (ISimObjectCreator *creator, const environment::EnvironmentConfig &config)
 
std::string OceanMaterial ()
 
std::string OceansidesMaterial ()
 
std::string SeafloorMaterial ()
 
bool OceanVertexshaderUsesTime ()
 
SkyMaterialSpec SkySpec ()
 

Public Attributes

std::shared_ptr< marenv::wave::WaveField > waves
 Wave field for rendering.
 
std::shared_ptr< marenv::seafloor::BathymetryWaves > bathymetry
 Sum-of-sines bathymetry (the GPU seabed; also the seabed for the "SumOfSines" model)
 
std::shared_ptr< marenv::seafloor::BathymetryField > visualSeafloor
 
double seafloorMinDepth = 0.0
 Minimum seabed depth over the visual domain [m] (sampled around domain.centre from the seabed the picture shows).
 
double seafloorMaxDepth = 0.0
 Maximum seabed depth over the visual domain [m] (sampled around domain.centre from the seabed the picture shows).
 
bool visualizeWaves = false
 Enable wave visualization.
 
std::vector< int > vertexCounts = {100, 130}
 Vertex counts [u, v].
 
bool seafloorAsMesh = false
 Whether the seabed is drawn as a sampled mesh (true) or by the projected shader (false); from Visual.SeafloorMode (Visual.SeafloorMode).
 
VisualDomain domain
 The visual domain, read once (Visual.WorldRadius, Bathymetry.VisualExtent, Bathymetry.VisualCenter, Bathymetry.VisualVertices).
 
double worldRadius = 1000.0
 World rendering radius [m]; domain.worldRadius.
 
int visualQuality
 Visual quality level.
 

Detailed Description

The visual settings of the Environment: quality, sky, materials, the visual domain and the seabed the picture shows.

Reads the Visual.* parameters, and takes the waves and the seabeds from the physics set-up (environment::EnvironmentConfig), which it does not change.

Member Enumeration Documentation

◆ VisualQuality

Enumerator
Fast 

Fast rendering (low quality)

Fair 

Fair rendering (medium quality)

Nice 

Nice rendering (high quality)

Constructor & Destructor Documentation

◆ VisualSettings()

visual::VisualSettings::VisualSettings ( ISimObjectCreator *  creator,
const environment::EnvironmentConfig &  config 
)

Construct the visual settings.

Parameters
[in]creatorPointer to object creator.
[in]configThe physics set-up, already built from the same creator.

Member Function Documentation

◆ OceanMaterial()

std::string visual::VisualSettings::OceanMaterial ( )

Get ocean material name.

Returns
Material string.

◆ OceansidesMaterial()

std::string visual::VisualSettings::OceansidesMaterial ( )

Get ocean sides material name.

Returns
Material string.

◆ OceanVertexshaderUsesTime()

bool visual::VisualSettings::OceanVertexshaderUsesTime ( )

Check if ocean vertex shader uses time.

Returns
True if time-based animation.

◆ QualityFromInt()

VisualQuality visual::VisualSettings::QualityFromInt ( int  quality)

Convert integer to visual quality.

Parameters
[in]qualityInteger quality value [0-10].
Returns
VisualQuality enum.

◆ SeafloorMaterial()

std::string visual::VisualSettings::SeafloorMaterial ( )

Get seafloor material name.

Returns
Material string.

◆ SkySpec()

SkyMaterialSpec visual::VisualSettings::SkySpec ( )

Get sky specification.

Returns
SkyMaterialSpec struct.

Member Data Documentation

◆ visualSeafloor

std::shared_ptr<marenv::seafloor::BathymetryField> visual::VisualSettings::visualSeafloor

The seabed the picture shows: EnvironmentConfig::seafloor, except for a NetCDF seabed in a visual build, where it is a copy with terrain over the land cells (owner ruling D18, seeded from RandomSeed). Never used for physics.


The documentation for this class was generated from the following file: