ZLab.Discrete ZLab.Discrete
ZLab.Discrete ZLab.Discrete
Developed by Zeke Zhang

Search Results for

    Edit this page

    Class MeshF

    Triangle mesh with float precision vertices.

    Inheritance
    object
    LicensedBase
    MeshF
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: ZLab.Discrete.Geometry
    Assembly: ZLab.Discrete.dll
    Syntax
    public sealed class MeshF : LicensedBase

    Constructors

    Name Description
    MeshF()

    Creates an empty mesh. (Invalid)

    MeshF(Vector3[], TriFace[])

    Creates a mesh and automatically checks if it is closed. (slow for large meshes, explicitly specify closeness if possible)

    MeshF(Vector3[], TriFace[], bool)

    Creates a mesh with explicit specified closeness. (no watertight check)

    Properties

    Name Description
    Faces

    Array of faces, each face is an array of vertex indices. (must be triangles)

    IsClosed

    Indicates if the mesh is closed (watertight).

    IsValid

    Checks if the mesh is valid (at least 3 vertices and 1 face).

    Vertices

    Array of vertex positions.

    Methods

    Name Description
    EnumerateTriangleBounds()

    Enumerates the axis-aligned bounding boxes (AABB) of each triangle face in the mesh.

    FromObjFile(string)

    Loads a mesh from an OBJ file. Only supports vertices (v) and triangular faces (f).

    GetBounds()

    Gets the axis-aligned bounding box (AABB) of the mesh.

    RecomputeBounds()

    Recomputes the axis-aligned bounding box (AABB) of the mesh.

    RecomputeWaterTight()

    Recomputes whether the mesh is closed (watertight).

    SwapYz()

    Swaps the Y and Z coordinates of all vertices.

    ToObjFile(string)

    Saves the mesh to an OBJ file. Only saves vertices (v) and triangular faces (f).

    Weld(float)

    Welds (merges) vertices that are within the specified tolerance.