Class RendererParticles
The base class of all particle rendering. Particles that are added to the system give continuous updates on their state over the ParticleGraphicsAdapterImpl class, while the system handles the necessary updates of the visual data to perform the display on the screen.
Inheritance
Namespace: AS2.Visuals
Assembly: .dll
Syntax
public class RendererParticles
Constructors
| Edit this page View SourceRendererParticles()
Declaration
public RendererParticles()
Fields
| Edit this page View SourcecircuitAndBondRenderer
Renderer for the circuits and bonds.
Declaration
public RendererCircuitsAndBonds circuitAndBondRenderer
Field Value
Type | Description |
---|---|
RendererCircuitsAndBonds |
instance
Declaration
public static RendererParticles instance
Field Value
Type | Description |
---|---|
RendererParticles |
particleToParticleGraphicalDataMap
Storage of all registered particles at this system.
Declaration
private Dictionary<IParticleState, ParticleGraphicsAdapterImpl> particleToParticleGraphicalDataMap
Field Value
Type | Description |
---|---|
Dictionary<IParticleState, ParticleGraphicsAdapterImpl> |
propertiesToRenderBatchMap
Collection of batches for the particle rendering (this is where the rendering of the base particles and pins happens).
Declaration
public Dictionary<RendererParticles_RenderBatch.PropertyBlockData, RendererParticles_RenderBatch> propertiesToRenderBatchMap
Field Value
Type | Description |
---|---|
Dictionary<RendererParticles_RenderBatch.PropertyBlockData, RendererParticles_RenderBatch> |
Methods
| Edit this page View SourceParticle_Add(ParticleGraphicsAdapterImpl)
Adds the given particle to a RendererParticles_RenderBatch with the same properties (like color). If no such render batch exists yet, a new one is created.
Declaration
public bool Particle_Add(ParticleGraphicsAdapterImpl graphicalData)
Parameters
Type | Name | Description |
---|---|---|
ParticleGraphicsAdapterImpl | graphicalData | The graphics adapter belonging to the particle to be added. |
Returns
Type | Description |
---|---|
bool |
|
Particle_Remove(ParticleGraphicsAdapterImpl)
Removes the given particle from the stored RenderBatch.
Declaration
public void Particle_Remove(ParticleGraphicsAdapterImpl graphicalData)
Parameters
Type | Name | Description |
---|---|---|
ParticleGraphicsAdapterImpl | graphicalData | The graphics adapter belonging to the particle to be removed. |
Particle_UpdateColor(ParticleGraphicsAdapterImpl, Color, Color)
Updates the color of the particle, this means the RendererParticles_RenderBatch is changed if the new color is different from the old one.
Declaration
public bool Particle_UpdateColor(ParticleGraphicsAdapterImpl gd, Color oldColor, Color color)
Parameters
Type | Name | Description |
---|---|---|
ParticleGraphicsAdapterImpl | gd | The graphics adapter belonging to the particle that is changing colors. |
Color | oldColor | The old color of the particle. |
Color | color | The new color the particle should get. |
Returns
Type | Description |
---|---|
bool |
|
Render(ViewType)
Renders all RendererParticles_RenderBatches as well as the circuits and bonds.
Declaration
public void Render(ViewType viewType)
Parameters
Type | Name | Description |
---|---|---|
ViewType | viewType | The view type that should be used to render the particles. |
SetPinsVisible(bool)
Changes the visibility setting of pins in the base hexagon or round hexagon view mode.
Declaration
public void SetPinsVisible(bool visible)
Parameters
Type | Name | Description |
---|---|---|
bool | visible | Whether the pins should be visible. |