Vector4
class Vector4
Vector4 is a Vector with 4 positions, respectively, X, Y, X and W, that is, a vector in 4d dimension space. They are used to store positions, directions, etc.
public class Vector4
— Constructors (9) —
Constructor | Description |
---|---|
Vector4() | Creates a new Vector4 with all values setted as 0. |
Vector4(float a) | Creates a new Vector4 with all values setted to be "a" argument. |
Vector4(int a) | Creates a new Vector4 with all values setted to be "a" argument. |
Vector4(float x, float y) | Creates a new Vector4 with X and Y setted as "x' and "y" arguments respectively, Z and W stted as 0. |
Vector4(int x, int y) | Creates a new Vector4 with X and Y setted as "x' and "y" arguments respectively, Z and W stted as 0. |
Vector4(float x, float y, float z) | Creates a new Vector4 with X, Y and Z setted as "x" , "y" and "z" arguments respectively, W setted as 0. |
Vector4(int x, int y, int z) | Creates a new Vector4 with X, Y and Z setted as "x" , "y" and "z" arguments respectively, W setted as 0. |
Vector4(float x, float y, float z, float w) | Creates a new Vector4 with X, Y, Z and W setted as "x" , "y", "z" and "w" arguments respectively. |
Vector4(int x, int y, int z, int w) | Creates a new Vector4 with X, Y, Z and W setted as "x" , "y", "z" and "w" arguments respectively. |
— Methods (11) —
Name | Description |
---|---|
float getX() | Return the current X value inside of this vector. |
float getY() | Return the current Y value inside of this vector. |
float getZ() | Return the current Z value inside of this vector. |
float getW() | Return the current W value inside of this vector. |
void setX(float value) | Sets the current X value inside of this vector with a new value. |
void setY(float value) | Sets the current Y value inside of this vector with a new value. |
void setZ(float value) | Sets the current Z value inside of this vector with a new value. |
void setW(float value) | Sets the current W value inside of this vector with a new value. |
void set(Vector4 value) | Sets the current value within this vector with a new vector of the argument. |
void set(float a) | Sets the current value within this vector to a new value. |
void set(float x, float y, float z, float w) | Sets the current x, y, z and w value within this vector to a new value. |