Search Results for

    Show / Hide Table of Contents

    Class RendererCircuitsAndBonds

    The renderer for the circuits and bonds. In 2 instances which alternate in drawing to the screen, we update the graphical data and draw the instance once all data is ready and the new round should be displayed. After the displayed data is not shown anymore, everything is discarded and built up again. We make sure that no matrices are ever discarded and do not get garbage collection issues.

    (The idea with the instances is used to possibly update data over multiple frames and still show the old instance, so the performance does not drop when a new round is calculated. This system has not yet been implemented completely since the idea came later, so we still build everything in one round, which is performant enough for a certain amount of particles. The particle rendering and render loop steering would also need to be updated to fully make use of the new system.)

    Inheritance
    object
    RendererCircuitsAndBonds
    Namespace: AS2.Visuals
    Assembly: .dll
    Syntax
    public class RendererCircuitsAndBonds

    Fields

    | Edit this page View Source

    renderInstances

    The array of render instances. Usually has size 2.

    Declaration
    public RendererCircuits_Instance[] renderInstances
    Field Value
    Type Description
    RendererCircuits_Instance[]
    | Edit this page View Source

    updateInstance

    The index of the instance that is currently being updated (and not drawn).

    Declaration
    private int updateInstance
    Field Value
    Type Description
    int

    Properties

    | Edit this page View Source

    drawnInstance

    The index of the instance that is currently being drawn.

    Declaration
    private int drawnInstance { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    AddBond(ParticleBondGraphicState)

    Adds the graphical data of a single bond if the bond is not hidden.

    Declaration
    public void AddBond(ParticleBondGraphicState bondState)
    Parameters
    Type Name Description
    ParticleBondGraphicState bondState

    Visual information of the bond.

    | Edit this page View Source

    AddCircuits(ParticleGraphicsAdapterImpl, ParticlePinGraphicState, PositionSnap, PartitionSetViewType)

    Adds the graphical circuit data of a single particle to the system.

    Declaration
    public void AddCircuits(ParticleGraphicsAdapterImpl particle, ParticlePinGraphicState state, ParticleGraphicsAdapterImpl.PositionSnap snap, PartitionSetViewType pSetViewType)
    Parameters
    Type Name Description
    ParticleGraphicsAdapterImpl particle
    ParticlePinGraphicState state

    The graphical data of the particle's pin configuration.

    ParticleGraphicsAdapterImpl.PositionSnap snap

    The position data of the particle.

    PartitionSetViewType pSetViewType
    | Edit this page View Source

    GetCurrentInstance()

    Gets the instance that is currently drawing.

    Declaration
    public RendererCircuits_Instance GetCurrentInstance()
    Returns
    Type Description
    RendererCircuits_Instance

    The currently drawing instance.

    | Edit this page View Source

    ReinitBatches()

    Reinits the batches in the instances. Helpful in case settings have been changed.

    Declaration
    public void ReinitBatches()
    | Edit this page View Source

    Render(ViewType)

    Renders the current instance.

    Declaration
    public void Render(ViewType type)
    Parameters
    Type Name Description
    ViewType type

    The visualization mode that is currently used to render the particle system.

    | Edit this page View Source

    SwitchInstances()

    Switches the instances, so that the currently built instance is now drawn and the currently rendered instance is cleared and can be rebuilt.

    Declaration
    public void SwitchInstances()
    • 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