This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Режимы вывода изображения
Физика
Браузер SDK 2
Лицензирование и типы лицензий
Дополнения (Add-Ons)
Демонстрационные проекты
API Samples
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
Унифицированный язык шейдеров UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
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
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Unigine::PhysicalWater Class

Header: #include <UniginePhysicals.h>
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

Members


static PhysicalWaterPtr create ( const Math::vec3 & size ) #

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

Arguments

  • const Math::vec3 & size - Water box size in units.

void setAngularDamping ( float damping ) #

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

Arguments

  • float damping - An angular damping value. If a negative value is provided, 0 will be used instead.

float getAngularDamping ( ) #

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

Return value

The angular damping value.

Ptr<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.

Math::vec3 getContactForce ( int num ) #

Returns the force in the point of a given contact.

Arguments

  • int num - Contact number.

Return value

Force value.

Math::Vec3 getContactPoint ( int num ) #

Returns the coordinates of the contact point.

Arguments

  • int num - Contact number.

Return value

Contact point coordinates.

Math::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.

void setDensity ( float density ) #

Sets a density of the water that determines objects buoyancy.

Arguments

  • float density - A density value. If a negative value is provided, 0 will be used instead.

float getDensity ( ) #

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

Return value

The density value.

void setLinearDamping ( float damping ) #

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

Arguments

  • float damping - A linear damping value. If a negative value is provided, 0 will be used instead.

float getLinearDamping ( ) #

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

Return value

The linear damping value.

int getNumContacts ( ) #

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

Return value

Number of contacts.

void setSize ( const Math::vec3 & size ) #

Sets a size of the physical water node.

Arguments

  • const Math::vec3 & size - A size of the water box in units. If a negative value is provided, 0 will be used instead.

Math::vec3 getSize ( ) #

Returns the current size of the physical water node.

Return value

The size of the water box in units.

void setVelocity ( const Math::vec3 & velocity ) #

Sets a velocity of the flow in physical water.

Arguments

  • const Math::vec3 & velocity - A velocity in units per second.

Math::vec3 getVelocity ( ) #

Returns the current velocity of the flow in physical water.

Return value

The velocity in units per second.

static int type ( ) #

Returns the type of the node.

Return value

Physical type identifier.
Last update: 16.08.2024
Build: ()