Search Results for

    Show / Hide Table of Contents

    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
    object
    ParticleAction
    Namespace: AS2.Sim
    Assembly: .dll
    Syntax
    public class ParticleAction

    Constructors

    | Edit this page View Source

    ParticleAction(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 Source

    localDir

    The local direction into which the action is aimed, if applicable.

    Declaration
    public Direction localDir
    Field Value
    Type Description
    Direction
    | Edit this page View Source

    particle

    The particle scheduling the action.

    Declaration
    public Particle particle
    Field Value
    Type Description
    Particle
    | Edit this page View Source

    type

    The type of action. NULL means no action.

    Declaration
    public ActionType type
    Field Value
    Type Description
    ActionType

    Methods

    | Edit this page View Source

    IsContraction()

    Checks whether this action is a contraction of any kind.

    Declaration
    public bool IsContraction()
    Returns
    Type Description
    bool

    true if and only if the action represents a regular contraction or a handover contraction.

    | Edit this page View Source

    IsExpansion()

    Checks whether this action is an expansion of any kind.

    Declaration
    public bool IsExpansion()
    Returns
    Type Description
    bool

    true if and only if the action represents a regular expansion or a handover expansion.

    | Edit this page View Source

    IsHandover()

    Checks whether this action is a handover.

    Declaration
    public bool IsHandover()
    Returns
    Type Description
    bool

    true if and only if the action represents a handover contraction or expansion and not a regular movement.

    | Edit this page View Source

    IsHandoverContraction()

    Checks whether this action is a handover contraction.

    Declaration
    public bool IsHandoverContraction()
    Returns
    Type Description
    bool

    true if and only if the action represents a handover contraction and not a regular contraction.

    | Edit this page View Source

    IsHandoverExpansion()

    Checks whether this action is a handover expansion.

    Declaration
    public bool IsHandoverExpansion()
    Returns
    Type Description
    bool

    true if and only if the action represents a handover expansion, not a regular expansion.

    | Edit this page View Source

    IsHeadContraction()

    Checks whether this action is a Head contraction.

    Declaration
    public bool IsHeadContraction()
    Returns
    Type Description
    bool

    true if and only if the action represents a contraction or pull handover into the particle's Head.

    | Edit this page View Source

    IsRegularContraction()

    Checks whether this action is a regular contraction.

    Declaration
    public bool IsRegularContraction()
    Returns
    Type Description
    bool

    true if and only if the action represents a regular contraction, not a handover.

    | Edit this page View Source

    IsRegularExpansion()

    Checks whether this action is a regular expansion.

    Declaration
    public bool IsRegularExpansion()
    Returns
    Type Description
    bool

    true if and only if the action represents a regular expansion, not a handover.

    | Edit this page View Source

    IsRegularMovement()

    Checks whether this action is a regular movement.

    Declaration
    public bool IsRegularMovement()
    Returns
    Type Description
    bool

    true if and only if the action represents a regular contraction or expansion and not a handover movement.

    | Edit this page View Source

    IsTailContraction()

    Checks whether this action is a Tail contraction.

    Declaration
    public bool IsTailContraction()
    Returns
    Type Description
    bool

    true if and only if the action represents a contraction or pull handover into the particle's Tail.

    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX