Search Results for

    Show / Hide Table of Contents

    Class ModuleMesh

    Contains CPU-side information that describes a mesh. This isn't as comprehensive as a Unity Mesh, e.g. this only supports triangle topology.

    All vertex info is stored in struct-of-array form to make it easier to upload to the GPU through Unity.

    Inheritance
    System.Object
    ModuleMesh
    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: CarbideFunction.Wildtile
    Syntax
    public class ModuleMesh

    Fields

    normals

    Normal data for each vertex.

    Declaration
    public Vector3[] normals
    Field Value
    Type Description
    Vector3[]

    subMeshes

    Information about which triangles from triangles map to which material.

    Declaration
    public ModuleMesh.SubMesh[] subMeshes
    Field Value
    Type Description
    ModuleMesh.SubMesh[]

    triangles

    Contains vertex indices describing all triangles in the mesh. Each triangle is made up of 3 consecutive indices in this array.

    Always a multiple of 3. This array is not the same size as the vertex arrays (e.g. vertices).

    Declaration
    public int[] triangles
    Field Value
    Type Description
    System.Int32[]

    uvs

    Stores between 0 and 8 UV channels.

    Declaration
    public ModuleMesh.UvChannel[] uvs
    Field Value
    Type Description
    ModuleMesh.UvChannel[]

    vertices

    Position data for each vertex.

    Declaration
    public Vector3[] vertices
    Field Value
    Type Description
    Vector3[]

    Methods

    CreateEmpty()

    Create an empty but valid ModuleMesh.

    Declaration
    public static ModuleMesh CreateEmpty()
    Returns
    Type Description
    ModuleMesh

    IsEmpty()

    Check if a mesh constructed from this ModuleMesh would not actually be rendered.

    Declaration
    public bool IsEmpty()
    Returns
    Type Description
    System.Boolean

    False if constructing a mesh from this ModuleMesh would render at least one triangle.

    True otherwise.

    In This Article
    Generated by DocFX Wildtile Documentation