Struct RendererCircuits_Instance.ParticleCircuitData
Represents the graphical data related to the circuit information of a single particle. Provides methods to check whether a partition set of the particle is near a given position and to update the partition set and circuit connector positions (used for the partition set dragging feature).
Namespace: AS2.Visuals
Assembly: .dll
Syntax
public struct RendererCircuits_Instance.ParticleCircuitData
Constructors
| Edit this page View SourceParticleCircuitData(RendererCircuits_Instance, ParticleGraphicsAdapterImpl, ParticlePinGraphicState, PositionSnap)
Declaration
public ParticleCircuitData(RendererCircuits_Instance instance, ParticleGraphicsAdapterImpl particle, ParticlePinGraphicState state, ParticleGraphicsAdapterImpl.PositionSnap snap)
Parameters
Type | Name | Description |
---|---|---|
RendererCircuits_Instance | instance | |
ParticleGraphicsAdapterImpl | particle | |
ParticlePinGraphicState | state | |
ParticleGraphicsAdapterImpl.PositionSnap | snap |
Fields
| Edit this page View Sourceinstance
The render instance to which the data belongs.
Declaration
public RendererCircuits_Instance instance
Field Value
Type | Description |
---|---|
RendererCircuits_Instance |
particle
The particle's graphical data.
Declaration
public ParticleGraphicsAdapterImpl particle
Field Value
Type | Description |
---|---|
ParticleGraphicsAdapterImpl |
snap
The particle's current position and movement snapshot.
Declaration
public ParticleGraphicsAdapterImpl.PositionSnap snap
Field Value
Type | Description |
---|---|
ParticleGraphicsAdapterImpl.PositionSnap |
state
The particle's graphical circuit data.
Declaration
public ParticlePinGraphicState state
Field Value
Type | Description |
---|---|
ParticlePinGraphicState |
Methods
| Edit this page View SourceGetInnerPSetOrConnectorPinAtPosition(Vector2)
Tries to get the partition set handle or connector at the given world position.
Declaration
public RendererCircuits_Instance.ParticleCircuitData.PSetInnerPinRef GetInnerPSetOrConnectorPinAtPosition(Vector2 worldPos)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | worldPos | The world position at which to look for the handle. |
Returns
Type | Description |
---|---|
RendererCircuits_Instance.ParticleCircuitData.PSetInnerPinRef | A RendererCircuits_Instance.ParticleCircuitData.PSetInnerPinRef referencing a partition set handle or connector close to the given position, if one is found, otherwise a null instance. |
UpdatePSetOrConnectorPinPosition(PSetInnerPinRef, Vector2)
Changes the position of a partition set handle or connector. Used for dragging the handles with the mouse.
This method accesses the render batches rendering the lines that connect the given handle to its pins and/or connector and updates all the line positions according to the new handle position.
Declaration
public void UpdatePSetOrConnectorPinPosition(RendererCircuits_Instance.ParticleCircuitData.PSetInnerPinRef innerPin, Vector2 worldPos)
Parameters
Type | Name | Description |
---|---|---|
RendererCircuits_Instance.ParticleCircuitData.PSetInnerPinRef | innerPin | A reference to the pin that should be moved. |
Vector2 | worldPos | The new world position of the pin. |