Search Results for

    Show / Hide Table of Contents

    Class ParticlePinGraphicState.PSetData

    Stores information belonging to a single partition set.

    Inheritance
    object
    ParticlePinGraphicState.PSetData
    Namespace: AS2.Visuals
    Assembly: .dll
    Syntax
    public class ParticlePinGraphicState.PSetData

    Constructors

    | Edit this page View Source

    PSetData()

    Declaration
    private PSetData()

    Fields

    | Edit this page View Source

    beepOrigin

    Whether the partition set sends a beep in the current round.

    Declaration
    public bool beepOrigin
    Field Value
    Type Description
    bool
    | Edit this page View Source

    beepsThisRound

    Whether the partition set receives a beep in the current round.

    Declaration
    public bool beepsThisRound
    Field Value
    Type Description
    bool
    | Edit this page View Source

    color

    The partition set's color.

    Declaration
    public Color color
    Field Value
    Type Description
    Color
    | Edit this page View Source

    graphicalData

    This class stores graphical data. Please do not change the instance directly via the system, use the other methods in this class to assign coordinate values.

    Declaration
    public ParticlePinGraphicState.PSetData.GraphicalData graphicalData
    Field Value
    Type Description
    ParticlePinGraphicState.PSetData.GraphicalData
    | Edit this page View Source

    isFaulty

    Whether the partition set has suffered a beep reception failure in the current round.

    Declaration
    public bool isFaulty
    Field Value
    Type Description
    bool
    | Edit this page View Source

    pins

    The pins belonging to the partition set.

    Declaration
    public List<ParticlePinGraphicState.PinDef> pins
    Field Value
    Type Description
    List<ParticlePinGraphicState.PinDef>
    | Edit this page View Source

    pool

    Declaration
    private static Stack<ParticlePinGraphicState.PSetData> pool
    Field Value
    Type Description
    Stack<ParticlePinGraphicState.PSetData>

    Methods

    | Edit this page View Source

    Clear()

    Clears the system for pooling.

    Declaration
    public void Clear()
    | Edit this page View Source

    CodePositionOverride_Coordinate(Polar2DCoordinate, bool)

    Code override of the position of the partition set by a polar coordinate. Replaces other code override values that have been set at this level of the object (like AutomaticRingPlacement). Different override methods for head and tail are allowed. Note that you also need to call the corresponding method in the ParticlePinGraphicState object to enable this mode.

    Declaration
    public void CodePositionOverride_Coordinate(Polar2DCoordinate coordinate, bool isHead)
    Parameters
    Type Name Description
    Polar2DCoordinate coordinate

    The polar coordinate relative from the particle center.

    bool isHead

    True for contracted particles or the head of expanded particles. Set it to false if you want to position an expanded partition set at the tail.

    | Edit this page View Source

    HasPinsIn(bool)

    Returns whether the partition set is connected to pins in the given part of the particle ('head' for contracted particles or the head, 'tail' for the tail of expanded particles).

    Declaration
    public bool HasPinsIn(bool isHead)
    Parameters
    Type Name Description
    bool isHead

    Whether a pin in the head should be searched. false if a pin in the tail should be searched.

    Returns
    Type Description
    bool

    true if a pin has been found.

    | Edit this page View Source

    HasPinsInHeadAndTail(bool)

    Checks whether the partition set contains pins in the particle's head and tail (if the particle is expanded).

    Declaration
    public bool HasPinsInHeadAndTail(bool recalcPinNumbers = true)
    Parameters
    Type Name Description
    bool recalcPinNumbers

    If true, recalculate the pin counts before checking (necessary if the partition set data has recently changed.

    Returns
    Type Description
    bool

    true if and only if the partition set contains pins both in the particle's head and in its tail.

    | Edit this page View Source

    PoolCreate()

    Instantiates an object or uses pooling to recycle an old object.

    Declaration
    public static ParticlePinGraphicState.PSetData PoolCreate()
    Returns
    Type Description
    ParticlePinGraphicState.PSetData

    A fresh ParticlePinGraphicState.PSetData instance.

    | Edit this page View Source

    PoolRelease(PSetData)

    Clears and adds the object instance to the pool.

    Declaration
    public static void PoolRelease(ParticlePinGraphicState.PSetData obj)
    Parameters
    Type Name Description
    ParticlePinGraphicState.PSetData obj

    The instance to be recycled.

    | Edit this page View Source

    PrecalculatePinNumbersAndStoreInGD()

    Calculates if the partition set has pins + the number of pins in the given part of the particle and stores it in variables in the graphical data for fast and easy access.

    Declaration
    public void PrecalculatePinNumbersAndStoreInGD()
    | Edit this page View Source

    UpdatePSetData(Color, bool, params PinDef[])

    Updates the state of this container.

    Declaration
    public void UpdatePSetData(Color color, bool beepsThisRound, params ParticlePinGraphicState.PinDef[] pins)
    Parameters
    Type Name Description
    Color color

    The color the partition set lines should have.

    bool beepsThisRound

    true if there is a beep in this round.

    PinDef[] pins

    An array of pin references that show the pins contained in this system.

    | Edit this page View Source

    UpdatePSetData(Color, bool, bool, bool, params PinDef[])

    Updates the state of this container.

    Declaration
    public void UpdatePSetData(Color color, bool beepsThisRound, bool beepOrigin, bool faulty, params ParticlePinGraphicState.PinDef[] pins)
    Parameters
    Type Name Description
    Color color

    The color the partition set lines should have.

    bool beepsThisRound

    true if there is a beep in this round.

    bool beepOrigin

    true if the origin of the beep came from this particle.

    bool faulty

    true if this particle has not received a beep due to a failure.

    PinDef[] pins

    An array of pin references that show the pins contained in this system.

    • 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