Table of Contents

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

DependencyProperty

AccelerationProperty

Identifies the Acceleration dependency property.

public static readonly DependencyProperty AccelerationProperty

Field Value

DependencyProperty

AccelerationSpreadingProperty

Identifies the AccelerationSpreading dependency property.

public static readonly DependencyProperty AccelerationSpreadingProperty

Field Value

DependencyProperty

AliveParticlesProperty

Identifies the AliveParticles dependency property.

public static readonly DependencyProperty AliveParticlesProperty

Field Value

DependencyProperty

AngularVelocityProperty

Identifies the AngularVelocity dependency property.

public static readonly DependencyProperty AngularVelocityProperty

Field Value

DependencyProperty

EmitRateProperty

Identifies the EmitRate dependency property.

public static readonly DependencyProperty EmitRateProperty

Field Value

DependencyProperty

FadeOutTimeProperty

Identifies the FadeOutTime dependency property.

public static readonly DependencyProperty FadeOutTimeProperty

Field Value

DependencyProperty

LifeTimeProperty

Identifies the LifeTime dependency property.

public static readonly DependencyProperty LifeTimeProperty

Field Value

DependencyProperty

PositionProperty

Identifies the Position dependency property.

public static readonly DependencyProperty PositionProperty

Field Value

DependencyProperty

SizeRateProperty

Identifies the SizeRate dependency property.

public static readonly DependencyProperty SizeRateProperty

Field Value

DependencyProperty

StartDirectionProperty

Identifies the StartDirection dependency property.

public static readonly DependencyProperty StartDirectionProperty

Field Value

DependencyProperty

StartRadiusProperty

Identifies the StartRadius dependency property.

public static readonly DependencyProperty StartRadiusProperty

Field Value

DependencyProperty

StartSizeProperty

Identifies the StartSize dependency property.

public static readonly DependencyProperty StartSizeProperty

Field Value

DependencyProperty

StartSpreadingProperty

Identifies the StartSpreading dependency property.

public static readonly DependencyProperty StartSpreadingProperty

Field Value

DependencyProperty

StartVelocityProperty

Identifies the StartVelocity dependency property.

public static readonly DependencyProperty StartVelocityProperty

Field Value

DependencyProperty

StartVelocityRandomnessProperty

Identifies the StartVelocityRandomness dependency property.

public static readonly DependencyProperty StartVelocityRandomnessProperty

Field Value

DependencyProperty

TextureProperty

Identifies the Texture dependency property.

public static readonly DependencyProperty TextureProperty

Field Value

DependencyProperty

VelocityDampingProperty

Identifies the VelocityDamping dependency property.

public static readonly DependencyProperty VelocityDampingProperty

Field Value

DependencyProperty

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

list IList<T>

The list to change.

targetLength int

Target length of the list.

Type Parameters

T

The type of the list elements.

CreateRandomVector(Vector3D, double)

Creates a random vector.

protected static Vector3D CreateRandomVector(Vector3D z, double spreading)

Parameters

z Vector3D

The direction.

spreading double

The spreading.

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

sender object

The sender.

eventArgs RenderingEventArgs

The 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

oldParent DependencyObject

A 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

time double

The time.