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
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
Учебные материалы

Unigine.ParticleModifier Class

This is a base class for particle system modifiers. These modifiers are used to control how various parameters of particle systems (such as direction, radius, positions, etc.) change over the particle's lifetime.

There are two types of modifiers available:

  • Scalar - used for scalar parameters (radius, velocity, etc.). The majority of particle system modifiers belong to this type.
  • Vector - used for vector parameters (direction, position, etc.)

ParticleModifier Class

Перечисления (Enums)

TYPE#

Type of the modifier. Defines the type of value controlled by the modifier.
ИмяОписание
PARTICLE_MODIFIER_SCALAR = 0In this mode the modifier controls a single scalar value via a single curve.
PARTICLE_MODIFIER_VECTOR = 1In this mode the modifier controls a vector of up to 4 values via a set of curves.

MODE#

Mode of the modifier. Defines how the controlled value is set.
ИмяОписание
CONSTANT = 0In this mode the specified value is fixed throughout the lifetime.
RANDOM_BETWEEN_TWO_CONSTANTS = 1In this mode two constants define the upper and lower limits for the value. The actual value changes randomly over time between these limits.
CURVE = 2In this mode the modifier controls each value via a single curve.
RANDOM_BETWEEN_TWO_CURVES = 3In this mode two curves define the upper and lower limits for the value at each point of the lifetime. The actual value changes randomly over time between these limits.
NUM_MODES = 4Number of particle modifier's modes.

Properties

ParticleModifier.MODE Mode#

The current mode of the particle modifier. the mode defines how the controlled value is set. you can switch modes at any time.

ParticleModifier.TYPE Type#

The type of the particle modifier.

bool IsSignedValues#

The A value indicating whether the value(s) controlled by the modifier are signed or unsigned.

Members


bool SaveState ( Stream stream ) #

Saves the current modifier state to the specified stream.

Saving into the stream requires creating a blob to save into. To restore the saved state the RestoreState() method is used:

Source code (C#)
// initialize a node and set its state
//...//

// save state
Blob blob_state = new Blob();
particlemodifier.SaveState(blob_state);

// change the node state
//...//

// restore state
blob_state.SeekSet(0);	// returning the carriage to the start of the blob
particlemodifier.RestoreState(blob_state);

Arguments

  • Stream stream - Stream to which the modifier's state is to be saved.

Return value

true if the state is saved successfully; otherwise, false.

bool RestoreState ( Stream stream ) #

Restores a previously saved state from the specified stream.

Restoring from the stream requires creating a blob to save into and saving the state using the SaveState() method:

Source code (C#)
// initialize a node and set its state
//...//

// save state
Blob blob_state = new Blob();
particlemodifier.SaveState(blob_state);

// change state
//...//

// restore state
blob_state.SeekSet(0);	// returning the carriage to the start of the blob
particlemodifier.RestoreState(blob_state);

Arguments

  • Stream stream - Stream from which the modifier's state is to be loaded.

Return value

true if the state is restored successfully; otherwise, false.

bool Save ( Xml xml ) #

Saves the modifier's state to the specified Xml node.

Arguments

  • Xml xml - Xml node to which the modifier's state is to be saved.

Return value

true if the state is saved successfully; otherwise, false.

bool Load ( Xml xml ) #

Loads a previously saved modifier's state from the specified Xml node.

Arguments

  • Xml xml - Xml node from which the modifier's state is to be loaded.

Return value

true if the state is loaded successfully; otherwise, false.

long GetSystemMemoryUsage ( ) #

Returns the total amount of memory used by the modifier.

Return value

Total amount of memory used by the modifier with all its keys, in bytes.
Last update: 13.12.2024
Build: ()