Search Results for

    Show / Hide Table of Contents

    Struct NativeArray2D<T>

    A 2-dimension Unity.Collections.NativeArray<T> backed array.

    Implements
    System.IDisposable
    Namespace: GDX.Collections.Generic
    Syntax
    public struct NativeArray2D<T> : IDisposable where T : struct
    Type Parameters
    Name Description
    T

    Type of objects.

    Remarks

    Use X (horizontal) and Y (vertical) arrangement.

    Constructors

    | Improve this Doc View Source

    NativeArray2D(Int32, Int32, Allocator, NativeArrayOptions)

    Create a NativeArray2D<T>.

    Declaration
    public NativeArray2D(int rowCount, int columnCount, Allocator allocator, NativeArrayOptions nativeArrayOptions)
    Parameters
    Type Name Description
    System.Int32 rowCount

    The number of rows (X).

    System.Int32 columnCount

    The number of columns (Y).

    Unity.Collections.Allocator allocator

    The Unity.Collections.Allocator type to use.

    Unity.Collections.NativeArrayOptions nativeArrayOptions

    Should the memory be cleared on allocation?

    Fields

    | Improve this Doc View Source

    Array

    The backing Unity.Collections.NativeArray<T>.

    Declaration
    public NativeArray<T> Array
    Field Value
    Type Description
    Unity.Collections.NativeArray<T>
    | Improve this Doc View Source

    ColumnCount

    The length of each pseudo-array in the dataset.

    Declaration
    public int ColumnCount
    Field Value
    Type Description
    System.Int32
    Remarks

    CAUTION! Changing this will alter the understanding of the data.

    | Improve this Doc View Source

    RowCount

    The number of pseudo-arrays created to support the dimensionality.

    Declaration
    public int RowCount
    Field Value
    Type Description
    System.Int32
    Remarks

    CAUTION! Changing this will alter the understanding of the data.

    Properties

    | Improve this Doc View Source

    Item[Int32, Int32]

    Get a typed object at a specific 2-dimensional index in Array.

    Declaration
    public T this[int x, int y] { get; set; }
    Parameters
    Type Name Description
    System.Int32 x

    The row/line number (vertical axis).

    System.Int32 y

    The column number (horizontal axis).

    Property Value
    Type Description
    T

    Methods

    | Improve this Doc View Source

    AddColumns(Int32, Allocator, NativeArrayOptions)

    Add additional columns to the dataset.

    Declaration
    public void AddColumns(int numberOfNewColumns, Allocator allocator, NativeArrayOptions nativeArrayOptions)
    Parameters
    Type Name Description
    System.Int32 numberOfNewColumns

    The number of columns add.

    Unity.Collections.Allocator allocator

    The Unity.Collections.Allocator type to use.

    Unity.Collections.NativeArrayOptions nativeArrayOptions

    Should the memory be cleared on allocation?

    | Improve this Doc View Source

    AddRows(Int32, Allocator, NativeArrayOptions)

    Add additional rows to the dataset.

    Declaration
    public void AddRows(int numberOfNewRows, Allocator allocator, NativeArrayOptions nativeArrayOptions)
    Parameters
    Type Name Description
    System.Int32 numberOfNewRows

    The number of rows/arrays to add.

    Unity.Collections.Allocator allocator

    The Unity.Collections.Allocator type to use.

    Unity.Collections.NativeArrayOptions nativeArrayOptions

    Should the memory be cleared on allocation?

    | Improve this Doc View Source

    Dispose()

    Properly dispose of Array.

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

    ReverseColumns()

    Reverse the order of the columns in the backing Array.

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

    ReverseRows()

    Reverse the order of the rows in the backing Array.

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

    ToMultiDimensionalArray()

    Creates a copy of the internal array as a traditional multi-dimensional array.

    Declaration
    public T[, ] ToMultiDimensionalArray()
    Returns
    Type Description
    T[,]

    A new copy of the backing Array in multi-dimensional form.

    Remarks

    Useful for scenarios where fills need to be done with [,] structured multi-dimensional arrays.

    Implements

    System.IDisposable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Built on 2024-01-01 against 1f69a68.
    Generated by Dox+DocFX.