Class ParticleSceneNode
Namespace: ValveResourceFormat.Renderer.SceneNodes
Assembly: Renderer.dll
Scene node that renders particle system effects.
public class ParticleSceneNode : SceneNodeInheritance
object ← SceneNode ← ParticleSceneNode
Inherited Members
SceneNode.Transform, SceneNode.LayerName, SceneNode.LayerEnabled, SceneNode.BoundingBox, SceneNode.LocalBoundingBox, SceneNode.Name, SceneNode.Id, SceneNode.IsSelected, SceneNode.Flags, SceneNode.RenderAsViewmodel, SceneNode.Scene, SceneNode.Parent, SceneNode.EnvMaps, SceneNode.ShaderEnvMapVisibility, SceneNode.LightingOrigin, SceneNode.OverlayRenderOrder, SceneNode.CubeMapPrecomputedHandshake, SceneNode.LightProbeVolumePrecomputedHandshake, SceneNode.LightProbeBinding, SceneNode.EntityData, SceneNode.Update(Scene.UpdateContext), SceneNode.Render(Scene.RenderContext), SceneNode.GetSupportedRenderModes(), SceneNode.SetRenderMode(string), SceneNode.Delete(), SceneNode.GetCameraDistance(Camera)
Constructors
ParticleSceneNode(Scene, ParticleSystem, ParticleSnapshot?, bool)
Initializes a new instance of the class.
public ParticleSceneNode(Scene scene, ParticleSystem particleSystem, ParticleSnapshot? particleSnapshot = null, bool preview = false)Parameters
scene Scene
The scene this node belongs to.
particleSystem ParticleSystem
The particle system resource to simulate and render.
particleSnapshot ParticleSnapshot?
Optional snapshot to provide initial particle data (e.g. from a map entity).
preview bool
Whether to load preview control point state, and loop playback when finished.
Properties
FrametimeMultiplier
Gets or sets a time-scale multiplier applied to the particle simulation each frame.
public float FrametimeMultiplier { get; set; }Property Value
Preview
Whether to load preview control point state, and loop playback when finished.
public bool Preview { get; set; }Property Value
PreviewModel
Gets the preview model scene node loaded from particle preview state, if any.
public ModelSceneNode? PreviewModel { get; }Property Value
Methods
CreateModelParticles(Scene, Model, ModelSceneNode)
Creates particle nodes for the particle systems referenced by a model's keyvalues (particles_list) and wires each one to the given model node according to the entry's attachment_type. Follow types track the model or attachment point while it animates; the other types are placed once at spawn. Entries with an unknown type are skipped.
public static List<ParticleSceneNode> CreateModelParticles(Scene scene, Model model, ModelSceneNode modelNode)Parameters
scene Scene
The scene the nodes belong to.
model Model
The model referencing the particle systems.
modelNode ModelSceneNode
The model node providing the attachment points.
Returns
The created particle nodes. The caller adds them to the scene.
Delete()
Releases resources held by this node.
public override void Delete()GetControlPoint(int)
Gets the control point at the given index from the particle renderer.
public ControlPoint GetControlPoint(int index)Parameters
index int
The index of the control point to retrieve.
Returns
The control point at the specified index.
GetSupportedRenderModes()
Returns the render modes supported by this node.
public override IEnumerable<string> GetSupportedRenderModes()Returns
Prewarm(Camera)
Forces this system's renderers to draw once with temporary particles.
public void Prewarm(Camera camera)Parameters
camera Camera
Render(RenderContext)
Called each frame to render this node.
public override void Render(Scene.RenderContext context)Parameters
context Scene.RenderContext
The current render context.
Restart()
Restarts the particle system from the beginning.
public void Restart()SetDetailLevel(int)
Sets the particle detail tier (0 = Low .. 3 = Ultra) used by detail-tiered inputs.
public void SetDetailLevel(int level)Parameters
level int
SetRenderMode(string)
Sets the active render mode for this node.
public override void SetRenderMode(string mode)Parameters
mode string
The render mode name to activate.
Update(UpdateContext)
Called each frame to update this node's state.
public override void Update(Scene.UpdateContext context)Parameters
context Scene.UpdateContext
The current update context.

