
## Vector4 class

A vector with four components.



The Vector4 type exposes the following members:

### Constructors
| Constructor | Description |
| :- | :- |
| [`__init__(self, vec, w)`](/3d/python-net/aspose.threed.utilities/vector4/__init__/#aspose.threed.utilities.vector3-float) | Initializes a new instance of the [`Vector4`](/3d/python-net/aspose.threed.utilities/vector4) struct. |
| [`__init__(self, vec)`](/3d/python-net/aspose.threed.utilities/vector4/__init__/#aspose.threed.utilities.vector3) | Initializes a new instance of the [`Vector4`](/3d/python-net/aspose.threed.utilities/vector4) struct. |
| [`__init__(self, vec)`](/3d/python-net/aspose.threed.utilities/vector4/__init__/#aspose.threed.utilities.fvector4) | Initializes a new instance of the [`Vector4`](/3d/python-net/aspose.threed.utilities/vector4) struct. |
| [`__init__(self, x, y, z)`](/3d/python-net/aspose.threed.utilities/vector4/__init__/#float-float-float) | Initializes a new instance of the [`Vector4`](/3d/python-net/aspose.threed.utilities/vector4) struct. |
| [`__init__(self, x, y, z, w)`](/3d/python-net/aspose.threed.utilities/vector4/__init__/#float-float-float-float) | Initializes a new instance of the [`Vector4`](/3d/python-net/aspose.threed.utilities/vector4) struct. |
| [`__init__(self)`](/3d/python-net/aspose.threed.utilities/vector4/__init__/#) | Constructs a new instance of Vector4 |


### Properties
| Property | Description |
| :- | :- |
| [x](/3d/python-net/aspose.threed.utilities/vector4/x) | The x component. |
| [y](/3d/python-net/aspose.threed.utilities/vector4/y) | The y component. |
| [z](/3d/python-net/aspose.threed.utilities/vector4/z) | The z component. |
| [w](/3d/python-net/aspose.threed.utilities/vector4/w) | The w component. |


### Methods
| Method | Description |
| :- | :- |
| [`set(self, new_x, new_y, new_z)`](/3d/python-net/aspose.threed.utilities/vector4/set/#float-float-float) | Sets vector's xyz components at a time, w will be set to 1 |
| [`set(self, new_x, new_y, new_z, new_w)`](/3d/python-net/aspose.threed.utilities/vector4/set/#float-float-float-float) | Sets vector's all components at a time |
| [`compare_to(self, other)`](/3d/python-net/aspose.threed.utilities/vector4/compare_to/#aspose.threed.utilities.vector4) | Compare current vector to another instance. |



### See Also
* module [`aspose.threed.utilities`](..)
* class [`Vector4`](/3d/python-net/aspose.threed.utilities/vector4)
