Search Results for

    Show / Hide Table of Contents

    Class ParticleGraphicsAdapterImpl

    Implementation of IParticleGraphicsAdapter.

    Inheritance
    object
    ParticleGraphicsAdapterImpl
    Implements
    IParticleGraphicsAdapter
    Namespace: AS2.Visuals
    Assembly: .dll
    Syntax
    public class ParticleGraphicsAdapterImpl : IParticleGraphicsAdapter

    Constructors

    | Edit this page View Source

    ParticleGraphicsAdapterImpl(IParticleState, RendererParticles)

    Declaration
    public ParticleGraphicsAdapterImpl(IParticleState particle, RendererParticles renderer)
    Parameters
    Type Name Description
    IParticleState particle
    RendererParticles renderer

    Fields

    | Edit this page View Source

    defColor

    Declaration
    private static Color defColor
    Field Value
    Type Description
    Color
    | Edit this page View Source

    graphics_color

    Declaration
    public Color graphics_color
    Field Value
    Type Description
    Color
    | Edit this page View Source

    graphics_colorRenderer

    Declaration
    public RendererParticles_RenderBatch graphics_colorRenderer
    Field Value
    Type Description
    RendererParticles_RenderBatch
    | Edit this page View Source

    graphics_globalID

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

    graphics_isRegistered

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

    graphics_listID

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

    graphics_listNumber

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

    particle

    Declaration
    public IParticleState particle
    Field Value
    Type Description
    IParticleState
    | Edit this page View Source

    renderer

    Declaration
    private RendererParticles renderer
    Field Value
    Type Description
    RendererParticles
    | Edit this page View Source

    state_cur

    Declaration
    public ParticleGraphicsAdapterImpl.PositionSnap state_cur
    Field Value
    Type Description
    ParticleGraphicsAdapterImpl.PositionSnap
    | Edit this page View Source

    state_prev

    Declaration
    public ParticleGraphicsAdapterImpl.PositionSnap state_prev
    Field Value
    Type Description
    ParticleGraphicsAdapterImpl.PositionSnap

    Methods

    | Edit this page View Source

    AddParticle(ParticleMovementState)

    Adds the particle to the renderer. Only needs to be called once to register a particle.

    Declaration
    public void AddParticle(ParticleMovementState movementState)
    Parameters
    Type Name Description
    ParticleMovementState movementState

    The current movement state of the new particle.

    | Edit this page View Source

    BondUpdate(ParticleBondGraphicState)

    Renders a particle bond for this round. Only call this on one of the two connected particles. Call Order: Update(ParticleMovementState) methods of all particles, then all BondUpdate(ParticleBondGraphicState) methods so that all bonds are rendered.

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

    Data about the current state of the bond.

    | Edit this page View Source

    CircuitUpdate(ParticlePinGraphicState)

    Pushes an update for the pin configuration of the particle and the immediate connections to neighboring particles.

    Declaration
    public void CircuitUpdate(ParticlePinGraphicState state)
    Parameters
    Type Name Description
    ParticlePinGraphicState state

    Data about the current state of the particle's pin configuration and neighbor connections.

    | Edit this page View Source

    ClearParticleColor()

    Call this when you want to remove the particle color. It goes back to default afterwards. This only needs to be called when the color which has been set manually should be removed.

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

    HideParticle()

    Complements ShowParticle(). Hides the particle. Call this if you want to hide the particle.

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

    RemoveParticle()

    Removes a particle from the renderer. Only needs to be called once when the particle is removed from the system.

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

    SetParticleColor(Color)

    Call this when you want to update the particle color. This only needs to be called when the color which has automatically been set when the particle was added to the rendering system should be changed in some way.

    Declaration
    public void SetParticleColor(Color color)
    Parameters
    Type Name Description
    Color color

    The new color of the particle.

    | Edit this page View Source

    ShowParticle()

    Complements HideParticle(). Shows the particle. Calling this method is not necessary if the particle is never hidden. By default the particle is visible once it is added and updated.

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

    Update(ParticleMovementState)

    Updates the particle graphics. This is applied and shown directly in the next render cycle. Call it once per round, even if the particle has not moved.

    Example: A particle has expanded. Call Update(ParticleMovementState) to update the visuals.

    Declaration
    public void Update(ParticleMovementState movementState)
    Parameters
    Type Name Description
    ParticleMovementState movementState

    The updated movement state of the particle.

    | Edit this page View Source

    Update(bool, ParticleJointMovementState, bool)

    Declaration
    private void Update(bool forceRenderUpdate, ParticleJointMovementState jointMovementState, bool noAnimation)
    Parameters
    Type Name Description
    bool forceRenderUpdate
    ParticleJointMovementState jointMovementState
    bool noAnimation
    | Edit this page View Source

    Update(bool, ParticleMovementState, bool)

    Declaration
    private void Update(bool forceRenderUpdate, ParticleMovementState movementState, bool noAnimation)
    Parameters
    Type Name Description
    bool forceRenderUpdate
    ParticleMovementState movementState
    bool noAnimation
    | Edit this page View Source

    UpdateReset()

    Like Update(ParticleMovementState), but forces the update to be applied visually without an animation, even if the particle positions are the same as in the previous frame.

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

    UpdateReset(ParticleMovementState)

    Like Update(ParticleMovementState), but forces the update to be applied visually without an animation, even if the particle positions are the same as in the previous frame.

    Declaration
    public void UpdateReset(ParticleMovementState movementState)
    Parameters
    Type Name Description
    ParticleMovementState movementState

    The new movement state of the particle.

    Implements

    IParticleGraphicsAdapter
    • 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