This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm (Experimental)
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine.PhysicalWater Class

Inherits: 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.
set
Sets a velocity of the flow in physical water.
set value - Velocity in units per second.

vec3 Size#

The current size of the physical water node.
set
Sets a size of the physical water node.
set value - Water box size in units.

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.
set
Sets a value indicating how much the linear velocity of the objects decreases when they get into the physical water.
set value - Linear damping value. If a negative value is provided, 0 will be used instead.

float Density#

The current density of the physical water that determines objects buoyancy.
set
Sets a density of the water that determines objects buoyancy.
set value - Density value. If a negative value is provided, 0 will be used instead.

float AngularDamping#

The current value indicating how much the angular velocity of the objects decreases when they get into the physical water.
set
Sets a value indicating how much the angular velocity of the objects decreases when they get into the physical water.
set value - Angular damping value. If a negative value is provided, 0 will be used instead.

Members


static 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: 2020-11-24
Build: ()