DPSF by Daniel Schroeder

<PackageReference Include="DPSF" Version="2.5.0" />

.NET API 168,448 bytes

 DefaultParticleSystemMagnet

public abstract class DefaultParticleSystemMagnet
The base class that all Magnet classes inherit from. This class cannot be instantiated directly. A Magnet of a Particle System has an affect on its Particles, such as attracting or repelling them.
public enum DistanceFunctions

Function used to determine how much the Magnet should affect a Particle, based on how far away the Particle is from the Magnet.

public enum MagnetModes

The Modes that the Magnet can be in

public enum MagnetTypes

The Types of Magnets available to choose from (i.e. which Magnet class is being used)

The Function to use to determine how much a Particle should be affected by the Magnet based on how far away from the Magnet it is.

public float MaxDistance

The Max Distance that the Magnet should be able to affect Particles at. If the Particle is further away from the Magnet than this distance, the Magnet will not affect the Particle.

public float MaxForce

The Maximum Force that the Magnet is able to exert on a Particle.

The Force exerted on a particle by a Magnet may vary depending on which Distance Function is used, and the particle's distance from the Magnet.

Holds the Type of Magnet this is

public float MinDistance

The Min Distance that the Magnet should be able to affect Particles at. If the Particle is closer to the Magnet than this distance, the Magnet will not affect the Particle.

The current Mode that the Magnet is in

The Type of User-Defined Magnet this is. User-defined Magnet classes will all have a MagnetType = MagnetTypes.UserDefined, so this field can be used to distinguish between different user-defined Magnet classes. This may be used in conjunction with the "Other" Magnet Mode to distinguish which type of custom user effect the Magnet should have on the Particles.

public int ID { get; }

Get the unique ID of this Magnet

public MagnetTypes MagnetType { get; }

Gets what Type of Magnet this is

protected DefaultParticleSystemMagnet(MagnetModes eMode, DistanceFunctions eDistanceFunction, float fMinDistance, float fMaxDistance, float fMaxForce, int iType)

Explicit Constructor

Copy Constructor

public void CopyFrom(DefaultParticleSystemMagnet cMagnetToCopy)

Copies the given Magnet's data into this Magnet's data