Search Results for

    Show / Hide Table of Contents

    Struct MeshSurface

    Mesh data structure. Used for modifying mesh data and reading/writing back to UnityEngine.Mesh.

    Implements
    Unity.Collections.INativeDisposable
    System.IDisposable
    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: ProjectDawn.Geometry3D
    Assembly: ProjectDawn.Geometry.dll
    Syntax
    public struct MeshSurface : INativeDisposable, IDisposable

    Constructors

    | Improve this Doc View Source

    MeshSurface(Int32, NativeArray<VertexAttributeDescriptor>, Allocator)

    Declaration
    public MeshSurface(int initialCapacity, NativeArray<VertexAttributeDescriptor> attributes, Allocator allocator)
    Parameters
    Type Name Description
    System.Int32 initialCapacity
    Unity.Collections.NativeArray<UnityEngine.Rendering.VertexAttributeDescriptor> attributes
    Unity.Collections.Allocator allocator

    Fields

    | Improve this Doc View Source

    Indices

    Index list of the surface.

    Declaration
    public NativeList<int3> Indices
    Field Value
    Type Description
    Unity.Collections.NativeList<Unity.Mathematics.int3>
    | Improve this Doc View Source

    SubMeshes

    Sub meshes of the surface.

    Declaration
    public NativeList<SubMeshDescriptor> SubMeshes
    Field Value
    Type Description
    Unity.Collections.NativeList<UnityEngine.Rendering.SubMeshDescriptor>
    | Improve this Doc View Source

    VertexData

    Vertex Data of the surface.

    Declaration
    public VertexData VertexData
    Field Value
    Type Description
    VertexData

    Properties

    | Improve this Doc View Source

    IsCreated

    Returns if the surface is allocated.

    Declaration
    public bool IsCreated { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsEmpty

    Whether the surface is empty.

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    System.Boolean

    True if the surface is empty or the surface has not been constructed.

    Methods

    | Improve this Doc View Source

    BoundingBox()

    Returns minimum box that fully covers sub meshes.

    Declaration
    public Box BoundingBox()
    Returns
    Type Description
    Box
    | Improve this Doc View Source

    Clear()

    Clears the container.

    Declaration
    public void Clear()
    Remarks

    MeshSurface Capacity remains unchanged.

    | Improve this Doc View Source

    Dispose()

    Releases all resources (memory and safety handles).

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Dispose(JobHandle)

    Creates and schedules a job that releases all resources (memory and safety handles) of this vertex data.

    Declaration
    public JobHandle Dispose(JobHandle inputDeps)
    Parameters
    Type Name Description
    Unity.Jobs.JobHandle inputDeps

    The dependency for the new job.

    Returns
    Type Description
    Unity.Jobs.JobHandle

    The handle of the new job. The job depends upon inputDeps and releases all resources (memory and safety handles) of this vertex data.

    | Improve this Doc View Source

    Read(Mesh.MeshData, JobHandle)

    Writes UnityEngine.Mesh.MeshData into MeshSurface.

    Declaration
    public JobHandle Read(Mesh.MeshData meshData, JobHandle dependency)
    Parameters
    Type Name Description
    UnityEngine.Mesh.MeshData meshData

    Output.

    Unity.Jobs.JobHandle dependency

    The dependency for the new job.

    Returns
    Type Description
    Unity.Jobs.JobHandle

    The handle of the new job.

    | Improve this Doc View Source

    RecalculateBounds(JobHandle)

    Recalculates sub meshes bounds.

    Declaration
    public JobHandle RecalculateBounds(JobHandle dependency)
    Parameters
    Type Name Description
    Unity.Jobs.JobHandle dependency

    The dependency for the new job.

    Returns
    Type Description
    Unity.Jobs.JobHandle

    The handle of the new job.

    | Improve this Doc View Source

    Write(Mesh.MeshData, MeshUpdateFlags, JobHandle)

    Writes MeshSurface into UnityEngine.Mesh.MeshData.

    Declaration
    public JobHandle Write(Mesh.MeshData meshData, MeshUpdateFlags flags, JobHandle dependency)
    Parameters
    Type Name Description
    UnityEngine.Mesh.MeshData meshData

    Output.

    UnityEngine.Rendering.MeshUpdateFlags flags

    Mesh update flags.

    Unity.Jobs.JobHandle dependency

    The dependency for the new job.

    Returns
    Type Description
    Unity.Jobs.JobHandle

    The handle of the new job.

    Implements

    Unity.Collections.INativeDisposable
    System.IDisposable

    Extension Methods

    MeshSurfaceGeneration.Icocapsule(MeshSurface, Capsule, Int32, JobHandle)
    MeshSurfaceGeneration.Icocapsule(MeshSurface, Capsule, Int32)
    MeshSurfaceGeneration.Box(MeshSurface, Box, JobHandle)
    MeshSurfaceGeneration.Box(MeshSurface, Box)
    MeshSurfaceGeneration.Icosahedron(MeshSurface, Sphere)
    MeshSurfaceGeneration.Icosphere(MeshSurface, Sphere, Int32, JobHandle)
    MeshSurfaceGeneration.Icosphere(MeshSurface, Sphere, Int32)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © ProjectDawn.
    Generated by DocFX