Class EntityAttractorForce
Forces that attracts particles to an entity.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Framework.Particles.Forces
Assembly: Evergine.Framework.dll
Syntax
public class EntityAttractorForce : BaseForce, IDependencyObject
Properties
CutoutEnabled
Gets or sets a value indicating whether the attractor has cutout.
Declaration
[RenderProperty(Tag = 2)]
public bool CutoutEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
CutoutRange
Gets or sets the cutout range.
Declaration
[RenderProperty(AttachToTag = 2, AttachToValue = true)]
public float CutoutRange { get; set; }
Property Value
Type | Description |
---|---|
float |
CutoutStrength
Gets or sets the cutout strength.
Declaration
[RenderProperty(AttachToTag = 2, AttachToValue = true)]
public float CutoutStrength { get; set; }
Property Value
Type | Description |
---|---|
float |
ForceType
Gets the force type.
Declaration
public override ForceTypes ForceType { get; }
Property Value
Type | Description |
---|---|
ForceTypes |
Overrides
RandomPrecission
Gets or sets the random precission level of the particl system.
Declaration
public RandomPrecissionEnum RandomPrecission { get; set; }
Property Value
Type | Description |
---|---|
RandomPrecissionEnum |
SourceEntity
Gets or sets the target entity.
Declaration
public Entity SourceEntity { get; set; }
Property Value
Type | Description |
---|---|
Entity |
SourceEntityPath
Gets or sets the path of the target entity.
Declaration
public string SourceEntityPath { get; set; }
Property Value
Type | Description |
---|---|
string |
SourceTopology
Gets or sets the emission type of the entity.
Declaration
public EntityEmitterType SourceTopology { get; set; }
Property Value
Type | Description |
---|---|
EntityEmitterType |
UseComputeParticles
Gets or sets a value indicating whether the particles tries to be generated by compute shader.
Declaration
public bool UseComputeParticles { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
ApplyForce(int, ref ParticleVertex, ref ParticleStateB, float)
Apply force to a single particle.
Declaration
protected override void ApplyForce(int id, ref ParticleVertex p, ref ParticleStateB pB, float ellapsedTime)
Parameters
Type | Name | Description |
---|---|---|
int | id | The id of the particle. |
ParticleVertex | p | The particle pointer. |
ParticleStateB | pB | The particle struct B pointer. |
float | ellapsedTime | The ellapsed time in seconds. |
Overrides
CreateComputeTask(ComputeEmitterSimulator)
Creates a compute task for a particle system.
Declaration
public override ComputeTaskDecorator CreateComputeTask(ComputeEmitterSimulator particleSystem)
Parameters
Type | Name | Description |
---|---|---|
ComputeEmitterSimulator | particleSystem | The particle systme. |
Returns
Type | Description |
---|---|
ComputeTaskDecorator | The compute task. |
Overrides
OnAttached()
Invoked when the object is attached to the system.
Declaration
protected override bool OnAttached()
Returns
Type | Description |
---|---|
bool | True if all is OK. |
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()
Overrides
RefreshComputeMatrices(ComputeTaskDecorator, CommandBuffer, ComputeEmitterSimulator, TimeSpan)
Refreshes a compute task matrices for a particle system.
Declaration
public override void RefreshComputeMatrices(ComputeTaskDecorator computeTask, CommandBuffer commandBuffer, ComputeEmitterSimulator particleSystem, TimeSpan ellapsedTime)
Parameters
Type | Name | Description |
---|---|---|
ComputeTaskDecorator | computeTask | The compute task to refresh. |
CommandBuffer | commandBuffer | The command buffer. |
ComputeEmitterSimulator | particleSystem | The particle systme. |
TimeSpan | ellapsedTime | The ellapsed time. |
Overrides
RefreshComputeParams(ComputeTaskDecorator, ComputeEmitterSimulator)
Refreshes a compute task for a particle system.
Declaration
public override void RefreshComputeParams(ComputeTaskDecorator computeTask, ComputeEmitterSimulator particleSystem)
Parameters
Type | Name | Description |
---|---|---|
ComputeTaskDecorator | computeTask | The compute task to refresh. |
ComputeEmitterSimulator | particleSystem | The particle systme. |
Overrides
Start()
Invoked to start the object.
Declaration
protected override void Start()