Dynamic Water Physics 2
Search Results for

    Show / Hide Table of Contents

    Class Vert

    Represents a vertex in the mesh decimation algorithm. Stores vertex data and relationships for edge collapse operations.

    Inheritance
    object
    Vert
    Namespace: NWH.DWP2.MeshDecimation
    Assembly: NWH.DWP2.dll
    Syntax
    public class Vert

    Constructors

    | Edit this page View Source

    Vert(Vector3, int, bool)

    Initializes a new vertex with position, ID, and selection status.

    Declaration
    public Vert(Vector3 position, int id, bool selected)
    Parameters
    Type Name Description
    Vector3 position

    3D position of the vertex.

    int id

    Unique identifier.

    bool selected

    Whether the vertex is selected.

    Fields

    | Edit this page View Source

    collapse

    Target vertex for edge collapse operation.

    Declaration
    public Vert collapse
    Field Value
    Type Description
    Vert
    | Edit this page View Source

    cost

    Edge collapse cost for this vertex.

    Declaration
    public float cost
    Field Value
    Type Description
    float
    | Edit this page View Source

    deleted

    Whether this vertex has been deleted.

    Declaration
    public bool deleted
    Field Value
    Type Description
    bool
    | Edit this page View Source

    face

    List of triangles that use this vertex.

    Declaration
    public List<Tri> face
    Field Value
    Type Description
    List<Tri>
    | Edit this page View Source

    id

    Unique identifier for this vertex.

    Declaration
    public int id
    Field Value
    Type Description
    int
    | Edit this page View Source

    neighbor

    List of neighboring vertices connected by edges.

    Declaration
    public List<Vert> neighbor
    Field Value
    Type Description
    List<Vert>
    | Edit this page View Source

    position

    3D position of the vertex.

    Declaration
    public Vector3 position
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    selected

    Whether this vertex is marked as selected (prevents collapse if locked).

    Declaration
    public bool selected
    Field Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    AddFace(Tri)

    Adds a triangle to this vertex's face list.

    Declaration
    public void AddFace(Tri f)
    Parameters
    Type Name Description
    Tri f

    Triangle to add.

    | Edit this page View Source

    AddNeighbor(Vert)

    Adds a vertex to the neighbor list if not already present.

    Declaration
    public void AddNeighbor(Vert v)
    Parameters
    Type Name Description
    Vert v

    Vertex to add as neighbor.

    | Edit this page View Source

    IsBorder()

    Checks if this vertex is on the mesh border. A vertex is on the border if any of its edges is shared by only one triangle.

    Declaration
    public bool IsBorder()
    Returns
    Type Description
    bool

    True if the vertex is on the border, false otherwise.

    | Edit this page View Source

    RemoveFace(Tri)

    Removes a triangle from this vertex's face list.

    Declaration
    public void RemoveFace(Tri f)
    Parameters
    Type Name Description
    Tri f

    Triangle to remove.

    | Edit this page View Source

    RemoveIfNonNeighbor(Vert)

    Removes a vertex from the neighbor list if they no longer share any faces.

    Declaration
    public void RemoveIfNonNeighbor(Vert v)
    Parameters
    Type Name Description
    Vert v

    Vertex to potentially remove from neighbors.

    | Edit this page View Source

    RemoveVert()

    Removes this vertex and breaks all neighbor connections.

    Declaration
    public void RemoveVert()
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics