Search Results for

    Show / Hide Table of Contents

    Struct UnsafeVertexData

    An managed, resizable vertex data, without any thread safety check features. Stores generic vertex information in interleaved array. As example if structure is created with Position+Normal attributes as result data will be stored in memory as follows: position0/normal0/position1/normal1...

    Implements
    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.LowLevel.Unsafe
    Assembly: ProjectDawn.Geometry.dll
    Syntax
    public struct UnsafeVertexData : IDisposable

    Constructors

    | Improve this Doc View Source

    UnsafeVertexData(Int32, NativeArray<VertexAttributeDescriptor>, AllocatorManager.AllocatorHandle)

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

    Properties

    | Improve this Doc View Source

    AttributesLength

    Vertex attribute count.

    Declaration
    public int AttributesLength { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Capacity

    The number of elements that fit in the current allocation.

    Declaration
    public int Capacity { get; }
    Property Value
    Type Description
    System.Int32

    The number of elements that fit in the current allocation.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Thrown if the new capacity is smaller than the length.

    | Improve this Doc View Source

    Flags

    Vertex attribute mask used for creating this vertex data.

    Declaration
    public VertexAttributes Flags { get; }
    Property Value
    Type Description
    VertexAttributes
    | Improve this Doc View Source

    IsCreated

    Whether this the vertex data has been allocated (and not yet deallocated).

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

    True if this the vertex data has been allocated (and not yet deallocated).

    | Improve this Doc View Source

    IsEmpty

    Whether the vertex data is empty.

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

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

    | Improve this Doc View Source

    Length

    The count of elements.

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    System.Int32

    The current count of elements. Always less than or equal to the capacity.

    Remarks

    To decrease the memory used by a list, set Capacity after reducing the length of the list.

    | Improve this Doc View Source

    Size

    Size of the single vertex. It is a sum of all attributes size.

    Declaration
    public int Size { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    Clear()

    Clears the container.

    Declaration
    public void Clear()
    Remarks

    Stack Capacity remains unchanged.

    | Improve this Doc View Source

    Create(Int32, NativeArray<VertexAttributeDescriptor>, AllocatorManager.AllocatorHandle)

    Creates a new container with the specified initial capacity and type of memory allocation.

    Declaration
    public static UnsafeVertexData*Create(int initialCapacity, NativeArray<VertexAttributeDescriptor> attributes, AllocatorManager.AllocatorHandle allocator)
    Parameters
    Type Name Description
    System.Int32 initialCapacity

    The initial capacity of the list. If the list grows larger than its capacity, the internal array is copied to a new, larger array.

    Unity.Collections.NativeArray<UnityEngine.Rendering.VertexAttributeDescriptor> attributes
    Unity.Collections.AllocatorManager.AllocatorHandle allocator

    A member of the Unity.Collections.Allocator enumeration.

    Returns
    Type Description
    UnsafeVertexData*
    | Improve this Doc View Source

    Destroy(UnsafeVertexData*)

    Destroys container.

    Declaration
    public static void Destroy(UnsafeVertexData*data)
    Parameters
    Type Name Description
    UnsafeVertexData* data
    | Improve this Doc View Source

    Dispose()

    Releases all resources (memory and safety handles).

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

    ElementPointerAt(Int32)

    Returns pointer to element at index.

    Declaration
    public void *ElementPointerAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    An index.

    Returns
    Type Description
    System.Void*

    Returns pointer to element at index.

    | Improve this Doc View Source

    GetUnsafePointer()

    Returns pointer to data.

    Declaration
    public void *GetUnsafePointer()
    Returns
    Type Description
    System.Void*

    Returns pointer to data.

    | Improve this Doc View Source

    GetVertexAttributesPointer()

    Returns pointer to attributes.

    Declaration
    public VertexAttributeDescriptor*GetVertexAttributesPointer()
    Returns
    Type Description
    UnityEngine.Rendering.VertexAttributeDescriptor*

    Returns pointer to attributes.

    | Improve this Doc View Source

    Resize(Int32, NativeArrayOptions)

    Sets the length of this vertex data, increasing the capacity if necessary.

    Declaration
    public void Resize(int length, NativeArrayOptions options = NativeArrayOptions.UninitializedMemory)
    Parameters
    Type Name Description
    System.Int32 length

    The new length of this vertex data.

    Unity.Collections.NativeArrayOptions options

    Whether to clear any newly allocated bytes to all zeroes.

    | Improve this Doc View Source

    SetCapacity(Int32)

    Sets the capacity.

    Declaration
    public void SetCapacity(int capacity)
    Parameters
    Type Name Description
    System.Int32 capacity

    The new capacity.

    Implements

    System.IDisposable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © ProjectDawn.
    Generated by DocFX