Vector3 Constructors

Definition

Creates a new instance of the Vector3 structure.

Overloads

Vector3(Single)

Creates a new Vector3 object whose three elements have the same value.

Vector3(Vector2, Single)

Creates a new Vector3 object from the specified Vector2 object and the specified value.

Vector3(Single, Single, Single)

Creates a vector whose elements have the specified values.

Vector3(Single)

Creates a new Vector3 object whose three elements have the same value.

public:
 Vector3(float value);
public Vector3 (float value);
new System.Numerics.Vector3 : single -> System.Numerics.Vector3
Public Sub New (value As Single)

Parameters

value
Single

The value to assign to all three elements.

Vector3(Vector2, Single)

Creates a new Vector3 object from the specified Vector2 object and the specified value.

public:
 Vector3(System::Numerics::Vector2 value, float z);
public Vector3 (System.Numerics.Vector2 value, float z);
new System.Numerics.Vector3 : System.Numerics.Vector2 * single -> System.Numerics.Vector3
Public Sub New (value As Vector2, z As Single)

Parameters

value
Vector2

The vector with two elements.

z
Single

The additional value to assign to the Z field.

Vector3(Single, Single, Single)

Creates a vector whose elements have the specified values.

public:
 Vector3(float x, float y, float z);
public Vector3 (float x, float y, float z);
new System.Numerics.Vector3 : single * single * single -> System.Numerics.Vector3
Public Sub New (x As Single, y As Single, z As Single)

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.

Applies to