Class SnapshotParticleSystem
Namespace: ValveResourceFormat.Renderer.Particles
Assembly: Renderer.dll
Builds the particle system a .vsnap is previewed through: an ordinary definition that binds the snapshot to 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
ScreenSizeControlPoint
The control point whose X component carries the on-screen quad size, written by
. Only used when .public const int ScreenSizeControlPoint = 1Field Value
SnapshotControlPoint
The control point the snapshot is bound to, and that the initializers read back from.
public const int SnapshotControlPoint = 0Field Value
Properties
MaxParticles
The most particles one system can hold. A larger snapshot is truncated to its first
elements.public static int MaxParticles { get; }Property Value
Methods
CanPreview(ParticleSnapshot)
Whether the snapshot holds anything this preview can place, i.e. a position attribute of the expected type and at least one particle.
public static bool CanPreview(ParticleSnapshot snapshot)Parameters
snapshot ParticleSnapshot
Returns
Create(ParticleSnapshot)
Builds the preview effect. The snapshot must still be handed to the
that runs the returned system, 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(ParticleSceneNode, float, float)
Sets the on-screen size of the quads drawn by the effect node runs.
public static void SetScreenSize(ParticleSceneNode node, float screenFraction, float verticalFieldOfView)Parameters
node ParticleSceneNode
The node running a system built by .
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 preview has to invent a size because the snapshot stores no radius, in which case the quads are drawn at a constant size on screen and controls it.
public static bool UsesConstantScreenSize(ParticleSnapshot snapshot)Parameters
snapshot ParticleSnapshot

