Search Results for

    Show / Hide Table of Contents

    Class EdgeDetection

    This utility analyses a mesh, finding a hash that indicates what it can connect two. There's two steps to the analysis.

    • For each corner of the cell, determine if it is inside or outside the mesh. This handles non watertight meshes.
    • For each face of the cell, find the mesh edges coincident to that face.

    The hashes are unique to a specific face and specific rotation of the tile, and are structured in a way that you can get the same has for a left pointing and right pointing face if they share the same mesh edges and corners.

    Inheritance
    object
    EdgeDetection
    Namespace: Tessera
    Assembly: Tessera.dll
    Syntax
    public static class EdgeDetection

    Fields

    DefaultTolerance

    Declaration
    public const float DefaultTolerance = 1E-06
    Field Value
    Type Description
    float

    Methods

    GetFaces(TesseraTileBase, IEnumerable<CellRotation>, MeshData, HashSet<(Vector3Int, CellCorner)>, float, bool)

    Declaration
    public static IList<EdgeDetection.Face> GetFaces(TesseraTileBase tile, IEnumerable<CellRotation> rotations, MeshData meshData, HashSet<(Vector3Int, CellCorner)> interiorCorners, float tolerance = 1E-06, bool debug = false)
    Parameters
    Type Name Description
    TesseraTileBase tile
    IEnumerable<CellRotation> rotations
    MeshData meshData
    HashSet<(Vector3Int, CellCorner)> interiorCorners
    float tolerance
    bool debug
    Returns
    Type Description
    IList<EdgeDetection.Face>

    GetFaces(TesseraTileBase, IEnumerable<CellRotation>, Mesh, float, bool)

    Extracts a summary of all the tile faces.

    Declaration
    public static IList<EdgeDetection.Face> GetFaces(TesseraTileBase tile, IEnumerable<CellRotation> rotations, Mesh mesh, float tolerance = 1E-06, bool debug = false)
    Parameters
    Type Name Description
    TesseraTileBase tile
    IEnumerable<CellRotation> rotations
    Mesh mesh
    float tolerance
    bool debug
    Returns
    Type Description
    IList<EdgeDetection.Face>

    GetInteriorCorners(TesseraTileBase, MeshData, bool)

    null mesh => all exterior empty mesh => all interior

    Declaration
    public static HashSet<(Vector3Int, CellCorner)> GetInteriorCorners(TesseraTileBase tile, MeshData meshData, bool debug = false)
    Parameters
    Type Name Description
    TesseraTileBase tile
    MeshData meshData
    bool debug
    Returns
    Type Description
    HashSet<(Vector3Int, CellCorner)>
    In this article
    Back to top Generated by DocFX