Editare

Partajați prin


Vector3.CopyTo Method

Definition

Copies the elements of a vector to an array.

Overloads

CopyTo(Span<Single>)

Copies the vector to the given Span<T>. The length of the destination span must be at least 3.

CopyTo(Single[], Int32)

Copies the elements of the vector to a specified array starting at a specified index position.

CopyTo(Single[])

Copies the elements of the vector to a specified array.

CopyTo(Span<Single>)

Source:
Vector3.cs
Source:
Vector3.cs
Source:
Vector3.cs

Copies the vector to the given Span<T>. The length of the destination span must be at least 3.

public:
 void CopyTo(Span<float> destination);
public readonly void CopyTo (Span<float> destination);
member this.CopyTo : Span<single> -> unit
Public Sub CopyTo (destination As Span(Of Single))

Parameters

destination
Span<Single>

The destination span into which the values are copied.

Exceptions

The number of elements in the source vector is greater than the number of elements available in the destination span.

Applies to

CopyTo(Single[], Int32)

Source:
Vector3.cs
Source:
Vector3.cs
Source:
Vector3.cs

Copies the elements of the vector to a specified array starting at a specified index position.

public:
 void CopyTo(cli::array <float> ^ array, int index);
public void CopyTo (float[] array, int index);
public readonly void CopyTo (float[] array, int index);
member this.CopyTo : single[] * int -> unit
Public Sub CopyTo (array As Single(), index As Integer)

Parameters

array
Single[]

The destination array.

index
Int32

The index at which to copy the first element of the vector.

Exceptions

array is null.

The number of elements in the current instance is greater than in the array.

index is less than zero.

-or-

index is greater than or equal to the array length.

array is multidimensional.

array is null.

Remarks

array must have a sufficient number of elements to accommodate the three vector elements. In other words, elements index, index + 1, and index + 2 must already exist in array.

Applies to

CopyTo(Single[])

Source:
Vector3.cs
Source:
Vector3.cs
Source:
Vector3.cs

Copies the elements of the vector to a specified array.

public:
 void CopyTo(cli::array <float> ^ array);
public void CopyTo (float[] array);
public readonly void CopyTo (float[] array);
member this.CopyTo : single[] -> unit
Public Sub CopyTo (array As Single())

Parameters

array
Single[]

The destination array.

Exceptions

array is null.

The number of elements in the current instance is greater than in the array.

array is multidimensional.

array is null.

Remarks

array must have at least three elements. The method copies the vector's elements starting at index 0.

Applies to