Class ParticlePinGraphicState.PSetData
Stores information belonging to a single partition set.
Inheritance
Namespace: AS2.Visuals
Assembly: .dll
Syntax
public class ParticlePinGraphicState.PSetData
Constructors
| Edit this page View SourcePSetData()
Declaration
private PSetData()
Fields
| Edit this page View SourcebeepOrigin
Whether the partition set sends a beep in the current round.
Declaration
public bool beepOrigin
Field Value
Type | Description |
---|---|
bool |
beepsThisRound
Whether the partition set receives a beep in the current round.
Declaration
public bool beepsThisRound
Field Value
Type | Description |
---|---|
bool |
color
The partition set's color.
Declaration
public Color color
Field Value
Type | Description |
---|---|
Color |
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 |
isFaulty
Whether the partition set has suffered a beep reception failure in the current round.
Declaration
public bool isFaulty
Field Value
Type | Description |
---|---|
bool |
pins
The pins belonging to the partition set.
Declaration
public List<ParticlePinGraphicState.PinDef> pins
Field Value
Type | Description |
---|---|
List<ParticlePinGraphicState.PinDef> |
pool
Declaration
private static Stack<ParticlePinGraphicState.PSetData> pool
Field Value
Type | Description |
---|---|
Stack<ParticlePinGraphicState.PSetData> |
Methods
| Edit this page View SourceClear()
Clears the system for pooling.
Declaration
public void Clear()
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. |
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.
|
Returns
Type | Description |
---|---|
bool |
|
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 |
Returns
Type | Description |
---|---|
bool |
|
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. |
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. |
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()
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 |
|
PinDef[] | pins | An array of pin references that show the pins contained in this system. |
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 |
|
bool | beepOrigin |
|
bool | faulty |
|
PinDef[] | pins | An array of pin references that show the pins contained in this system. |