Search Results for

    Show / Hide Table of Contents

    Class TriangleTestInitializer

    Inheritance
    object
    InitializationMethod
    TriangleTestInitializer
    Namespace: AS2.Algos.SuboracleTest
    Assembly: .dll
    Syntax
    public class TriangleTestInitializer : InitializationMethod

    Constructors

    | Edit this page View Source

    TriangleTestInitializer(ParticleSystem)

    Declaration
    public TriangleTestInitializer(ParticleSystem system)
    Parameters
    Type Name Description
    ParticleSystem system

    Methods

    | Edit this page View Source

    Generate(int, CardinalDirection, bool, bool, bool)

    Declaration
    public void Generate(int sideLength = 41, TriangleTestInitializer.CardinalDirection startDir = CardinalDirection.NNE, bool mirror = false, bool flipLegDir = false, bool surround = false)
    Parameters
    Type Name Description
    int sideLength
    TriangleTestInitializer.CardinalDirection startDir
    bool mirror
    bool flipLegDir
    bool surround
    | Edit this page View Source

    GenerateTriangle(Vector2Int, int, Direction, bool, bool)

    Helper function to generate the positions of the particles in the shape of a equilateral triangle with occupied legs but empty base. Has the option to fill the missing side to generate a full triangle

    Declaration
    public List<Vector2Int> GenerateTriangle(Vector2Int startPos, int sideLength, Direction startDir, bool mirrored, bool fill = false)
    Parameters
    Type Name Description
    Vector2Int startPos

    The starting position of the triangle

    int sideLength

    The length of each side of the triangle

    Direction startDir

    The direction of the first side

    bool mirrored

    Whether the triangle is mirrored (starting with "right" leg)

    bool fill

    Whether to fill the missing side

    Returns
    Type Description
    List<Vector2Int>

    A list of positions representing the triangle

    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.12
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX