Class SnapshotParticleSystem
Namespace: ValveResourceFormat.Particles
Assembly: ValveResourceFormat.dll
Builds the particle system a .vsnap is previewed through: an ordinary definition that binds the snapshot to SnapshotParticleSystem.SnapshotControlPoint and reads every attribute it stores back out of it through C_INIT_InitFromCPSnapshot, one particle per snapshot element.
public static class SnapshotParticleSystemInheritance
object ← SnapshotParticleSystem
Fields
DefaultScreenSize
Default quad height, as a fraction of the viewport height.
public const float DefaultScreenSize = 0.004Field Value
float
ScreenSizeControlPoint
The control point whose X component carries the on-screen quad size, written by SnapshotParticleSystem.SetScreenSize(ControlPoint, float, float). Only used when SnapshotParticleSystem.UsesConstantScreenSize(ParticleSnapshot).
public const int ScreenSizeControlPoint = 1Field Value
int
SnapshotControlPoint
The control point the snapshot is bound to, and that the initializers read back from.
public const int SnapshotControlPoint = 0Field Value
int
Properties
MaxParticles
The most particles one system can hold. A larger snapshot is truncated to its first SnapshotParticleSystem.MaxParticles elements.
public static int MaxParticles { get; }Property Value
int
Methods
CanPreview(ParticleSnapshot)
Whether the snapshot has a position attribute of the expected type and at least one particle.
public static bool CanPreview(ParticleSnapshot snapshot)Parameters
snapshot ParticleSnapshot
Returns
bool
Create(ParticleSnapshot)
Builds the preview effect. The snapshot must still be handed to the system that runs it, which is what binds it.
public static ParticleSystem Create(ParticleSnapshot snapshot)Parameters
snapshot ParticleSnapshot
Returns
GetBounds(ParticleSnapshot)
The world-space box containing the snapshot's particles, for framing the camera on it.
public static AABB GetBounds(ParticleSnapshot snapshot)Parameters
snapshot ParticleSnapshot
Returns
SetScreenSize(ControlPoint, float, float)
Sets the on-screen size of the quads drawn by a system built by SnapshotParticleSystem.Create(ParticleSnapshot).
public static void SetScreenSize(ControlPoint controlPoint, float screenFraction, float verticalFieldOfView)Parameters
controlPoint ControlPoint
The system's SnapshotParticleSystem.ScreenSizeControlPoint.
screenFraction float
Quad height as a fraction of the viewport height.
verticalFieldOfView float
The camera's vertical field of view, in radians.
UsesConstantScreenSize(ParticleSnapshot)
Whether the snapshot stores no radius, so the quads are drawn at a constant on-screen size set by SnapshotParticleSystem.SetScreenSize(ControlPoint, float, float).
public static bool UsesConstantScreenSize(ParticleSnapshot snapshot)Parameters
snapshot ParticleSnapshot
Returns
bool

