XII Release 0.1.0
Loading...
Searching...
No Matches
xiiParticleSystemDescriptor Struct Reference

Runtime descriptor for large GPU particle simulations. More...

#include <ParticleSystem.h>

Public Member Functions

XII_ALWAYS_INLINE xiiVec3 GetLocalBoundsCenter () const
 Returns the center of the local bounding volume.
XII_ALWAYS_INLINE void SetLocalBoundsCenter (xiiVec3 vCenter)
 Sets the center of the local bounding volume. This should be set to the expected center of the particle distribution in the system's local space (e.g., the emitter position) for best culling performance, but may be overridden by the particle graph if it has specific requirements for the bounding volume.
XII_ALWAYS_INLINE xiiVec3 GetLocalBoundsHalfExtents () const
 Returns the half extents of the local bounding box. This should be set to a tight fit around the expected particle distribution in the system's local space for best culling performance, but may be overridden by the particle graph if it has specific requirements for the bounding volume (e.g., if GPUCulling is enabled, the graph may automatically update the bounds based on particle behavior).
XII_ALWAYS_INLINE void SetLocalBoundsHalfExtents (xiiVec3 vHalfExtents)
 Sets the half extents of the local bounding box. This should be set to a tight fit around the expected particle distribution in the system's local space for best culling performance, but may be overridden by the particle graph if it has specific requirements for the bounding volume (e.g., if GPUCulling is enabled, the graph may automatically update the bounds based on particle behavior). The sphere radius is automatically updated to encompass the box, so it is not necessary to set it separately unless you want a different value for specific use cases (e.g., using a larger sphere radius for effects with long trails or fast-moving particles).
XII_ALWAYS_INLINE float GetLocalBoundsRadius () const
 Returns the radius of the local bounding sphere. This should be set to a value that encompasses the expected particle distribution in the system's local space for best culling performance, but may be overridden by the particle graph if it has specific requirements for the bounding volume (e.g., if GPUCulling is enabled, the graph may automatically update the bounds based on particle behavior).
XII_ALWAYS_INLINE void SetLocalBoundsRadius (float fRadius)
 Sets the radius of the local bounding sphere. This should be set to a value that encompasses the expected particle distribution in the system's local space for best culling performance, but may be overridden by the particle graph if it has specific requirements for the bounding volume (e.g., if GPUCulling is enabled, the graph may automatically update the bounds based on particle behavior). The box half extents are automatically updated to encompass the sphere, so it is not necessary to set them separately unless you want different values for specific use cases (e.g., using a larger box for effects with long trails or fast-moving particles).
void Save (xiiStreamWriter &ref_stream) const
void Load (xiiStreamReader &ref_stream)

Public Attributes

xiiParticleGraphResourceHandle m_hGraph
 Handle to the particle graph resource that defines the behavior of this particle system. The graph's descriptor contains all the necessary information about the emitters, simulation logic, and rendering techniques used by the system.
xiiEnum< xiiParticleSimulationSpace > m_SimulationSpace
 The simulation space in which particle data is represented and updated. This affects how particle positions and velocities are interpreted and how the system's transform is used for simulation.
xiiBitflags< xiiParticleSystemFlags > m_Flags
 Feature flags that control various aspects of the particle system's behavior, including runtime allocation, pass scheduling, and supported features. These flags can enable or disable specific capabilities of the particle system, allowing for flexible configuration based on the needs of the effect being created.
