Class ParticleAction
Represents an action a particle can schedule when it is activated.
Some particle actions need to be scheduled because applying them immediately would violate the FSYNC execution model where all particles operate on the same snapshot of the system. Thus, these actions are scheduled and only applied after all particles have been activated.
Inheritance
Namespace: AS2.Sim
Assembly: .dll
Syntax
public class ParticleAction
Constructors
| Edit this page View SourceParticleAction(Particle, ActionType, Direction)
Declaration
public ParticleAction(Particle particle = null, ActionType type = ActionType.NULL, Direction localDir = Direction.NONE)
Parameters
Type | Name | Description |
---|---|---|
Particle | particle | |
ActionType | type | |
Direction | localDir |
Fields
| Edit this page View SourcelocalDir
The local direction into which the action is aimed, if applicable.
Declaration
public Direction localDir
Field Value
Type | Description |
---|---|
Direction |
particle
The particle scheduling the action.
Declaration
public Particle particle
Field Value
Type | Description |
---|---|
Particle |
type
The type of action. NULL means no action.
Declaration
public ActionType type
Field Value
Type | Description |
---|---|
ActionType |
Methods
| Edit this page View SourceIsContraction()
Checks whether this action is a contraction of any kind.
Declaration
public bool IsContraction()
Returns
Type | Description |
---|---|
bool |
|
IsExpansion()
Checks whether this action is an expansion of any kind.
Declaration
public bool IsExpansion()
Returns
Type | Description |
---|---|
bool |
|
IsHandover()
Checks whether this action is a handover.
Declaration
public bool IsHandover()
Returns
Type | Description |
---|---|
bool |
|
IsHandoverContraction()
Checks whether this action is a handover contraction.
Declaration
public bool IsHandoverContraction()
Returns
Type | Description |
---|---|
bool |
|
IsHandoverExpansion()
Checks whether this action is a handover expansion.
Declaration
public bool IsHandoverExpansion()
Returns
Type | Description |
---|---|
bool |
|
IsHeadContraction()
Checks whether this action is a Head contraction.
Declaration
public bool IsHeadContraction()
Returns
Type | Description |
---|---|
bool |
|
IsRegularContraction()
Checks whether this action is a regular contraction.
Declaration
public bool IsRegularContraction()
Returns
Type | Description |
---|---|
bool |
|
IsRegularExpansion()
Checks whether this action is a regular expansion.
Declaration
public bool IsRegularExpansion()
Returns
Type | Description |
---|---|
bool |
|
IsRegularMovement()
Checks whether this action is a regular movement.
Declaration
public bool IsRegularMovement()
Returns
Type | Description |
---|---|
bool |
|
IsTailContraction()
Checks whether this action is a Tail contraction.
Declaration
public bool IsTailContraction()
Returns
Type | Description |
---|---|
bool |
|