Vector4
Struct
Representation of four-dimensional vectors.
This structure is used in some places to represent four component vectors (e.g. mesh tangents,
parameters for shaders). In the majority of other cases a Vector3 is used.
Variables
| x |
X component of the vector.
|
| y |
Y component of the vector.
|
| z |
Z component of the vector.
|
| w |
W component of the vector.
|
| this [int index] |
Access the x, y, z, w components using [0], [1], [2], [3] respectively.
|
| normalized |
Returns this vector with a magnitude of 1 (Read Only).
|
| magnitude |
Returns the length of this vector (Read Only).
|
| sqrMagnitude |
Returns the squared length of this vector (Read Only).
|
Constructors
| Vector4 |
Creates a new vector with given x, y, z, w components.
|
Functions
| Scale |
Multiplies every component of this vector by the same component of scale.
|
| Normalize |
Makes this vector have a magnitude of 1.
|
| ToString |
Returns a nicely formatted string for this vector.
|
Class Variables
| zero |
Shorthand for writing Vector4(0,0,0,0)
|
| one |
Shorthand for writing Vector4(1,1,1,1)
|
Class Functions
|