Search Results for

    Show / Hide Table of Contents

    Class ParticlePinGraphicState

    A class that is created by the system to store a simplified version of the current state of the circuits of a single particle. This serves as a data container which updates the render system in each new configuration of the system.

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

    Constructors

    | Edit this page View Source

    ParticlePinGraphicState(int)

    Declaration
    private ParticlePinGraphicState(int pinsPerSide)
    Parameters
    Type Name Description
    int pinsPerSide

    Fields

    | Edit this page View Source

    codeOverrideLineRotationDegrees1

    Rotation of partition set placement line in the head.

    Declaration
    public float codeOverrideLineRotationDegrees1
    Field Value
    Type Description
    float
    | Edit this page View Source

    codeOverrideLineRotationDegrees2

    Rotation of partition set placement line in the head.

    Declaration
    public float codeOverrideLineRotationDegrees2
    Field Value
    Type Description
    float
    | Edit this page View Source

    codeOverrideType1

    Partition set placement type in the head.

    Declaration
    public ParticlePinGraphicState.CodeOverrideType_Node codeOverrideType1
    Field Value
    Type Description
    ParticlePinGraphicState.CodeOverrideType_Node
    | Edit this page View Source

    codeOverrideType2

    Partition set placement type in the tail.

    Declaration
    public ParticlePinGraphicState.CodeOverrideType_Node codeOverrideType2
    Field Value
    Type Description
    ParticlePinGraphicState.CodeOverrideType_Node
    | Edit this page View Source

    hasNeighbor1

    Neighbor flags for the particle's head. Indices are global directions.

    Declaration
    public bool[] hasNeighbor1
    Field Value
    Type Description
    bool[]
    | Edit this page View Source

    hasNeighbor2

    Neighbor flags for the particle's tail. Only relevant if the particle is expanded. Indices are global directions.

    Declaration
    public bool[] hasNeighbor2
    Field Value
    Type Description
    bool[]
    | Edit this page View Source

    neighbor1ToNeighbor2Direction

    Global direction from the particle's head to its tail. Is -1 if the particle is contracted.

    Declaration
    public int neighbor1ToNeighbor2Direction
    Field Value
    Type Description
    int
    | Edit this page View Source

    neighborPinConnection1

    Types of pins connected to the particle's head. Indices are global directions.

    Declaration
    public ParticlePinGraphicState.NeighborPinConnection[] neighborPinConnection1
    Field Value
    Type Description
    NeighborPinConnection[]
    | Edit this page View Source

    neighborPinConnection2

    Types of pins connected to the particle's tail. Only relevant if the particle is expanded. Indices are global directions.

    Declaration
    public ParticlePinGraphicState.NeighborPinConnection[] neighborPinConnection2
    Field Value
    Type Description
    NeighborPinConnection[]
    | Edit this page View Source

    partitionSets

    Non-singleton and non-empty partition sets in the pin configuration.

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

    pinsPerSide

    The number of pins on each edge of a particle.

    Declaration
    public int pinsPerSide
    Field Value
    Type Description
    int
    | Edit this page View Source

    pool

    Declaration
    private static Stack<ParticlePinGraphicState> pool
    Field Value
    Type Description
    Stack<ParticlePinGraphicState>
    | Edit this page View Source

    singletonSets

    Singleton partition sets in the pin configuration.

    Declaration
    public List<ParticlePinGraphicState.PSetData> singletonSets
    Field Value
    Type Description
    List<ParticlePinGraphicState.PSetData>

    Properties

    | Edit this page View Source

    IsExpanded

    Checks whether the pin configuration belongs to an expanded particle.

    Declaration
    public bool IsExpanded { get; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    CalculateAmountOfPSetsWithPinsInHeadAndTail(bool)

    Calculates the amount of partition sets that have pins in both halves of the expanded particle. Returns 0 if the particle is contracted.

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

    Whether the pin numbers should be recalculated. Set this to false if you already did that for all particles to save time.

    Returns
    Type Description
    int

    The number of partition sets that contain pins in both the particle's head and tail, if the particle is expanded.

    | Edit this page View Source

    CodePositionOverride_Automatic(bool)

    Code override of the position of the partition sets by the use of the default placement algorithm. Replaces other code override values that have been set at this level of the object (like LineRotated).

    Declaration
    public void CodePositionOverride_Automatic(bool isHead)
    Parameters
    Type Name Description
    bool isHead

    true for contracted particles or the head of expanded particles.

    | Edit this page View Source

    CodePositionOverride_AutomaticLine(bool)

    Code override of the position of the partition sets by the use of the standard partition set line. Non rotated, except for the expanded particles where the line is oriented orthogonally to the other half of the particle. Replaces other code override values that have been set at this level of the object (like LineRotated).

    Declaration
    public void CodePositionOverride_AutomaticLine(bool isHead)
    Parameters
    Type Name Description
    bool isHead

    true for contracted particles or the head of expanded particles.

    | Edit this page View Source

    CodePositionOverride_LineRotated(float, bool)

    Code override of the position of the partition set rotation of the standard partition set line. Expanded particles must set the rotation manually with this mode. Replaces other code override values that have been set at this level of the object (like AutomaticLine).

    Declaration
    public void CodePositionOverride_LineRotated(float rotationDegrees, bool isHead)
    Parameters
    Type Name Description
    float rotationDegrees

    The rotation degree, counterclockwise. It is recommended to use a value that is divisible by 60. 0 degrees means the line is vertical.

    bool isHead

    true for contracted particles or the head of expanded particles.

    | Edit this page View Source

    CodePositionOverride_PolarCoordinatePlacement(bool)

    Code override of the position of the partition sets by the use of manually set polar coordinates that need to be defined in the partition sets. Replaces other code override values that have been set at this level of the object (like LineRotated).

    Declaration
    public void CodePositionOverride_PolarCoordinatePlacement(bool isHead)
    Parameters
    Type Name Description
    bool isHead

    true for contracted particles or the head of expanded particles.

    | Edit this page View Source

    InitNeighbors()

    Initializes the neighbor arrays with default values (indicating no neighbors).

    Declaration
    private void InitNeighbors()
    | Edit this page View Source

    PoolCreate(int)

    Recycles a ParticlePinGraphicState instance from the pool or creates a new one.

    Declaration
    public static ParticlePinGraphicState PoolCreate(int pinsPerSide)
    Parameters
    Type Name Description
    int pinsPerSide

    The number of pins with which to initialize the new instance.

    Returns
    Type Description
    ParticlePinGraphicState

    A ParticlePinGraphicState instance initialized with pinsPerSide pins.

    | Edit this page View Source

    PoolRelease(ParticlePinGraphicState)

    Reinserts the given ParticlePinGraphicState instance into the pool so that it can be reused later.

    Declaration
    public static void PoolRelease(ParticlePinGraphicState state)
    Parameters
    Type Name Description
    ParticlePinGraphicState state

    The instanced to be entered into the pool.

    | Edit this page View Source

    Reset()

    Resets the object to the default values. Does not change number of pins.

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

    Reset(int)

    Resets the object to the default values with a specific number of pins.

    Declaration
    public void Reset(int pinsPerSide)
    Parameters
    Type Name Description
    int pinsPerSide

    The new number of pins.

    | Edit this page View Source

    ResetCodePositionOverride()

    Removes any code overrides that have been set on this level of the object. You might not need this.

    Declaration
    public void ResetCodePositionOverride()
    • 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