Role of main particle classes

Overview

This page describes the role of classes used for particles under gfx that are not shared in common with 3D models.

The class name.
Overview
ParticleModel Node for collecting the shapes or other attributes of particles.
ParticleSet ParticleModel child. Represents a group of particles corresponding to a single chape. This takes aup a significant portion of the processing related to particles.
ParticleEmitter The source of particle emissions. ParticleEmitter oversees emission only. Particles are registered in ParticleSet, so particle information is not managed by ParticleEmitter.

These three classes are derived from SceneObject.
ParticleModel and ParticleEmitter are also in the TransformNode class.
ParticleSet is not TransformNode.

Calculations are carried out centered on ParticleSet.

Just as with regular 3D models, rendering is carried out on ResMesh under ParticleModel.

ParticleCollection

One instance of ParticleSet is always maintained. This class manages information about particles.

Particle information is divided into two types: parameters representing fixed values for all particles inside ParticleSet and streams that can change for each individual particle.

In addition, separate from this classification, some information is used to set values for the GPU and some information is used only in CPU calculations. ParticleCollection can be used without conscious awareness of this difference.
Representing VBO, the CPU stream is double buffered in the library. Which surface must therefore be specified when getting information. Although the same API can be used to get information in the case of a stream for the CPU only, double-buffering is not performed and the same value (pointer) will be obtained regardless of the surface.

VBO double buffer

The VBO uses double-buffering internally so that calculation processes and rendering processes for particles can be executed in parallel.
Buffers are automatically switched inside ParticleSet::UpdateParticles called from ParticleSceneUpdater::UpdateNode.


CONFIDENTIAL