Search Results for

    Show / Hide Table of Contents

    Class ObjectGraphicsAdapter

    Representation of a ParticleObject in the render system. Stores all graphics-specific data of the object.

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

    Constructors

    | Edit this page View Source

    ObjectGraphicsAdapter(ParticleObject, RendererObjects)

    Declaration
    public ObjectGraphicsAdapter(ParticleObject obj, RendererObjects renderer)
    Parameters
    Type Name Description
    ParticleObject obj
    RendererObjects renderer

    Fields

    | Edit this page View Source

    isRegistered

    Whether this object is already registered in a renderer.

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

    jmOffset

    The joint movement offset registered for the current round.

    Declaration
    public Vector2Int jmOffset
    Field Value
    Type Description
    Vector2Int
    | Edit this page View Source

    mesh

    The mesh used to draw the object. Its origin is at the object's origin. Is null as long as no mesh has been generated.

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

    obj

    The object represented by this adapter.

    Declaration
    public ParticleObject obj
    Field Value
    Type Description
    ParticleObject
    | Edit this page View Source

    propertyBlock

    The property block used to render this object. Is null as long as the object has not been registered for rendering.

    Declaration
    public MaterialPropertyBlockData_Objects propertyBlock
    Field Value
    Type Description
    MaterialPropertyBlockData_Objects
    | Edit this page View Source

    renderer

    The renderer responsible for rendering this object.

    Declaration
    public RendererObjects renderer
    Field Value
    Type Description
    RendererObjects

    Properties

    | Edit this page View Source

    Color

    The color in which the object should be rendered.

    Declaration
    public Color Color { get; }
    Property Value
    Type Description
    Color
    | Edit this page View Source

    IsRegistered

    Whether the object adapter is registered in the render system.

    Declaration
    public bool IsRegistered { get; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    AddObject()

    Adds this object to the render system.

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

    CalculateMatrix(bool, float)

    Calculates the TRS matrix of the object's mesh for the current position and movement.

    Declaration
    public Matrix4x4 CalculateMatrix(bool animated = false, float animationPercentage = 1)
    Parameters
    Type Name Description
    bool animated

    Whether the current movement should be animated.

    float animationPercentage

    The current percentage of the animation. 0 is the start position and 1 is the end position of the movement. The position interpolation is linear.

    Returns
    Type Description
    Matrix4x4

    The TRS matrix corresponding to the object's current position that can be applied to its mesh.

    | Edit this page View Source

    GenerateMesh(bool)

    Generates the mesh for this object.

    Declaration
    public void GenerateMesh(bool debug = false)
    Parameters
    Type Name Description
    bool debug

    Whether the mesh lines should be displayed for debugging.

    | Edit this page View Source

    RemoveObject()

    Removes this object from the render system.

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

    UpdateColor()

    Updates the object adapter's color to match the object's color.

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