Čítať v angličtine Upraviť

Zdieľať cez


Vector4 Constructors

Definition

Creates a new instance of the Vector4 structure.

Overloads

Vector4(ReadOnlySpan<Single>)

Constructs a vector from the given ReadOnlySpan<T>. The span must contain at least 4 elements.

Vector4(Single)

Creates a new Vector4 object whose four elements have the same value.

Vector4(Vector3, Single)

Constructs a new Vector4 object from the specified Vector3 object and a W component.

Vector4(Vector2, Single, Single)

Creates a new Vector4 object from the specified Vector2 object and a Z and a W component.

Vector4(Single, Single, Single, Single)

Creates a vector whose elements have the specified values.

Vector4(ReadOnlySpan<Single>)

Source:
Vector4.cs
Source:
Vector4.cs
Source:
Vector4.cs

Constructs a vector from the given ReadOnlySpan<T>. The span must contain at least 4 elements.

public Vector4(ReadOnlySpan<float> values);

Parameters

values
ReadOnlySpan<Single>

The span of elements to assign to the vector.

Applies to

Vector4(Single)

Source:
Vector4.cs
Source:
Vector4.cs
Source:
Vector4.cs

Creates a new Vector4 object whose four elements have the same value.

public Vector4(float value);

Parameters

value
Single

The value to assign to all four elements.

Applies to

Vector4(Vector3, Single)

Source:
Vector4.cs
Source:
Vector4.cs
Source:
Vector4.cs

Constructs a new Vector4 object from the specified Vector3 object and a W component.

public Vector4(System.Numerics.Vector3 value, float w);

Parameters

value
Vector3

The vector to use for the X, Y, and Z components.

w
Single

The W component.

Applies to

Vector4(Vector2, Single, Single)

Source:
Vector4.cs
Source:
Vector4.cs
Source:
Vector4.cs

Creates a new Vector4 object from the specified Vector2 object and a Z and a W component.

public Vector4(System.Numerics.Vector2 value, float z, float w);

Parameters

value
Vector2

The vector to use for the X and Y components.

z
Single

The Z component.

w
Single

The W component.

Applies to

Vector4(Single, Single, Single, Single)

Source:
Vector4.cs
Source:
Vector4.cs
Source:
Vector4.cs

Creates a vector whose elements have the specified values.

public Vector4(float x, float y, float z, float w);

Parameters

x
Single

The value to assign to the X field.

y
Single

The value to assign to the Y field.

z
Single

The value to assign to the Z field.

w
Single

The value to assign to the W field.

Applies to