Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    ParticleModule Class

    Namespace: Stride.Particles
    Assembly: Stride.Particles.dll

    The ParticleModule is a base class for all plugins (initializers and updaters) used by the emitter Each plugin operates over one or several ParticleFields updating or setting up the particle state Additionally, each plugin can inherit some properties from the parent particle system, which are usually passed by the user.

    System.Object → ParticleTransform → ParticleModule
    Derived from ParticleModule: ParticleInitializer ParticleUpdater

    [DataContract("PaticleModule")]
    public abstract class ParticleModule : ParticleTransform
    Name Description
    Fields
    RequiredFields

    A list of fields required by the module to operate properly. Please fill it during construction time.

    Properties
    Enabled

    Gets or sets a value indicating whether this ParticleModule is enabled.

    Methods
    InvalidateRelations()

    Invalidates relation of this emitter to any other emitters that might be referenced

    PreUpdate()
    ResetSimulation()

    Resets the current state to the module's initial state

    SetParentTRS(ParticleTransform, ParticleSystem)

    Sets the parent (particle system's) translation, rotation and scale (uniform) The module can choose to inherit, use or ignore any of the elements

    TryGetDebugDrawShape(out DebugDrawShape, out Vector3, out Quaternion, out Vector3)

    Attepmts to get a debug shape (shape type and location matrix) for the current module in order to display its boundaries better

    | Improve this Doc View Source

    Fields


    RequiredFields

    A list of fields required by the module to operate properly. Please fill it during construction time.

    public List<ParticleFieldDescription> RequiredFields
    Field Value
    Type Description
    System.Collections.Generic.List<ParticleFieldDescription>
    | Improve this Doc View Source

    Properties


    Enabled

    Gets or sets a value indicating whether this ParticleModule is enabled.

    [DataMember(-10)]
    public bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if enabled; otherwise, false.

    | Improve this Doc View Source

    Methods


    InvalidateRelations()

    Invalidates relation of this emitter to any other emitters that might be referenced

    public virtual void InvalidateRelations()

    PreUpdate()

    public virtual void PreUpdate()

    ResetSimulation()

    Resets the current state to the module's initial state

    public virtual void ResetSimulation()

    SetParentTRS(ParticleTransform, ParticleSystem)

    Sets the parent (particle system's) translation, rotation and scale (uniform) The module can choose to inherit, use or ignore any of the elements

    public virtual void SetParentTRS(ParticleTransform transform, ParticleSystem parent)
    Parameters
    Type Name Description
    ParticleTransform transform

    ParticleSystem's transform (from the Transform component) or identity if local space is used

    ParticleSystem parent

    The parent ParticleSystem


    TryGetDebugDrawShape(out DebugDrawShape, out Vector3, out Quaternion, out Vector3)

    Attepmts to get a debug shape (shape type and location matrix) for the current module in order to display its boundaries better

    public virtual bool TryGetDebugDrawShape(out DebugDrawShape debugDrawShape, out Vector3 translation, out Quaternion rotation, out Vector3 scale)
    Parameters
    Type Name Description
    DebugDrawShape debugDrawShape

    Type of the debug draw shape

    Vector3 translation

    Translation of the shape

    Quaternion rotation

    Rotation of the shape

    Vector3 scale

    Scaling of the shape

    Returns
    Type Description
    System.Boolean

    Inherited Members

    ParticleTransform.InheritPosition
    ParticleTransform.Position
    ParticleTransform.InheritRotation
    ParticleTransform.Rotation
    ParticleTransform.InheritScale
    ParticleTransform.Scale
    ParticleTransform.ScaleUniform
    ParticleTransform.DisplayParticlePosition
    ParticleTransform.DisplayParticleRotation
    ParticleTransform.DisplayParticleScale
    ParticleTransform.DisplayParticleScaleUniform
    ParticleTransform.WorldPosition
    ParticleTransform.WorldRotation
    ParticleTransform.WorldScale
    ParticleTransform.SetParentTransform(ParticleTransform)

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation