Representación de vectores tetradimensionales.
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.
one | Shorthand for writing Vector4(1,1,1,1). |
zero | Shorthand for writing Vector4(0,0,0,0). |
magnitude | Returns the length of this vector (Read Only). |
normalized | Returns this vector with a magnitude of 1 (Read Only). |
sqrMagnitude | Returns the squared length of this vector (Read Only). |
this[int] | Access the x, y, z, w components using [0], [1], [2], [3] respectively. |
w | Componente W del vector. |
x | Componente X del vector. |
y | Componente Y del vector. |
z | Componente Z del vector. |
Vector4 | Creates a new vector with given x, y, z, w components. |
Set | Set x, y, z and w components of an existing Vector4. |
ToString | Returns a nicely formatted string for this vector. |
Distance | Devuelve la distancia entre a y b. |
Dot | Producto escalar de dos vectores. |
Lerp | Interpola linearmente entre dos vectores. |
LerpUnclamped | Interpola linearmente entre dos vectores. |
Max | Returns a vector that is made from the largest components of two vectors. |
Min | Returns a vector that is made from the smallest components of two vectors. |
MoveTowards | Mueve un punto current hacia target. |
Normalize | |
Project | Proyecta un vector sobre otro. |
Scale | Multiplies two vectors component-wise. |
operator - | Resta un vector a otro. |
operator != | Devuelve verdadero si los vectores son diferentes. |
operator * | Multiplica el vector por un número. |
operator / | Divide el vector por un número. |
operator + | Suma dos vectores. |
operator == | Devuelve true si dos vectores son iguales. |
Vector2 | Convierte un Vector4 a Vector2. |
Vector3 | Convierte un Vector4 a Vector3. |
Vector4 | Convierte un Vector3 a Vector4. |
Vector4 | Convierte un Vector2 a Vector4. |