xiiBoundingBoxSphere m_LocalBounds = xiiBoundingBoxSphere::MakeZero()
 The local bounding volume that encompasses all particles in their default state (e.g., at spawn with no velocity). This is used for culling and other optimizations, and should be set to a tight fit around the expected particle distribution for best performance. The exact semantics of this bounding volume (e.g., whether it's automatically updated based on particle behavior) are defined by the particle graph and may depend on the enabled features (e.g., GPUCulling).
xiiUInt32 m_uiMaxParticles = xiiParticleSystemConstants::s_uiDefaultMaxParticles
 The maximum number of particles that can be alive in the system at any given time. This is used for allocating GPU buffers and for determining how many particles to process in simulation and rendering passes. The exact semantics of this limit (e.g., whether it's a hard cap or can be exceeded with performance consequences) are defined by the particle graph and may depend on the enabled features (e.g., GPUDriven).
xiiUInt32 m_uiMaxEmitters = xiiParticleSystemConstants::s_uiDefaultMaxEmitters
 The maximum number of emitters that can be active in the system at any given time. This is used for allocating GPU buffers and for determining how many emitters to process in simulation passes. The exact semantics of this limit (e.g., whether it's a hard cap or can be exceeded with performance consequences) are defined by the particle graph and may depend on the enabled features (e.g., GPUDriven).
xiiUInt32 m_uiMaxEvents = xiiParticleSystemConstants::s_uiDefaultMaxEvents
 The maximum number of events that can be emitted in the system at any given time. This is used for allocating GPU buffers and for determining how many events to process in simulation passes. The exact semantics of this limit (e.g., whether it's a hard cap or can be exceeded with performance consequences) are defined by the particle graph and may depend on the enabled features (e.g., EnableEvents).
xiiUInt32 m_uiMaxNeighborPairs = 0U
 The maximum number of neighbor pairs that can be generated in the system at any given time. This is used for allocating GPU buffers and for determining how many pairs to process in simulation passes when neighbor searching is enabled. The exact semantics of this limit (e.g., whether it's a hard cap or can be exceeded with performance consequences) are defined by the particle graph and may depend on the enabled features (e.g., NeighborSearch).
xiiUInt32 m_uiRandomSeed = 0U
 The random seed used for any stochastic behavior in the particle graph. This can be set to a specific value for deterministic behavior or left at the default for more varied results. The exact semantics of this seed (e.g., how it's used in the graph and whether it affects all random operations) are defined by the particle graph and may depend on the enabled features (e.g., Deterministic).
xiiUInt8 m_uiMaxSubSteps = 1U
 The maximum number of sub-steps to perform in a single frame when the fixed time step is exceeded. This can help to maintain stable simulations at low frame rates, but may increase GPU workload and latency. The exact semantics of this limit (e.g., whether it's a hard cap or can be exceeded with performance consequences) are defined by the particle graph and may depend on the enabled features (e.g., Deterministic).
float m_fFixedTimeStep = 1.0f / 60.0f
 The fixed time step to use for the simulation when sub-stepping is necessary. This can help to maintain stable simulations at low frame rates, but may increase GPU workload and latency. The exact semantics of this time step (e.g., how it's applied in the graph and whether it affects all simulation logic) are defined by the particle graph and may depend on the enabled features (e.g., Deterministic).
float m_fNeighborCellSize = 1.0f
 The cell size to use for spatial partitioning when GPU-based neighbor searching is enabled. This affects the performance and accuracy of neighbor searches, and should be set based on the expected particle distribution and interaction radius. The exact semantics of this cell size (e.g., how it's used in the graph and whether it can be changed at runtime) are defined by the particle graph and may depend on the enabled features (e.g., NeighborSearch).
bool m_bAlwaysVisible = false
 Whether the system should be considered always visible for rendering and culling purposes, which can be useful for certain types of effects (e.g., screen-space effects or those that are meant to be visible regardless of distance), but may reduce performance by preventing culling optimizations. The exact semantics of this flag (e.g., whether it overrides all culling or can be combined with other visibility settings) are defined by the particle graph and may depend on the enabled features (e.g., GPUCulling).

Detailed Description

Runtime descriptor for large GPU particle simulations.


The documentation for this struct was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/GraphicsCore/Particles/ParticleSystem.h
  • /home/runner/work/XII/XII/Source/Engine/GraphicsCore/Particles/Implementation/ParticleSystem.cpp