## Vector4 structure

A vector with four components.

```csharp
public struct Vector4 : IComparable<Vector4>
```

## Constructors

| Name | Description |
| --- | --- |
| [Vector4](vector4/#constructor)(FVector4) | Initializes a new instance of the `Vector4` struct. |
| [Vector4](vector4/#constructor_1)(Vector3) | Initializes a new instance of the `Vector4` struct. |
| [Vector4](vector4/#constructor_2)(Vector3, double) | Initializes a new instance of the `Vector4` struct. |
| [Vector4](vector4/#constructor_3)(double, double, double) | Initializes a new instance of the `Vector4` struct. |
| [Vector4](vector4/#constructor_4)(double, double, double, double) | Initializes a new instance of the `Vector4` struct. |

## Methods

| Name | Description |
| --- | --- |
| [CompareTo](../../aspose.threed.utilities/vector4/compareto/)(Vector4) | Compare current vector to another instance. |
| override [Equals](../../aspose.threed.utilities/vector4/equals/)(object) | Check if two vectors are equal |
| override [GetHashCode](../../aspose.threed.utilities/vector4/gethashcode/)() | Gets the hash code of this vector |
| [Set](../../aspose.threed.utilities/vector4/set/#set)(double, double, double) | Sets vector's xyz components at a time, w will be set to 1 |
| [Set](../../aspose.threed.utilities/vector4/set/#set_1)(double, double, double, double) | Sets vector's all components at a time |
| override [ToString](../../aspose.threed.utilities/vector4/tostring/)() | Returns a String that represents the current `Vector4`. |
| [operator +](../../aspose.threed.utilities/vector4/op_addition/) | Operator overloading for + |
| [explicit operator](../../aspose.threed.utilities/vector4/op_explicit/) |  |
| [operator *](../../aspose.threed.utilities/vector4/op_multiply/#op_multiply) | Operator overloading for * (2 operators) |
| [operator -](../../aspose.threed.utilities/vector4/op_subtraction/) | Operator overloading for - (minus) |

## Fields

| Name | Description |
| --- | --- |
| [W](../../aspose.threed.utilities/vector4/w/) | The w component. |
| [X](../../aspose.threed.utilities/vector4/x/) | The x component. |
| [Y](../../aspose.threed.utilities/vector4/y/) | The y component. |
| [Z](../../aspose.threed.utilities/vector4/z/) | The z component. |

### See Also

* namespace [Aspose.ThreeD.Utilities](../../aspose.threed.utilities/)
* assembly [Aspose.3D](../../)


