This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Basics
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
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
Animations-Related Classes
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
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Unigine.PhysicalWater Class

Inherits from: Physical

A PhysicalWater class is used to simulate water interaction effects.

Notice
The water will affect only objects, to which a cloth body or a rigid body are assigned. If the rigid body is used, a shape should be also assigned.

See Also#

  • An article on Physical Water
  • A set of samples located in the <UnigineSDK>/data/samples/physicals folder:
    1. water_00
    2. water_01

PhysicalWater Class

Properties

vec3 Velocity#

The current velocity of the flow in physical water.

vec3 Size#

The current size of the physical water node.

int NumContacts#

The number of contacts between the physical water and the objects.

float LinearDamping#

The current value indicating how much the linear velocity of the objects decreases when they get into the physical water.

float Density#

The current density of the physical water that determines objects buoyancy.

float AngularDamping#

The current value indicating how much the angular velocity of the objects decreases when they get into the physical water.

Members


PhysicalWater ( vec3 size ) #

Constructor. Creates a physical water node of the specified size.

Arguments

  • vec3 size - Water box size in units.

Body GetContactBody ( int num ) #

Returns the body of the object by the given contact with physical water.

Arguments

  • int num - Contact number.

Return value

Body of the object.

float GetContactDepth ( int num ) #

Returns the depth of the object submergence by the given contact.

Arguments

  • int num - Contact number.

Return value

Depth of object submergence in units.

vec3 GetContactForce ( int num ) #

Returns the force in the point of a given contact.

Arguments

  • int num - Contact number.

Return value

Force value.

vec3 GetContactPoint ( int num ) #

Returns the coordinates of the contact point.

Arguments

  • int num - Contact number.

Return value

Contact point coordinates.

vec3 GetContactVelocity ( int num ) #

Returns the relative velocity between the object and the physical water.

Arguments

  • int num - Contact number.

Return value

Relative velocity in units per second.

static int type ( ) #

Returns the type of the node.

Return value

Physical type identifier.
Last update: 2019-12-25
Build: ()