Search Results for

    Show / Hide Table of Contents

    Class RendererUI

    Renderer for the UI. Basically draws the overlay for the currently selected tool over the particles and forwards the current tool input to the corresponding handler.

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

    Constructors

    | Edit this page View Source

    RendererUI(AmoebotSimulator, InputController)

    Declaration
    public RendererUI(AmoebotSimulator sim, InputController inputController)
    Parameters
    Type Name Description
    AmoebotSimulator sim
    InputController inputController

    Fields

    | Edit this page View Source

    addToolObjectSelected

    Declaration
    private bool addToolObjectSelected
    Field Value
    Type Description
    bool
    | Edit this page View Source

    addToolSelectedObject

    Declaration
    private IObjectInfo addToolSelectedObject
    Field Value
    Type Description
    IObjectInfo
    | Edit this page View Source

    currentlyDragging

    Declaration
    private bool currentlyDragging
    Field Value
    Type Description
    bool
    | Edit this page View Source

    input

    Declaration
    private InputManager input
    Field Value
    Type Description
    InputManager
    | Edit this page View Source

    inputController

    Declaration
    private InputController inputController
    Field Value
    Type Description
    InputController
    | Edit this page View Source

    material_hexagonAddObjectOverlay

    Declaration
    public Material material_hexagonAddObjectOverlay
    Field Value
    Type Description
    Material
    | Edit this page View Source

    material_hexagonAddOverlay

    Declaration
    public Material material_hexagonAddOverlay
    Field Value
    Type Description
    Material
    | Edit this page View Source

    material_hexagonMoveOverlay

    Declaration
    public Material material_hexagonMoveOverlay
    Field Value
    Type Description
    Material
    | Edit this page View Source

    material_hexagonMoveSelectionOverlay

    Declaration
    public Material material_hexagonMoveSelectionOverlay
    Field Value
    Type Description
    Material
    | Edit this page View Source

    material_hexagonRemoveOverlay

    Declaration
    public Material material_hexagonRemoveOverlay
    Field Value
    Type Description
    Material
    | Edit this page View Source

    material_hexagonSelectionOverlay

    Declaration
    public Material material_hexagonSelectionOverlay
    Field Value
    Type Description
    Material
    | Edit this page View Source

    material_objectSelectionOverlay

    Declaration
    public Material material_objectSelectionOverlay
    Field Value
    Type Description
    Material
    | Edit this page View Source

    mesh_baseHexagonBackground

    Declaration
    public Mesh mesh_baseHexagonBackground
    Field Value
    Type Description
    Mesh
    | Edit this page View Source

    moveToolObjectOffset

    Declaration
    private Vector2Int moveToolObjectOffset
    Field Value
    Type Description
    Vector2Int
    | Edit this page View Source

    moveToolObjectSelected

    Declaration
    private bool moveToolObjectSelected
    Field Value
    Type Description
    bool
    | Edit this page View Source

    moveToolParticlePosition

    Declaration
    private Vector2Int moveToolParticlePosition
    Field Value
    Type Description
    Vector2Int
    | Edit this page View Source

    moveToolParticleSelected

    Declaration
    private bool moveToolParticleSelected
    Field Value
    Type Description
    bool
    | Edit this page View Source

    moveToolSelectedObject

    Declaration
    private IObjectInfo moveToolSelectedObject
    Field Value
    Type Description
    IObjectInfo
    | Edit this page View Source

    pSetDragHandler

    Declaration
    private PSetDragHandler pSetDragHandler
    Field Value
    Type Description
    PSetDragHandler
    | Edit this page View Source

    sim

    Declaration
    private AmoebotSimulator sim
    Field Value
    Type Description
    AmoebotSimulator

    Methods

    | Edit this page View Source

    ClickActionCallback(ClickAction)

    Called when a click or a drag (also ongoing drag) is executed. Handles all the actions that should be executed when this happens (e.g., selecting a particle, adding a particle etc.).

    Declaration
    public void ClickActionCallback(ClickAction action)
    Parameters
    Type Name Description
    ClickAction action

    The click or drag action that occurred.

    | Edit this page View Source

    Render(ViewType)

    The render loop of the renderer. Here the mostly hexagonal overlays are drawn based on the current state of the renderer UI and the current mouse position.

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

    The current view type used to visualize the particle system.

    | Edit this page View Source

    ResetSelection()

    Resets the current selection state. This should be called whenever the system is regenerated in Init Mode.

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

    TryMoveObject(IObjectInfo, Vector2Int)

    Declaration
    private bool TryMoveObject(IObjectInfo obj, Vector2Int newPos)
    Parameters
    Type Name Description
    IObjectInfo obj
    Vector2Int newPos
    Returns
    Type Description
    bool
    | Edit this page View Source

    TryRemoveObject(IObjectInfo, Vector2Int, bool)

    Tries to remove the given position from the given object. Should be called by the Remove tool.

    If the object only consists of the given position, the object is removed from the object completely.

    Declaration
    private void TryRemoveObject(IObjectInfo obj, Vector2Int position, bool showWarning = false)
    Parameters
    Type Name Description
    IObjectInfo obj

    The object under the cursor.

    Vector2Int position

    The position to be removed.

    bool showWarning

    Whether a warning message should be displayed when the part of the object cannot be removed.

    | Edit this page View Source

    TryRemoveParticle(IParticleState)

    Tries to remove the given particle from the system. Should be called by the Remove tool.

    Declaration
    private void TryRemoveParticle(IParticleState particle)
    Parameters
    Type Name Description
    IParticleState particle

    The particle to be removed.

    • 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