Search Results for

    Show / Hide Table of Contents

    Class RenderSystem

    Base class for all the rendering of the particles. Stores most render settings and initiates the render process. The render system is a tree-like structure with multiple sub-parts which all have their individual tasks. RendererBackground: Renders the background. RendererParticles: Renders particles, circuits and connections. RendererUI: Renders the overlay over particles.

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

    Constructors

    | Edit this page View Source

    RenderSystem(AmoebotSimulator, InputController)

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

    Fields

    | Edit this page View Source

    animation_animationTriggerTimestamp

    The time at which the current movement animation was triggered.

    Declaration
    public static float animation_animationTriggerTimestamp
    Field Value
    Type Description
    float
    | Edit this page View Source

    animation_curAnimationPercentage

    The fraction of the current movement animation time that has already passed.

    Declaration
    public static float animation_curAnimationPercentage
    Field Value
    Type Description
    float
    | Edit this page View Source

    animationsOn

    Determines whether the movement animations should be played. Can be set in the Settings Panel and the configuration file.

    Declaration
    public static bool animationsOn
    Field Value
    Type Description
    bool
    | Edit this page View Source

    const_amountOfLinesPerMesh

    Number of lines in each direction of the background mesh.

    Declaration
    public const int const_amountOfLinesPerMesh = 100
    Field Value
    Type Description
    int
    | Edit this page View Source

    const_animationTimePercentage

    The fraction of the round duration that should be used for the movement animation.

    Declaration
    public const float const_animationTimePercentage = 0.6
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_beepTimePercentage

    The fraction of the round duration that should be used for the beep animation.

    Declaration
    public const float const_beepTimePercentage = 0.2
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_bondsLineWidthCirc

    Width of bond lines in graph view mode.

    Declaration
    public const float const_bondsLineWidthCirc = 0.15
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_bondsLineWidthHex

    Width of bond lines in hexagonal view modes.

    Declaration
    public const float const_bondsLineWidthHex = 0.4
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_circuitConnectorLineWidth

    Width of circuit lines outside of the particles and beeping circuit lines.

    Declaration
    public const float const_circuitConnectorLineWidth = 0.06
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_circuitLineWidth

    Width of circuit lines in the particles.

    Declaration
    public const float const_circuitLineWidth = 0.02
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_circuitPinBeepHighlightSizePercentage

    Fraction of the partition set pin that should be colored when the partition set has received a beep or has suffered a failure.

    Declaration
    public const float const_circuitPinBeepHighlightSizePercentage = 0.75
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_circuitPinBeepOriginSizePercentage

    Fraction of the partition set pin that should be colored when the partition set is a beep or message origin.

    Declaration
    public const float const_circuitPinBeepOriginSizePercentage = 0.5
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_circuitPinConnectorSize

    Default size of "pins" used to fill the gaps at the vertices of circuit connector lines. Should usually be equal to const_circuitLineWidth.

    Declaration
    public const float const_circuitPinConnectorSize = 0.02
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_circuitPinSize

    Default scaling factor of internal pins representing partition sets.

    Declaration
    public const float const_circuitPinSize = 0.1
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_circuitSingletonPinSize

    Default scaling factor of internal pins representing singleton partition sets.

    Declaration
    public const float const_circuitSingletonPinSize = 0.085
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_circularViewBGLineLength

    Length of graph view background lines in world units.

    Declaration
    public const int const_circularViewBGLineLength = 1000000
    Field Value
    Type Description
    int
    | Edit this page View Source

    const_circularViewBGLineWidth

    Width of graph view background lines as fraction of row height.

    Declaration
    public const float const_circularViewBGLineWidth = 0.06
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_hexagonalBGHexLineAmount

    Number of hexagons in one mesh for the hexagonal background.

    Declaration
    public const int const_hexagonalBGHexLineAmount = 200
    Field Value
    Type Description
    int
    | Edit this page View Source

    const_hexagonalBorderWidth

    The thickness of hexagon borders at the corners. Does not scale with const_hexagonalScale (increasing the scale leads to relatively thinner borders).

    Declaration
    public const float const_hexagonalBorderWidth = 0.12
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_hexagonalScale

    Universal scale for hexagons.

    Declaration
    public const float const_hexagonalScale = 1
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_maxCircuitBeepDuration

    The maximal duration of the beep animation in seconds.

    Declaration
    public const float const_maxCircuitBeepDuration = 0.75
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_maxHexagonalAnimationDuration

    The maximal duration of the movement animation in seconds.

    Declaration
    public const float const_maxHexagonalAnimationDuration = 2
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_mesh_boundingBoxRadius

    The radius used for calculating manual mesh bounding boxes.

    Declaration
    public static float const_mesh_boundingBoxRadius
    Field Value
    Type Description
    float
    | Edit this page View Source

    const_mesh_useManualBoundingBoxRadius

    Determines whether the bounding boxes of meshes should be enlarged to avoid objects being culled while they are still visible. This is especially helpful for animations that are implemented using shaders that apply vertex offsets.

    Declaration
    public static bool const_mesh_useManualBoundingBoxRadius
    Field Value
    Type Description
    bool
    | Edit this page View Source

    const_objectIndentFactor

    The fraction of the hexagon size that the borders of object meshes should have. Should be at most 1.

    Declaration
    public const float const_objectIndentFactor = 0.9
    Field Value
    Type Description
    float
    | Edit this page View Source

    data_circuitAnimationDuration

    Circuit connection fade in time after movement. (Decided to disable this feature by setting the duration to 0.)

    Declaration
    public static float data_circuitAnimationDuration
    Field Value
    Type Description
    float
    | Edit this page View Source

    data_circuitBeepDuration

    Duration of a beep animation in seconds.

    Declaration
    public static float data_circuitBeepDuration
    Field Value
    Type Description
    float
    | Edit this page View Source

    data_circuitBeepRepeatDelay

    DEPRECATED.

    The delay between beep repetitions when the simulation is paused.

    Declaration
    public static float data_circuitBeepRepeatDelay
    Field Value
    Type Description
    float
    | Edit this page View Source

    data_circuitBeepRepeatOn

    DEPRECATED.

    Determines whether the beep animation should be played repeatedly while the simulation is paused. Can be set in the Settings Panel.

    Declaration
    public static bool data_circuitBeepRepeatOn
    Field Value
    Type Description
    bool
    | Edit this page View Source

    data_hexagonalAnimationDuration

    Duration of each movement animation in seconds.

    Declaration
    public static float data_hexagonalAnimationDuration
    Field Value
    Type Description
    float
    | Edit this page View Source

    data_particleMovementFinishedTimestamp

    The predicted time at which the current movement animation will be finished.

    Declaration
    public static float data_particleMovementFinishedTimestamp
    Field Value
    Type Description
    float
    | Edit this page View Source

    data_roundTime

    The time between two round simulations.

    Declaration
    public static float data_roundTime
    Field Value
    Type Description
    float
    | Edit this page View Source

    flag_circuitBorderActive

    Determines whether circuit lines between particles should have a border. Can be set in the Settings Panel and the configuration file.

    Declaration
    public static bool flag_circuitBorderActive
    Field Value
    Type Description
    bool
    | Edit this page View Source

    flag_particleRoundOver

    Flag that should be set in the first frame after the particle visuals have been updated by a round simulation. Will be reset immediately after rendering the frame.

    Declaration
    public static bool flag_particleRoundOver
    Field Value
    Type Description
    bool
    | Edit this page View Source

    flag_partitionSetViewType

    Determines the partition set placement mode. Can be modified in the UI.

    Declaration
    public static PartitionSetViewType flag_partitionSetViewType
    Field Value
    Type Description
    PartitionSetViewType
    | Edit this page View Source

    flag_showBonds

    Determines whether or not bonds should be rendered. Can be modified through the UI.

    Declaration
    public static bool flag_showBonds
    Field Value
    Type Description
    bool
    | Edit this page View Source

    flag_showCircuitView

    Determines whether or not pins and circuits should be rendered. Can be modified through the UI.

    Declaration
    public static bool flag_showCircuitView
    Field Value
    Type Description
    bool
    | Edit this page View Source

    flag_showCircuitViewOuterRing

    Determines whether the outer ring should be drawn around particles in the graph view mode. Can be set in the Settings Panel and the configuration file.

    Declaration
    public static bool flag_showCircuitViewOuterRing
    Field Value
    Type Description
    bool
    | Edit this page View Source

    global_particleScale

    The global scaling factor for particles.

    Declaration
    public static readonly float global_particleScale
    Field Value
    Type Description
    float
    | Edit this page View Source

    map

    Declaration
    private ParticleSystem map
    Field Value
    Type Description
    ParticleSystem
    | Edit this page View Source

    renderQueue_background

    Declaration
    public static readonly int renderQueue_background
    Field Value
    Type Description
    int
    | Edit this page View Source

    renderQueue_bonds

    Declaration
    public static readonly int renderQueue_bonds
    Field Value
    Type Description
    int
    | Edit this page View Source

    renderQueue_circuitBeeps

    Declaration
    public static readonly int renderQueue_circuitBeeps
    Field Value
    Type Description
    int
    | Edit this page View Source

    renderQueue_circuits

    Declaration
    public static readonly int renderQueue_circuits
    Field Value
    Type Description
    int
    | Edit this page View Source

    renderQueue_object_ui

    Declaration
    public static readonly int renderQueue_object_ui
    Field Value
    Type Description
    int
    | Edit this page View Source

    renderQueue_objects

    Declaration
    public static readonly int renderQueue_objects
    Field Value
    Type Description
    int
    | Edit this page View Source

    renderQueue_overlays

    Declaration
    public static readonly int renderQueue_overlays
    Field Value
    Type Description
    int
    | Edit this page View Source

    renderQueue_particles

    Declaration
    public static readonly int renderQueue_particles
    Field Value
    Type Description
    int
    | Edit this page View Source

    renderQueue_pinBeeps

    Declaration
    public static readonly int renderQueue_pinBeeps
    Field Value
    Type Description
    int
    | Edit this page View Source

    renderQueue_pinFault

    Declaration
    public static readonly int renderQueue_pinFault
    Field Value
    Type Description
    int
    | Edit this page View Source

    renderQueue_pins

    Declaration
    public static readonly int renderQueue_pins
    Field Value
    Type Description
    int
    | Edit this page View Source

    rendererBG

    The background renderer.

    Declaration
    public RendererBackground rendererBG
    Field Value
    Type Description
    RendererBackground
    | Edit this page View Source

    rendererObj

    The object renderer.

    Declaration
    public RendererObjects rendererObj
    Field Value
    Type Description
    RendererObjects
    | Edit this page View Source

    rendererP

    The particle and circuit renderer.

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

    rendererUI

    The UI overlay renderer.

    Declaration
    public RendererUI rendererUI
    Field Value
    Type Description
    RendererUI
    | Edit this page View Source

    setting_antiAliasing

    Declaration
    public int setting_antiAliasing
    Field Value
    Type Description
    int
    | Edit this page View Source

    setting_viewType

    Declaration
    public static ViewType setting_viewType
    Field Value
    Type Description
    ViewType
    | Edit this page View Source

    zLayer_background

    Declaration
    public const float zLayer_background = 10
    Field Value
    Type Description
    float
    | Edit this page View Source

    zLayer_bonds

    Declaration
    public const float zLayer_bonds = 9
    Field Value
    Type Description
    float
    | Edit this page View Source

    zLayer_circuits

    Declaration
    public const float zLayer_circuits = 7
    Field Value
    Type Description
    float
    | Edit this page View Source

    zLayer_object_ui

    Declaration
    public const float zLayer_object_ui = 8.75
    Field Value
    Type Description
    float
    | Edit this page View Source

    zLayer_objects

    Declaration
    public const float zLayer_objects = 8.5
    Field Value
    Type Description
    float
    | Edit this page View Source

    zLayer_particles

    Declaration
    public const float zLayer_particles = 8
    Field Value
    Type Description
    float
    | Edit this page View Source

    zLayer_pins

    Declaration
    public const float zLayer_pins = 6
    Field Value
    Type Description
    float
    | Edit this page View Source

    zLayer_ui

    Declaration
    public const float zLayer_ui = -5
    Field Value
    Type Description
    float

    Methods

    | Edit this page View Source

    AntiAliasing_Decr()

    Decrements the anti-aliasing samples.

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

    AntiAliasing_Incr()

    Increments the anti-aliasing samples.

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

    AreBondsActive()

    Checks if the bonds are currently shown.

    Declaration
    public bool AreBondsActive()
    Returns
    Type Description
    bool

    true if and only if the bonds are visible.

    | Edit this page View Source

    CircuitCalculationOver()

    Signalizes the Renderer that the last round of circuit updates has been successfully calculated (all circuits have been updated). Updates that have not yet been shown will be displayed now.

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

    GetAntiAliasing()

    Returns the current anti-aliasing setting.

    Declaration
    public int GetAntiAliasing()
    Returns
    Type Description
    int

    The current number of anti-aliasing samples.

    | Edit this page View Source

    GetCurrentViewType()

    Returns the current view type.

    Declaration
    public ViewType GetCurrentViewType()
    Returns
    Type Description
    ViewType

    The ViewType currently used to render the particle system.

    | Edit this page View Source

    GetPSetViewType()

    Returns the partition set view type.

    Declaration
    public PartitionSetViewType GetPSetViewType()
    Returns
    Type Description
    PartitionSetViewType

    The PartitionSetViewType currently used to place partition sets.

    | Edit this page View Source

    IsCircuitViewActive()

    Checks if the circuits are currently visible.

    Declaration
    public bool IsCircuitViewActive()
    Returns
    Type Description
    bool

    true if and only if the circuits are visible.

    | Edit this page View Source

    ParticleMovementOver()

    Signalizes the Renderer that the last round of particle movements has been successfully calculated, triggering the movement animation.

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

    Render()

    The render loop of the render system. This is called once per frame.

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

    SetAntiAliasing(int)

    Updates the anti-aliasing setting of the graphical interface.

    Declaration
    public void SetAntiAliasing(int value)
    Parameters
    Type Name Description
    int value

    0 = off, 2,4,8 = Anti-Aliasing samples.

    | Edit this page View Source

    SetRoundTime(float)

    Updates the timing of the animations.

    Declaration
    public void SetRoundTime(float roundTime)
    Parameters
    Type Name Description
    float roundTime

    The new duration of a round. Must not be 0.

    | Edit this page View Source

    ToggleAntiAliasing()

    Toggles through the anti-aliasing in the following order: 0->2->4->8->0 ...

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

    ToggleBonds()

    Toggles the bonds on and off.

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

    ToggleCircuits()

    Toggles the circuit view on and off.

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

    TogglePSetPositioning()

    Toggles the partition set positioning. Code override -> Auto disk -> Auto circle -> Line.

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

    ToggleViewType()

    Toggles through the available view types: Hexagonal -> Circular -> Graph.

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