Search Results for

    Show / Hide Table of Contents

    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
    object
    RendererParticles
    Namespace: AS2.Visuals
    Assembly: .dll
    Syntax
    public class RendererParticles

    Constructors

    | Edit this page View Source

    RendererParticles()

    Declaration
    public RendererParticles()

    Fields

    | Edit this page View Source

    circuitAndBondRenderer

    Renderer for the circuits and bonds.

    Declaration
    public RendererCircuitsAndBonds circuitAndBondRenderer
    Field Value
    Type Description
    RendererCircuitsAndBonds
    | Edit this page View Source

    instance

    Declaration
    public static RendererParticles instance
    Field Value
    Type Description
    RendererParticles
    | Edit this page View Source

    particleToParticleGraphicalDataMap

    Storage of all registered particles at this system.

    Declaration
    private Dictionary<IParticleState, ParticleGraphicsAdapterImpl> particleToParticleGraphicalDataMap
    Field Value
    Type Description
    Dictionary<IParticleState, ParticleGraphicsAdapterImpl>
    | Edit this page View Source

    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 Source

    Particle_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

    true if and only if the particle was added successfully.

    | Edit this page View Source

    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.

    | Edit this page View Source

    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

    true if and only if the color of the given particle was changed.

    | Edit this page View Source

    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.

    | Edit this page View Source

    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.

    • 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