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
Namespace: AS2
Assembly: .dll
Syntax
[Serializable]
public class PinConfigurationSaveData
Constructors
| Edit this page View SourcePinConfigurationSaveData()
Declaration
public PinConfigurationSaveData()
PinConfigurationSaveData(bool)
Declaration
private PinConfigurationSaveData(bool isNull)
Parameters
Type | Name | Description |
---|---|---|
bool | isNull |
Fields
| Edit this page View SourceheadDirection
The (local) head direction for which the pin configuration was created.
Declaration
public Direction headDirection
Field Value
Type | Description |
---|---|
Direction |
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 |
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 |
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 |
nullInstance
Declaration
private static PinConfigurationSaveData nullInstance
Field Value
Type | Description |
---|---|
PinConfigurationSaveData |
partitionSetColorOverrides
Color override flags of all partition sets.
Declaration
public bool[] partitionSetColorOverrides
Field Value
Type | Description |
---|---|
bool[] |
partitionSetColors
The colors of all partition sets.
Declaration
public Color[] partitionSetColors
Field Value
Type | Description |
---|---|
Color[] |
partitionSetDrawHandleFlags
Draw handle flags of all partition sets.
Declaration
public bool[] partitionSetDrawHandleFlags
Field Value
Type | Description |
---|---|
bool[] |
partitionSetHeadPositions
Head positions of all partition sets in polar coordinates.
Declaration
public Vector2[] partitionSetHeadPositions
Field Value
Type | Description |
---|---|
Vector2[] |
partitionSetTailPositions
Tail positions of all partition sets in polar coordinates.
Declaration
public Vector2[] partitionSetTailPositions
Field Value
Type | Description |
---|---|
Vector2[] |
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[] |
placementModeHead
The placement mode of the pin configuration in the particle's head.
Declaration
public PSPlacementMode placementModeHead
Field Value
Type | Description |
---|---|
PSPlacementMode |
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 SourceNullInstance
A special instance of this class representing null
.
Declaration
public static PinConfigurationSaveData NullInstance { get; }
Property Value
Type | Description |
---|---|
PinConfigurationSaveData |
Methods
| Edit this page View SourceEquals(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
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
Operators
| Edit this page View Sourceoperator ==(PinConfigurationSaveData, PinConfigurationSaveData)
Declaration
public static bool operator ==(PinConfigurationSaveData d1, PinConfigurationSaveData d2)
Parameters
Type | Name | Description |
---|---|---|
PinConfigurationSaveData | d1 | |
PinConfigurationSaveData | d2 |
Returns
Type | Description |
---|---|
bool |
operator !=(PinConfigurationSaveData, PinConfigurationSaveData)
Declaration
public static bool operator !=(PinConfigurationSaveData d1, PinConfigurationSaveData d2)
Parameters
Type | Name | Description |
---|---|---|
PinConfigurationSaveData | d1 | |
PinConfigurationSaveData | d2 |
Returns
Type | Description |
---|---|
bool |