Search Results for

    Show / Hide Table of Contents

    Class InstancedDrawer

    Helper for instanced drawing of matrices. Contains a dynamically extendable list of matrices and lets you add matrices that should be drawn. Automatically adds new matrix arrays if the max. count of instanced drawing is reached. Once the structure is built, created lists stay in the system, so no new objects are created and the system works with maximal efficiency.

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

    Fields

    | Edit this page View Source

    count

    Declaration
    private int count
    Field Value
    Type Description
    int
    | Edit this page View Source

    matricesList

    Declaration
    private List<Matrix4x4[]> matricesList
    Field Value
    Type Description
    List<Matrix4x4[]>

    Properties

    | Edit this page View Source

    Capacity

    Declaration
    private int Capacity { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    AddMatrix(Matrix4x4)

    Adds a matrix to the system.

    Declaration
    public void AddMatrix(Matrix4x4 matrix)
    Parameters
    Type Name Description
    Matrix4x4 matrix

    The matrix to be added.

    | Edit this page View Source

    ClearMatrices()

    Clears the drawn matrices. Internally, only the counter is set to 0 and the matrices will be overridden when you add new matrices.

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

    Draw(Mesh, Material, MaterialPropertyBlock)

    Draws the matrices stored in this class.

    Declaration
    public void Draw(Mesh mesh, Material mat, MaterialPropertyBlock matPropBlock = null)
    Parameters
    Type Name Description
    Mesh mesh

    The mesh to use.

    Material mat

    The material to use.

    MaterialPropertyBlock matPropBlock

    A material property block. Can be omitted.

    • 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