Class ParticleSystem
- Namespace
- HelixToolkit.Wpf
- Assembly
- HelixToolkit.Wpf.dll
Renders a simple particle system within the limitations of WPF.
public class ParticleSystem : RenderingModelVisual3D, IAnimatable, IAddChild
- Inheritance
-
ParticleSystem
- Implements
- Inherited Members
- Extension Methods
Constructors
ParticleSystem()
Initializes a new instance of the ParticleSystem class.
public ParticleSystem()
Fields
AccelerationDirectionProperty
Identifies the AccelerationDirection dependency property.
public static readonly DependencyProperty AccelerationDirectionProperty
Field Value
AccelerationProperty
Identifies the Acceleration dependency property.
public static readonly DependencyProperty AccelerationProperty
Field Value
AccelerationSpreadingProperty
Identifies the AccelerationSpreading dependency property.
public static readonly DependencyProperty AccelerationSpreadingProperty
Field Value
AliveParticlesProperty
Identifies the AliveParticles dependency property.
public static readonly DependencyProperty AliveParticlesProperty
Field Value
AngularVelocityProperty
Identifies the AngularVelocity dependency property.
public static readonly DependencyProperty AngularVelocityProperty
Field Value
EmitRateProperty
Identifies the EmitRate dependency property.
public static readonly DependencyProperty EmitRateProperty
Field Value
FadeOutTimeProperty
Identifies the FadeOutTime dependency property.
public static readonly DependencyProperty FadeOutTimeProperty
Field Value
LifeTimeProperty
Identifies the LifeTime dependency property.
public static readonly DependencyProperty LifeTimeProperty
Field Value
PositionProperty
Identifies the Position dependency property.
public static readonly DependencyProperty PositionProperty
Field Value
SizeRateProperty
Identifies the SizeRate dependency property.
public static readonly DependencyProperty SizeRateProperty
Field Value
StartDirectionProperty
Identifies the StartDirection dependency property.
public static readonly DependencyProperty StartDirectionProperty
Field Value
StartRadiusProperty
Identifies the StartRadius dependency property.
public static readonly DependencyProperty StartRadiusProperty
Field Value
StartSizeProperty
Identifies the StartSize dependency property.
public static readonly DependencyProperty StartSizeProperty
Field Value
StartSpreadingProperty
Identifies the StartSpreading dependency property.
public static readonly DependencyProperty StartSpreadingProperty
Field Value
StartVelocityProperty
Identifies the StartVelocity dependency property.
public static readonly DependencyProperty StartVelocityProperty
Field Value
StartVelocityRandomnessProperty
Identifies the StartVelocityRandomness dependency property.
public static readonly DependencyProperty StartVelocityRandomnessProperty
Field Value
TextureProperty
Identifies the Texture dependency property.
public static readonly DependencyProperty TextureProperty
Field Value
VelocityDampingProperty
Identifies the VelocityDamping dependency property.
public static readonly DependencyProperty VelocityDampingProperty
Field Value
Properties
Acceleration
Gets or sets the acceleration.
public double Acceleration { get; set; }
Property Value
- double
The acceleration.
AccelerationDirection
Gets or sets the acceleration direction.
public Vector3D AccelerationDirection { get; set; }
Property Value
- Vector3D
The acceleration direction.
AccelerationSpreading
Gets or sets the acceleration spreading angle.
public double AccelerationSpreading { get; set; }
Property Value
- double
The acceleration spreading.
AliveParticles
Gets or sets the number of alive particles.
public int AliveParticles { get; set; }
Property Value
- int
The alive particles.
AngularVelocity
Gets or sets the angular velocity.
public double AngularVelocity { get; set; }
Property Value
- double
The angular velocity.
EmitRate
Gets or sets the emit rate.
public double EmitRate { get; set; }
Property Value
- double
The emit rate.
FadeOutTime
Gets or sets the fade out time.
public double FadeOutTime { get; set; }
Property Value
- double
The fade out time.
LifeTime
Gets or sets the life time.
public double LifeTime { get; set; }
Property Value
- double
The life time.
Position
Gets or sets the position.
public Point3D Position { get; set; }
Property Value
- Point3D
The position.
SizeRate
Gets or sets the size rate.
public double SizeRate { get; set; }
Property Value
- double
The size rate.
StartDirection
Gets or sets the start direction.
public Vector3D StartDirection { get; set; }
Property Value
- Vector3D
The start direction.
StartRadius
Gets or sets the start radius.
public double StartRadius { get; set; }
Property Value
- double
The start radius.
StartSize
Gets or sets the start size.
public double StartSize { get; set; }
Property Value
- double
The start size.
StartSpreading
Gets or sets the start spreading.
public double StartSpreading { get; set; }
Property Value
- double
The start spreading.
StartVelocity
Gets or sets the start velocity.
public double StartVelocity { get; set; }
Property Value
- double
The start velocity.
StartVelocityRandomness
Gets or sets the start velocity randomness.
public double StartVelocityRandomness { get; set; }
Property Value
- double
The start velocity randomness.
Texture
Gets or sets the texture.
public Brush Texture { get; set; }
Property Value
- Brush
The texture.
VelocityDamping
Gets or sets the velocity damping factor.
public double VelocityDamping { get; set; }
Property Value
- double
The velocity damping.
Methods
AdjustListLength<T>(IList<T?>, int)
Adjusts the length of the specified list.
protected static void AdjustListLength<T>(IList<T?> list, int targetLength)
Parameters
Type Parameters
TThe type of the list elements.
CreateRandomVector(Vector3D, double)
Creates a random vector.
protected static Vector3D CreateRandomVector(Vector3D z, double spreading)
Parameters
Returns
- Vector3D
The random vector.
EmitOne()
Emits one particle.
protected void EmitOne()
OnCompositionTargetRendering(object?, RenderingEventArgs?)
Handles the CompositionTarget.Rendering event.
protected override void OnCompositionTargetRendering(object? sender, RenderingEventArgs? eventArgs)
Parameters
senderobjectThe sender.
eventArgsRenderingEventArgsThe RenderingEventArgs instance containing the event data.
OnVisualParentChanged(DependencyObject)
Called when the parent of the 3-D visual object is changed.
protected override void OnVisualParentChanged(DependencyObject oldParent)
Parameters
oldParentDependencyObjectA value of type DependencyObject that represents the previous parent of the Visual3D object. If the Visual3D object did not have a previous parent, the value of the parameter is null.
TextureChanged()
Updates the material when the texture changes.
protected void TextureChanged()
Update(double)
Updates the system.
protected void Update(double time)
Parameters
timedoubleThe time.