Search Results for

    Show / Hide Table of Contents

    Class PinConfigurationSaveData

    Compressed representation of pin configuration data. Stores all information stored in a SysPinConfiguration instance except the particle reference, particle-specific information and state flags.

    This class should be used for storing pin configurations in attributes and writing them to save files. The class overloads the equality operator to compare instances by their content.

    Note: This way of representing the pin configuration data is highly compressed and does not contain all information necessary to construct a pin configuration. The data must be interpreted in the context of a particle's expansion direction, chirality and compass orientation in order to reconstruct the original pin configuration.

    Inheritance
    object
    PinConfigurationSaveData
    Namespace: AS2
    Assembly: .dll
    Syntax
    [Serializable]
    public class PinConfigurationSaveData

    Constructors

    | Edit this page View Source

    PinConfigurationSaveData()

    Declaration
    public PinConfigurationSaveData()
    | Edit this page View Source

    PinConfigurationSaveData(bool)

    Declaration
    private PinConfigurationSaveData(bool isNull)
    Parameters
    Type Name Description
    bool isNull

    Fields

    | Edit this page View Source

    headDirection

    The (local) head direction for which the pin configuration was created.

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

    isNull

    Flag indicating that this instance represents null. This is necessary because Unity's JSON utility will force null instances of serializable classes to be initialized.

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

    lineRotationHead

    The global angle of the line along which partition sets are placed in the particle's head.

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

    lineRotationTail

    The global angle of the line along which partition sets are placed in the particle's tail.

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

    nullInstance

    Declaration
    private static PinConfigurationSaveData nullInstance
    Field Value
    Type Description
    PinConfigurationSaveData
    | Edit this page View Source

    partitionSetColorOverrides

    Color override flags of all partition sets.

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

    partitionSetColors

    The colors of all partition sets.

    Declaration
    public Color[] partitionSetColors
    Field Value
    Type Description
    Color[]
    | Edit this page View Source

    partitionSetDrawHandleFlags

    Draw handle flags of all partition sets.

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

    partitionSetHeadPositions

    Head positions of all partition sets in polar coordinates.

    Declaration
    public Vector2[] partitionSetHeadPositions
    Field Value
    Type Description
    Vector2[]
    | Edit this page View Source

    partitionSetTailPositions

    Tail positions of all partition sets in polar coordinates.

    Declaration
    public Vector2[] partitionSetTailPositions
    Field Value
    Type Description
    Vector2[]
    | Edit this page View Source

    pinPartitionSets

    The partition set IDs of the pins. The entry at index i is the ID of the partition set to which the pin with ID i belongs.

    Note that pin and partition set IDs can be interpreted in different ways based on the chirality and compass orientation of the particle.

    Declaration
    public int[] pinPartitionSets
    Field Value
    Type Description
    int[]
    | Edit this page View Source

    placementModeHead

    The placement mode of the pin configuration in the particle's head.

    Declaration
    public PSPlacementMode placementModeHead
    Field Value
    Type Description
    PSPlacementMode
    | Edit this page View Source

    placementModeTail

    The placement mode of the pin configuration in the particle's tail.

    Declaration
    public PSPlacementMode placementModeTail
    Field Value
    Type Description
    PSPlacementMode

    Properties

    | Edit this page View Source

    NullInstance

    A special instance of this class representing null.

    Declaration
    public static PinConfigurationSaveData NullInstance { get; }
    Property Value
    Type Description
    PinConfigurationSaveData

    Methods

    | Edit this page View Source

    Equals(object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    object.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    object.GetHashCode()

    Operators

    | Edit this page View Source

    operator ==(PinConfigurationSaveData, PinConfigurationSaveData)

    Declaration
    public static bool operator ==(PinConfigurationSaveData d1, PinConfigurationSaveData d2)
    Parameters
    Type Name Description
    PinConfigurationSaveData d1
    PinConfigurationSaveData d2
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator !=(PinConfigurationSaveData, PinConfigurationSaveData)

    Declaration
    public static bool operator !=(PinConfigurationSaveData d1, PinConfigurationSaveData d2)
    Parameters
    Type Name Description
    PinConfigurationSaveData d1
    PinConfigurationSaveData d2
    Returns
    Type Description
    bool
    • 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