DOTS Geometry
 
Loading...
Searching...
No Matches
NativeArrayExtensions Class Reference

Static Public Member Functions

static void DisposeIfCreated< T > (this NativeArray< T > arr)
 
static void Swap< T > (this NativeArray< T > arr, int a, int b)
 Swaps two elements within the Native Array.
 
static NativeArray< float2 > ToFloatArray (this NativeArray< Vector2 > arr)
 Reinterprets the Vector2-Array as a float2-Array.
 
static NativeArray< float3 > ToFloatArray (this NativeArray< Vector3 > arr)
 Reinterprets the Vector3-Array as a float3-Array.
 
static NativeArray< Vector2 > ToVectorArray (this NativeArray< float2 > arr)
 Reinterprets the float3-Array as a Vector3-Array.
 
static NativeArray< Vector3 > ToVectorArray (this NativeArray< float3 > arr)
 Reinterprets the float2-Array as a Vector2-Array.
 

Member Function Documentation

◆ DisposeIfCreated< T >()

static void DisposeIfCreated< T > ( this NativeArray< T > arr)
static
Type Constraints
T :unmanaged 

◆ Swap< T >()

static void Swap< T > ( this NativeArray< T > arr,
int a,
int b )
static

Swaps two elements within the Native Array.

Template Parameters
T
Parameters
arr
a
b
Type Constraints
T :unmanaged 

◆ ToFloatArray() [1/2]

static NativeArray< float2 > ToFloatArray ( this NativeArray< Vector2 > arr)
static

Reinterprets the Vector2-Array as a float2-Array.

Parameters
arr
Returns

◆ ToFloatArray() [2/2]

static NativeArray< float3 > ToFloatArray ( this NativeArray< Vector3 > arr)
static

Reinterprets the Vector3-Array as a float3-Array.

Parameters
arr
Returns

◆ ToVectorArray() [1/2]

static NativeArray< Vector2 > ToVectorArray ( this NativeArray< float2 > arr)
static

Reinterprets the float3-Array as a Vector3-Array.

Parameters
arr
Returns

◆ ToVectorArray() [2/2]

static NativeArray< Vector3 > ToVectorArray ( this NativeArray< float3 > arr)
static

Reinterprets the float2-Array as a Vector2-Array.

Parameters
arr
Returns