This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
VR Development
Двойная точность координат
API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-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
Учебные материалы
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::ParticlesFieldDeflector Class

Header: #include <UnigineParticlesFields.h>
Inherits from: ParticlesField

This class represents a deflector for particles generated by Particle Systems. Deflector is a surface field that has no visual representation, but physically interacts with particle systems (other objects are not affected) blocking the way for particles and making them bounce off the deflector's surface. Depending on the specified size, it can be either rectangular or square, plus it can be arbitrarily positioned or rotated to cover the necessary area.

Deflectors are one-sided, meaning the particles can freely penetrate them through one side, and interact only with the opposite one, for example, when falling on it from above.

ParticlesFieldDeflector Class

Members


ParticlesFieldDeflector ( ) #

Constructor. Creates a new Particles Field Deflector with default parameters.

ParticlesFieldDeflector ( const Math::vec2 & size ) #

Constructor. Creates a new Particles Field Deflector of the specified size.

Arguments

  • const Math::vec2 & size - Size of the Particles Field Deflector along the X and Y axes, in units.

static int type ( ) #

Returns the type of the Particles Field Deflector node.

Return value

ParticlesFieldDeflector type identifier.

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

Sets a new size of the Particles Field Deflector along the X and Y axes. Deflectors are represented as planes.

Arguments

  • const Math::vec2 & size - New size of the Particles Field Deflector along the X and Y axes to be set in units.

Math::vec2 getSize ( ) const#

Returns the current size of the Particles Field Deflector along the X and Y axes. Deflectors are represented as planes.

Return value

Current size of the Particles Field Deflector along the X and Y axes.

void setRoughness ( float roughness ) #

Sets a new roughness coefficient for the Particles Field Deflector. This coefficient defines roughness of the deflector surface the particles collide with, and the range of angles at which particles shall bounce from the deflector.

Arguments

  • float roughness - New roughness coefficient for the deflector:
    • The minimum value of 0 means the surface is smooth and bouncing particles are scattered in a uniform direction.
    • The maximum value of 1 means the surface is uneven and bouncing particles are scattered in different directions.

float getRoughness ( ) const#

Returns the current roughness coefficient for the Particles Field Deflector. This coefficient defines roughness of the deflector surface the particles collide with, and the range of angles at which particles shall bounce from the deflector.

Return value

Current roughness coefficient of the deflector:
  • The minimum value of 0 means the surface is smooth and bouncing particles are scattered in a uniform direction.
  • The maximum value of 1 means the surface is uneven and bouncing particles are scattered in different directions.

void setRestitution ( float restitution ) #

Sets a new restitution coefficient for the Particles Field Deflector. This coefficient defines the value of the bouncing impulse a particle will receive on a contact with the deflector (how fast a particle shall bounce from the deflector).

Arguments

  • float restitution - New restitution coefficient for the deflector:
    • The minimum value of 0 means the particles do not bounce off, but rather slide along deflector surface.
    • The maximum value of 1 makes the angle of bouncing equal to the angle at which the particles fall.

float getRestitution ( ) const#

Returns the current restitution coefficient for the Particles Field Deflector. This coefficient defines the value of the bouncing impulse a particle will receive on a contact with the deflector (how fast a particle shall bounce from the deflector).

Return value

Current restitution coefficient of the deflector:
  • The minimum value of 0 means the particles do not bounce off, but rather slide along deflector surface.
  • The maximum value of 1 makes the angle of bouncing equal to the angle at which the particles fall.
Last update: 19.12.2023
Build: ()