This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Unigine::Plugins::IG::Water Class

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Sim SDK edition to use it.
Header: #include <plugins/UnigineIG.h>

Water Class

Enums

BEAUFORT_CHANGE_TYPE#

Mode of transition between the current and target Beaufort wind force levels.
NameDescription
BEAUFORT_CHANGE_TYPE_DISCRETE = 0Beaufort wind force levels are switched discretely from current to target.
BEAUFORT_CHANGE_TYPE_CONTINUOUS = 1Smooth wind force transition between the current and target Beaufort levels is enabled.

Members


void setWaterNode ( const Ptr<ObjectWaterGlobal> & value ) #

Sets the Water Global object to be used.
Notice
The Water Global object is automatically found at the start of the project. Use this method only for dynamically created Water Global object.

Arguments

Ptr<ObjectWaterGlobal> getWaterNode ( ) const#

Returns the currently used Water Global object.

Return value

Water Global object.

void setSeaLevel ( double level ) #

Sets the height of the sea level in world coordinates.

Arguments

  • double level - Sea level height, in meters.

double getSeaLevel ( ) const#

Returns the current height of the sea level in world coordinates.

Return value

Sea level height, in meters.

void setSeaLevelSmoothBySpeed ( double unit_per_sec ) #

Sets the mode of smooth gradual change of the height of the sea level by the specified rate (in meters per second). The height of the sea level changes gradually from the current to target value by the specified value during each second, such smoothing is performed to make changes more realistic. Moreover, each value can be changed with its own rate (the rain starting fast with a slowly changing cloud coverage). This method fits best when the difference between the target and current value is either too big (e.g. visibility distance change from 10m to 1km) or too small (e.g. from 1m to 1.05m), avoiding too fast or too slow changes. For other cases you can also choose another mode "by time" to change the value from the current to target during the specified time interval via the setSeaLevelSmoothByTime().

Arguments

  • double unit_per_sec - Constant rate (in meters per second) with which the value gradually changes from the current to target.

void setSeaLevelSmoothByTime ( float sec ) #

Sets the mode of smooth gradual change of the height of the sea level by the specified time interval. The barometric pressure changes gradually from the current to target value during this interval, such smoothing is performed to make changes more realistic. Moreover, each value can be changed with its own rate (the rain starting fast with a slowly changing cloud coverage). When the value of 0 is set, the value changes instantly. If the difference between the target and current value is too big (e.g. visibility distance change from 10m to 1km), the changes in this mode may be too fast and too noticeable, or on the contrary they might be too slow if the difference is too small (e.g. from 1m to 1.05m). In this case you can choose another mode to change the value with a specified rate via the setSeaLevelSmoothBySpeed().

Arguments

  • float sec - Time interval (in seconds) during which the value changes from the current to target.

void setClarity ( float value ) #

Sets the clarity of water.

Arguments

  • float value - Water clarity from 0 (unclear) to 1 (clear).

float getClarity ( ) const#

Returns the current clarity of water.

Return value

Water clarity from 0 to 1.

void setClaritySmoothBySpeed ( float unit_per_sec ) #

Sets the mode of smooth gradual change of the water clarity by the specified rate (in units per second). The water clarity changes gradually from the current to target value by the specified value during each second, such smoothing is performed to make changes more realistic. Moreover, each value can be changed with its own rate (the rain starting fast with a slowly changing cloud coverage). This method fits best when the difference between the target and current value is either too big (e.g. visibility distance change from 10m to 1km) or too small (e.g. from 1m to 1.05m), avoiding too fast or too slow changes. For other cases you can also choose another mode "by time" to change the value from the current to target during the specified time interval via the setClaritySmoothByTime().

Arguments

  • float unit_per_sec - Constant rate (in units per second) with which the value gradually changes from the current to target.

void setClaritySmoothByTime ( float sec ) #

Sets the mode of smooth gradual change of the water clarity by the specified time interval. The water clarity changes gradually from the current to target value during this interval, such smoothing is performed to make changes more realistic. Moreover, each value can be changed with its own rate (the rain starting fast with a slowly changing cloud coverage). When the value of 0 is set, the value changes instantly. If the difference between the target and current value is too big (e.g. visibility distance change from 10m to 1km), the changes in this mode may be too fast and too noticeable, or on the contrary they might be too slow if the difference is too small (e.g. from 1m to 1.05m). In this case you can choose another mode to change the value with a specified rate via the setClaritySmoothBySpeed().

Arguments

  • float sec - Time interval (in seconds) during which the value changes from the current to target.

void setBeaufortChangeType ( Water::BEAUFORT_CHANGE_TYPE type ) #

Sets the type of transition between the current and target Beaufort wind force levels.

