Open 3D Engine OpenParticleSystem Gem API Reference 26.05.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
OpenParticle::ParticleArchive Class Reference

#include <ParticleArchive.h>

Classes

struct  EmitterInfo
 

Public Member Functions

 AZ_TYPE_INFO (OpenParticle::ParticleArchive, "{585ed717-740d-46d2-ae19-d8dabbd5ddb7}")
 
void operator>> (const SimuCore::ParticleCore::ParticleSystem &system)
 
void operator<< (SimuCore::ParticleCore::ParticleSystem &system)
 
ParticleArchiveBegin (AZ::SerializeContext *context)
 
ParticleArchiveSystemConfig (const AZStd::any &val)
 
ParticleArchivePreWarm (const AZStd::any &val)
 
ParticleArchiveEmitterBegin (const AZStd::any &val)
 
ParticleArchiveRenderConfig (const AZStd::any &val)
 
ParticleArchiveMaterial (const AZ::Data::Asset< AZ::RPI::MaterialAsset > &asset)
 
ParticleArchiveModel (const AZ::Data::Asset< AZ::RPI::ModelAsset > &asset)
 
ParticleArchiveSkeletonModel (const AZ::Data::Asset< AZ::RPI::ModelAsset > &asset)
 
ParticleArchiveAddEffector (const AZStd::any &val)
 
ParticleArchiveEmitterEnd ()
 
ParticleArchiveMeshType (SimuCore::ParticleCore::MeshSampleType &type)
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Friends

class ParticleSystem
 

Detailed Description

ParticleArchive is responsible for storing (and fixing up after load) the runtime data for the particle systems. Instead of storing the objects using serialize, it memcpys the image of the data into a buffer, and then stores the offset into that buffer which they can be found. So for example, EmitterInfo below has a AZ::u32 member called m_config. This member is not the actual config, but represents the offset in the buffer that the memory image of a ParticleSystem::Config struct can be found. This implies that all data in all such objects must be essentially memcpyable. The >> operator can copy from a SimuCore::ParticleCore::ParticleSystem object into a ParticleArchive. The << operator copies the buffers from a ParticleArchive into a SimuCore::ParticleCore::ParticleSystem object Note that the ParticleSystem object uses these buffers in-place without unpacking them - it copies the buffers and the offset of the object in the buffer, then uses them in-place.


The documentation for this class was generated from the following file: