Struct NativeUniformArray3D<T>
A three-dimensional Unity.Collections.NativeArray<T> backed array.
Implements
Namespace: GDX.Collections.Generic
Syntax
public struct NativeUniformArray3D<T> : IDisposable where T : struct
Type Parameters
Name | Description |
---|---|
T | Type of objects. |
Constructors
| Improve this Doc View SourceNativeUniformArray3D(Int32, Allocator, NativeArrayOptions)
Create a NativeUniformArray3D<T> with a uniform dimensional length.
Declaration
public NativeUniformArray3D(int stride, Allocator allocator, NativeArrayOptions nativeArrayOptions)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | stride | X length, Y length and Z length will all be set to this value. |
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 SourceArray
The backing Unity.Collections.NativeArray<T>.
Declaration
public NativeArray<T> Array
Field Value
Type | Description |
---|---|
Unity.Collections.NativeArray<T> |
Length
The length of Array.
Declaration
public readonly int Length
Field Value
Type | Description |
---|---|
System.Int32 |
Stride
The stride of each dimensional segment in Array.
Declaration
public readonly int Stride
Field Value
Type | Description |
---|---|
System.Int32 |
StrideSquared
Stores a cached copy of the stride squared.
Declaration
public readonly int StrideSquared
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
| Improve this Doc View SourceItem[Int32, Int32, Int32]
Access a specific location in the voxel.
Declaration
public T this[int x, int y, int z] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | X location index. |
System.Int32 | y | Y location index. |
System.Int32 | z | Z location index. |
Property Value
Type | Description |
---|---|
T |
Item[int3]
Access a specific location in the voxel.
Declaration
public T this[int3 index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.int3 | index | A 3-Dimensional index. |
Property Value
Type | Description |
---|---|
T |
Methods
| Improve this Doc View SourceDispose()
Properly dispose of the NativeUniformArray3D<T>.
Declaration
public void Dispose()
GetFromIndex(Int32)
Get the three-dimensional index of a flat array index.
Declaration
public int3 GetFromIndex(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | A flat array index. |
Returns
Type | Description |
---|---|
Unity.Mathematics.int3 | A three-dimensional voxel index. |