• Installation Guide
  • Amoebot Model
  • User Guide
  • Model Reference
  • Dev Guide
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • AS2
      • AlgorithmGenerator
      • AlgorithmGeneratorEditor
      • AlgorithmManager
      • AlgorithmManager.AlgorithmInfo
      • AmoebotFunctions
      • AmoebotSimulator
      • CameraUtils
      • CellRect
      • CellRect.CellRect_Iterator
      • ColorData
      • Config
      • ConfigData
      • ConfigData.AdditionalConfiguration
      • ConfigData.SettingsMenu
      • ConfigurationEditor
      • ConfigurationEditorBehavior
      • Constants
      • Direction
      • DirectionHelpers
      • EventDatabase
      • FileBrowser
      • FileBrowser.FileTypeHandler
      • FilePaths
      • InitModeSaveData
      • InitParticleSaveData
      • InitRandomWithHoles
      • Initialization
      • Initialization.Chirality
      • Initialization.Compass
      • InitializationMethod
      • InitializationMethod.DistanceSortedVectorList
      • InitializationMethodManager
      • InitializationMethodManager.AlgorithmInfo
      • InitializationStateSaveData
      • Log
      • MaterialDatabase
      • MessageSaveData
      • MinMax
      • MouseController
      • PSPlacementMode
      • ParticleAttributeEnumSaveData
      • ParticleAttributePCSaveData
      • ParticleAttributeSaveDataBase
      • ParticleAttributeSaveData<T>
      • ParticleObjectSaveData
      • ParticleStateSaveData
      • PinConfigurationHistorySaveData
      • PinConfigurationSaveData
      • RandomNumberGenerator
      • SaveStateUtility
      • SimulationStateSaveData
      • StatusInfoAttribute
      • TypeConverter
      • TypeConverter.ConversionResult
      • UIDatabase
      • ValueHistorySaveData<T>
    • AS2.Algos.BeepFailureTest
      • BeepFailureTestParticle
    • AS2.Algos.BinOpTest
      • BinOpTestInitializer
      • BinOpTestParticle
      • BinOpTestParticle.Mode
    • AS2.Algos.BoundaryTest
      • BoundaryTestParticle
      • Phase
      • SCMode
    • AS2.Algos.BoundaryTestSub
      • BoundaryTestSubParticle
    • AS2.Algos.ChiralityCompass
      • ChiralityAndCompassInitializer
      • ChiralityAndCompassParticle
      • CoinTossResult
      • DirectionMessage
    • AS2.Algos.CollisionTestAlgo
      • CollisionTestAlgoInitializer
      • CollisionTestAlgoParticle
    • AS2.Algos.CollisionTestAlgo2
      • CollisionTestAlgo2Initializer
      • CollisionTestAlgo2Particle
      • Role
    • AS2.Algos.ExpandedCircuitTest
      • ExpandedCircuitTestInitializer
      • ExpandedCircuitTestParticle
    • AS2.Algos.JMTest
      • JMTestInitializer
      • JMTestParticle
    • AS2.Algos.LeaderElection
      • LeaderElectionInitializer
      • LeaderElectionParticle
    • AS2.Algos.LineFormation
      • LineFormationInitializer
      • LineFormationParticleSync
      • LineFormationParticleSync.LFState
      • MyMessage
      • MyMessage.Direction
    • AS2.Algos.ObjectTest
      • ObjectTestInitializer
      • ObjectTestParticle
    • AS2.Algos.PASCTestAlgo
      • PASCTestAlgoInitializer
      • PASCTestAlgoParticle
    • AS2.Algos.SingleSourceSP
      • SingleSourceSPInitializer
      • SingleSourceSPParticle
      • SingleSourceSPParticle.Phase
    • AS2.Algos.SmartMaterial
      • SmartMaterialInitializer
      • SmartMaterialParticle
    • AS2.Algos.SubroutineTest
      • SubroutineTestInitializer
      • SubroutineTestParticle
    • AS2.Algos.SubroutineTest2
      • SubroutineTest2Initializer
      • SubroutineTest2Particle
    • AS2.Sim
      • ActionType
      • AlgorithmException
      • AmoebotSimException
      • BondMovementInfo
      • BondMovementInfoList
      • Circuit
      • CollisionChecker
      • CollisionChecker.DebugLine
      • EdgeMovement
      • IParticleAttribute
      • IParticleObject
      • IReplayHistory
      • InitializationParticle
      • InvalidActionException
      • JointMovementInfo
      • Message
      • Neighbor<T>
      • OpenInitParticle
      • Particle
      • ParticleAction
      • ParticleAlgorithm
      • ParticleAttributeBase
      • ParticleAttributeFactory
      • ParticleAttributeWithHistory<T>
      • ParticleAttribute_Bool
      • ParticleAttribute_Direction
      • ParticleAttribute_Enum<T>
      • ParticleAttribute_Float
      • ParticleAttribute_Int
      • ParticleAttribute_PinConfiguration
      • ParticleAttribute_String
      • ParticleAttribute<T>
      • ParticleException
      • ParticleFactory
      • ParticleObject
      • ParticleSystem
      • ParticleSystem_Utils
      • PartitionSet
      • Pin
      • PinConfiguration
      • SimulationException
      • SimulatorException
      • SimulatorStateException
      • SysPartitionSet
      • SysPin
      • SysPinConfiguration
      • ValueHistoryBondInfo
      • ValueHistoryJointMovement
      • ValueHistoryMessage
      • ValueHistoryPinConfiguration
      • ValueHistory<T>
    • AS2.Subroutines
      • Subroutine
    • AS2.Subroutines.BinStateHelpers
      • BinAttributeBitField
      • BinAttributeBool
      • BinAttributeDirection
      • BinAttributeEnum<T>
      • BinAttributeInt
      • BinAttribute<T>
    • AS2.Subroutines.BinaryOps
      • BinOpUtils
      • SubAddition
      • SubBinOps
      • SubBinOps.Mode
      • SubComparison
      • SubComparison.ComparisonResult
      • SubDivision
      • SubMSBDetection
      • SubMultiplication
      • SubSubtraction
    • AS2.Subroutines.BoundaryTest
      • SubBoundaryTest
    • AS2.Subroutines.ETT
      • Comparison
      • SubETT
    • AS2.Subroutines.LeaderElection
      • SubLeaderElection
    • AS2.Subroutines.LeaderElectionFast
      • SubLeaderElectionFast
    • AS2.Subroutines.LeaderElectionSync
      • SubLeaderElectionSync
    • AS2.Subroutines.PASC
      • SubPASC
      • SubPASC2
      • SubPASC2.NbrType
    • AS2.UI
      • ButtonHoldTrigger
      • ClickAction
      • ClickAction.ClickButton
      • ClickAction.ClickType
      • InitializationUIHandler
      • InputAction
      • InputAction.InputType
      • InputController
      • InputHandler
      • InputHandler.MouseState
      • InputManager
      • LineDrawer
      • LogUIHandler
      • LogUIHandler.EntryType
      • ObjectUIHandler
      • ParticleUIExtensionSmoothLerp
      • ParticleUIHandler
      • SettingsUIHandler
      • SizeFitter
      • Tooltip
      • TooltipHandler
      • UIHandler
      • UIHandler.UITool
      • UISetting
      • UISetting_Color
      • UISetting_Color.InputType
      • UISetting_Dropdown
      • UISetting_Header
      • UISetting_MinMax
      • UISetting_MinMax.InputType
      • UISetting_Slider
      • UISetting_Spacing
      • UISetting_Text
      • UISetting_Text.InputType
      • UISetting_Toggle
      • UISetting_ValueSlider
      • WorldSpaceBackgroundUIHandler
      • WorldSpaceUIHandler
      • WorldSpaceUIHandler.ParticleTextUIData
      • WorldSpaceUIHandler.TextType
    • AS2.Visuals
      • CircleDistributionCircleArea
      • CircleDistributionCircleLine
      • IGenerateDynamicMesh
      • IObjectInfo
      • IParticleGraphicsAdapter
      • IParticleState
      • InstancedDrawer
      • MaterialPropertyBlockData
      • MaterialPropertyBlockData_Circuits
      • MaterialPropertyBlockData_Objects
      • MaterialPropertyBlockData_Particles
      • MeshCreator_CircularView
      • MeshCreator_HexagonalView
      • ObjectGraphicsAdapter
      • ObjectGraphicsAdapter.VertexInfo
      • PSetDragHandler
      • ParticleBondGraphicState
      • ParticleGraphicsAdapterImpl
      • ParticleGraphicsAdapterImpl.ParticleMovement
      • ParticleGraphicsAdapterImpl.PositionSnap
      • ParticleJointMovementState
      • ParticleMovementState
      • ParticlePinGraphicState
      • ParticlePinGraphicState.CodeOverrideType_Node
      • ParticlePinGraphicState.NeighborPinConnection
      • ParticlePinGraphicState.PSetData
      • ParticlePinGraphicState.PSetData.GraphicalData
      • ParticlePinGraphicState.PSetData.GraphicalData.CodeOverrideType_PSet
      • ParticlePinGraphicState.PinDef
      • PartitionSetViewType
      • Polar2DCoordinate
      • PriorityQueue<T>
      • RenderBatchIndex
      • RenderSystem
      • RendererBackground
      • RendererCircuitPins_RenderBatch
      • RendererCircuitPins_RenderBatch.PropertyBlockData
      • RendererCircuitsAndBonds
      • RendererCircuits_Instance
      • RendererCircuits_Instance.GDRef
      • RendererCircuits_Instance.ParticleCircuitData
      • RendererCircuits_Instance.ParticleCircuitData.PSetInnerPinRef
      • RendererCircuits_Instance.ParticleCircuitData.PSetInnerPinRef.PinType
      • RendererCircuits_RenderBatch
      • RendererCircuits_RenderBatch.PropertyBlockData
      • RendererCircuits_RenderBatch.PropertyBlockData.ActiveState
      • RendererCircuits_RenderBatch.PropertyBlockData.LineType
      • RendererObjects
      • RendererParticles
      • RendererParticles_RenderBatch
      • RendererParticles_RenderBatch.PropertyBlockData
      • RendererUI
      • TextureCreator
      • ViewType
    • AS2.Visuals.Library
      • DegreeConstants
      • InterpolationConstants
      • MatrixConstants
      • MeshConstants
      • VectorConstants
      • BasicSample
      • CanvasSampleSaveFileImage
      • CanvasSampleSaveFileText
      • HexagonalExpansionPrototype

    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

    RendererUI(AmoebotSimulator, InputController)

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

    Fields

    addToolObjectSelected

    Declaration
    private bool addToolObjectSelected
    Field Value
    Type Description
    bool

    addToolSelectedObject

    Declaration
    private IObjectInfo addToolSelectedObject
    Field Value
    Type Description
    IObjectInfo

    currentlyDragging

    Declaration
    private bool currentlyDragging
    Field Value
    Type Description
    bool

    input

    Declaration
    private InputManager input
    Field Value
    Type Description
    InputManager

    inputController

    Declaration
    private InputController inputController
    Field Value
    Type Description
    InputController

    material_hexagonAddObjectOverlay

    Declaration
    public Material material_hexagonAddObjectOverlay
    Field Value
    Type Description
    Material

    material_hexagonAddOverlay

    Declaration
    public Material material_hexagonAddOverlay
    Field Value
    Type Description
    Material

    material_hexagonMoveOverlay

    Declaration
    public Material material_hexagonMoveOverlay
    Field Value
    Type Description
    Material

    material_hexagonMoveSelectionOverlay

    Declaration
    public Material material_hexagonMoveSelectionOverlay
    Field Value
    Type Description
    Material

    material_hexagonRemoveOverlay

    Declaration
    public Material material_hexagonRemoveOverlay
    Field Value
    Type Description
    Material

    material_hexagonSelectionOverlay

    Declaration
    public Material material_hexagonSelectionOverlay
    Field Value
    Type Description
    Material

    material_objectSelectionOverlay

    Declaration
    public Material material_objectSelectionOverlay
    Field Value
    Type Description
    Material

    mesh_baseHexagonBackground

    Declaration
    public Mesh mesh_baseHexagonBackground
    Field Value
    Type Description
    Mesh

    moveToolObjectOffset

    Declaration
    private Vector2Int moveToolObjectOffset
    Field Value
    Type Description
    Vector2Int

    moveToolObjectSelected

    Declaration
    private bool moveToolObjectSelected
    Field Value
    Type Description
    bool

    moveToolParticlePosition

    Declaration
    private Vector2Int moveToolParticlePosition
    Field Value
    Type Description
    Vector2Int

    moveToolParticleSelected

    Declaration
    private bool moveToolParticleSelected
    Field Value
    Type Description
    bool

    moveToolSelectedObject

    Declaration
    private IObjectInfo moveToolSelectedObject
    Field Value
    Type Description
    IObjectInfo

    pSetDragHandler

    Declaration
    private PSetDragHandler pSetDragHandler
    Field Value
    Type Description
    PSetDragHandler

    sim

    Declaration
    private AmoebotSimulator sim
    Field Value
    Type Description
    AmoebotSimulator

    Methods

    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.

    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.

    ResetSelection()

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

    Declaration
    public void ResetSelection()

    TryMoveObject(IObjectInfo, Vector2Int)

    Declaration
    private bool TryMoveObject(IObjectInfo obj, Vector2Int newPos)
    Parameters
    Type Name Description
    IObjectInfo obj
    Vector2Int newPos
    Returns
    Type Description
    bool

    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.

    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.

    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX