Class DcelMesh | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class DcelMesh

    Inheritance
    System.Object
    DcelMesh
    VoronoiBase
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: UnityEngine.Experimental.U2D.TriangleNet.Topology.DCEL
    Syntax
    public class DcelMesh

    Constructors

    DcelMesh()

    Initializes a new instance of the DcelMesh class.

    Declaration
    public DcelMesh()

    DcelMesh(Boolean)

    Initializes a new instance of the class.

    Declaration
    protected DcelMesh(bool initialize)
    Parameters
    Type Name Description
    System.Boolean initialize

    If false, lists will not be initialized.

    Fields

    edges

    Declaration
    protected List<HalfEdge> edges
    Field Value
    Type Description
    System.Collections.Generic.List<HalfEdge>

    faces

    Declaration
    protected List<Face> faces
    Field Value
    Type Description
    System.Collections.Generic.List<Face>

    vertices

    Declaration
    protected List<Vertex> vertices
    Field Value
    Type Description
    System.Collections.Generic.List<Vertex>

    Properties

    Edges

    Gets the collection of edges of the Voronoi diagram.

    Declaration
    public IEnumerable<IEdge> Edges { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IEdge>

    Faces

    Gets the faces of the Voronoi diagram.

    Declaration
    public List<Face> Faces { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<Face>

    HalfEdges

    Gets the list of half-edges specify the Voronoi diagram topology.

    Declaration
    public List<HalfEdge> HalfEdges { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<HalfEdge>

    Vertices

    Gets the vertices of the Voronoi diagram.

    Declaration
    public List<Vertex> Vertices { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<Vertex>

    Methods

    EnumerateEdges()

    Enumerates all edges of the DCEL.

    Declaration
    protected virtual IEnumerable<IEdge> EnumerateEdges()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<IEdge>
    Remarks

    This method assumes that each half-edge has a twin (i.e. NOT null).

    IsConsistent(Boolean, Int32)

    Check if the DCEL is consistend.

    Declaration
    public virtual bool IsConsistent(bool closed = true, int depth = 0)
    Parameters
    Type Name Description
    System.Boolean closed

    If true, faces are assumed to be closed (i.e. all edges must have a valid next pointer).

    System.Int32 depth

    Maximum edge count of faces (default = 0 means skip check).

    Returns
    Type Description
    System.Boolean

    ResolveBoundaryEdges()

    Search for half-edge without twin and add a twin. Connect twins to form connected boundary contours.

    Declaration
    public void ResolveBoundaryEdges()
    Remarks

    This method assumes that all faces are closed (i.e. no edge.next pointers are null).

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023