Arguments

Water::BEAUFORT_CHANGE_TYPE getBeaufortChangeType ( ) const#

Returns the current type of transition between the current and target Beaufort wind force levels.

Return value

Current type of transition between the current and target Beaufort wind force levels.

void setBeaufort ( float beaufort ) #

Sets the current Beaufort wind force level from 0(Calm) to 12(Hurricane).

Arguments

  • float beaufort - New Beaufort wind force level from 0(Calm) to 12(Hurricane).

float getBeaufort ( ) const#

Returns the current Beaufort wind force level from 0(Calm) to 12(Hurricane).

Return value

Current Beaufort wind force level from 0(Calm) to 12(Hurricane).

void setBeaufortSmoothBySpeed ( float unit_per_sec ) #

Sets the mode of smooth gradual change of the Beaufort wind force level by the specified rate (in levels per second). The Beaufort wind force level changes gradually from the current to target value by the specified value during each second, such smoothing is performed to make changes more realistic. Moreover, each value can be changed with its own rate (the rain starting fast with a slowly changing cloud coverage). This method fits best when the difference between the target and current value is either too big (e.g. visibility distance change from 10m to 1km) or too small (e.g. from 1m to 1.05m), avoiding too fast or too slow changes. For other cases you can also choose another mode "by time" to change the value from the current to target during the specified time interval via the setBeaufortSmoothByTime().

Arguments

  • float unit_per_sec - Constant rate (in levels per second) with which the value gradually changes from the current to target.

void setBeaufortSmoothByTime ( float sec ) #

Sets the mode of smooth gradual change of the Beaufort wind force level by the specified time interval. The water Beaufort wind force level changes gradually from the current to target value during this interval, such smoothing is performed to make changes more realistic. Moreover, each value can be changed with its own rate (the rain starting fast with a slowly changing cloud coverage). When the value of 0 is set, the value changes instantly. If the difference between the target and current value is too big (e.g. visibility distance change from 10m to 1km), the changes in this mode may be too fast and too noticeable, or on the contrary they might be too slow if the difference is too small (e.g. from 1m to 1.05m). In this case you can choose another mode to change the value with a specified rate via the setBeaufortSmoothBySpeed().

Arguments

  • float sec - Time interval (in seconds) during which the value changes from the current to target.

void setWindDirection ( float direction ) #

Sets a new wind direction angle relative to North.

Arguments

  • float direction - Wind direction angle relative to North, in degrees.

float getWindDirection ( ) const#

Returns the current wind direction angle relative to North.

Return value

Current wind direction angle relative to North, in degrees.

void setWhitecap ( float whitecap ) #

Sets the foam intensity for white caps on the water surface.

Arguments

  • float whitecap - Foam intensity for white caps on the water surface in the [0, 1] range.

float getWhitecap ( ) const#

Returns the current foam intensity for white caps on the water surface.

Return value

Current foam intensity for white caps on the water surface in the [0, 1] range.

void setWhitecapSmoothBySpeed ( float unit_per_sec ) #

Sets the mode of smooth gradual change of the foam intensity for white caps on the water surface by the specified rate (in units per second). The foam intensity for white caps on the water surface changes gradually from the current to target value by the specified value during each second, such smoothing is performed to make changes more realistic. Moreover, each value can be changed with its own rate (the rain starting fast with a slowly changing cloud coverage). This method fits best when the difference between the target and current value is either too big (e.g. visibility distance change from 10m to 1km) or too small (e.g. from 1m to 1.05m), avoiding too fast or too slow changes. For other cases you can also choose another mode "by time" to change the value from the current to target during the specified time interval via the setWhitecapSmoothByTime().

Arguments

  • float unit_per_sec - Constant rate (in units per second) with which the value gradually changes from the current to target.

void setWhitecapSmoothByTime ( float sec ) #

Sets the mode of smooth gradual change of the foam intensity for white caps on the water surface by the specified time interval. The white caps on the water surface change gradually from the current to target value during this interval, such smoothing is performed to make changes more realistic. Moreover, each value can be changed with its own rate (the rain starting fast with a slowly changing cloud coverage). When the value of 0 is set, the value changes instantly. If the difference between the target and current value is too big (e.g. visibility distance change from 10m to 1km), the changes in this mode may be too fast and too noticeable, or on the contrary they might be too slow if the difference is too small (e.g. from 1m to 1.05m). In this case you can choose another mode to change the value with a specified rate via the setWhitecapSmoothBySpeed().

Arguments

  • float sec - Time interval (in seconds) during which the value changes from the current to target.

void updateAllShorelines ( ) #

Forced shoreline update (affects all FieldShoreline nodes).
Last update: 2021-12-13
Build: ()