This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
VR Development
双精度坐标
应用程序接口
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
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::ParticlesField Class

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

This is a base class for all Particles Fields and incorporates their common characteristics. ParticlesFieldSpacer and ParticlesFieldDeflector classes derive from it.

Particles Fields can be used to cut particles out from a certain volume (spacer-fields that can be used, for example, to avoid rendering of rain inside a car) or to deflect particles making them bounce from the field's surface (deflector).

A Particles Fields will affect a Particles System only if they interact with each other. You can control interaction of fields and particles via a separate mask (Particles Field). You can also switch between interaction modes to choose if particles should interact on a contact of the field either with particle's center position or with its bounding box.

ParticlesField Class

Enums

INTERACT_PARTICLE_MODE#

Interaction modes for the Particles Field.
Name说明/描 述
INTERACT_PARTICLE_MODE_POSITION = 0Position mode. Interaction between the Particles Field and a particle takes place if the position of the particle's center comes into contact (intersection) with the field (its volume or surface in case of a deflector field).
INTERACT_PARTICLE_MODE_BOUND = 1Bound mode. Interaction between the Particles Field and a particle takes place if the bounding box of the particle comes into contact (intersection) with the field (its volume or surface in case of a deflector field).
NUM_INTERACT_PARTICLE_MODES = 2Number of interaction modes for Particles Fields.

Members


void setInteractParticleMode ( ParticlesField::INTERACT_PARTICLE_MODE mode ) #

Sets a new interaction mode for the Particles Field. Interaction can be triggered on a contact of the field either with particle's center position or with its bounding box.

Arguments

ParticlesField::INTERACT_PARTICLE_MODE getInteractParticleMode ( ) const#

Returns the current interaction mode for the Particles Field. Interaction can be triggered on a contact of the field either with particle's center position or with its bounding box.

Return value

Current interaction mode of the Particles Field. One of the INTERACT_PARTICLE_MODE* values.

void setParticlesFieldMask ( int mask ) #

Sets a new Particles Field bit mask enabling you to control interactions with particles. The Particles Field will interact with a Particles System if they both have matching Particles Field masks (one bit at least).

Arguments

  • int mask - New mask to be set for the field. Integer, each bit of which is a mask.

int getParticlesFieldMask ( ) const#

Returns the current Particles Field bit mask enabling you to control interactions with particles. The Particles Field will interact with a Particles System if they both have matching Particles Field masks (one bit at least).

Return value

Current mask of the field. Integer, each bit of which is a mask.

void setViewportMask ( int mask ) #

Sets a new Viewport mask enabling you to control rendering of the field. The Particles Field will be rendered in the viewport if it has a matching Viewport mask (one bit at least).

Arguments

  • int mask - New Viewport mask to be set for the field. Integer, each bit of which is a mask.

int getViewportMask ( ) const#

Returns the current Viewport mask enabling you to control rendering of the field. The Particles Field will be rendered in the viewport if it has a matching Viewport mask (one bit at least).

Return value

Current Viewport mask of the field. Integer, each bit of which is a mask.
Last update: 2023-12-19
Build: ()