Vector with 4 floating point components: (x, y, z, w). More...
Public Member Functions | |
| Vector4 (long cPtr, boolean cMemoryOwn) | |
| Vector4 () | |
| Default constructor, initializes the vector to (0.0, 0.0, 0.0, 0.0). | |
| Vector4 (float v) | |
| Constructor, initializes the vector to (v, v, v, v). More... | |
| Vector4 (float x, float y, float z, float w) | |
| Constructor, initializes the vector to (x, y, z, w). More... | |
| Vector4 | add (float scalar) |
| Adds a scalar to each vector element. More... | |
| Vector4 | add (Vector4 v) |
| Modifies this vector by adding another vector. More... | |
| synchronized void | delete () |
| Vector4 | divide (float scalar) |
| Divides each vector element with a scalar. More... | |
| boolean | equals (Object obj) |
| float | get (long index) |
| Returns the vector element value at index. More... | |
| float | getW () |
| Returns the w element of the vector. More... | |
| float | getX () |
| Returns the x element of the vector. More... | |
| float | getY () |
| Returns the y element of the vector. More... | |
| float | getZ () |
| Returns the z element of the vector. More... | |
| int | hashCode () |
| boolean | hasNan () |
| Returns true if and only if at least one of the vector values is NaN. | |
| float | length () |
| Calculates the length of the vector. More... | |
| Vector4 | multiply (float scalar) |
| Multiplies each vector element with a scalar. More... | |
| Vector4 | normalized () |
| Normalizes the vector and returns the resulting vector. More... | |
| void | set (long index, float value) |
| Sets the vector element at index to value. More... | |
| void | setW (float value) |
| Sets the w element of the vector. More... | |
| void | setX (float value) |
| Sets the x element of the vector. More... | |
| void | setY (float value) |
| Sets the y element of the vector. More... | |
| void | setZ (float value) |
| Sets the z element of the vector. More... | |
| float | squaredLength () |
| Calculates the squared length of the vector. More... | |
| Vector4 | subtract (Vector4 v) |
| Modifies this vector by subtracting another vector from this vector. More... | |
Static Public Member Functions | |
| static Vector4 | add (float scalar, Vector4 v) |
| Adds a scalar and a vector and returns the sum. More... | |
| static Vector4 | add (Vector4 v, float scalar) |
| Adds a vector and a scalar and returns the sum. More... | |
| static Vector4 | add (Vector4 v1, Vector4 v2) |
| Adds two vectors and returns the sum. More... | |
| static Vector4 | componentAbs (Vector4 v) |
| Calculates component-wise absolute value for all elements and returns resulting vector. More... | |
| static Vector4 | componentAdd (Vector4 v, float scalar) |
| Adds a value to all elements of a vector and returns the result. More... | |
| static boolean | componentAllGreaterThan (Vector4 a, Vector4 b) |
| Returns whether each component of the first vector is greater than the corresponding component of the second vector. More... | |
| static boolean | componentAllGreaterThanOrEqual (Vector4 a, Vector4 b) |
| Returns whether each component of the first vector is greater than or equal to the corresponding component of the second vector. More... | |
| static boolean | componentAllLessThan (Vector4 a, Vector4 b) |
| Returns whether each component of the first vector is less than the corresponding component of the second vector. More... | |
| static boolean | componentAllLessThanOrEqual (Vector4 a, Vector4 b) |
| Returns whether each component of the first vector is less than or equal to the corresponding component of the second vector. More... | |
| static Vector4 | componentCeil (Vector4 v) |
| Calculates component-wise ceil value for all elements and returns resulting vector. More... | |
| static Vector4 | componentFloor (Vector4 v) |
| Calculates component-wise floor value for all elements and returns resulting vector. More... | |
| static Vector4 | componentRound (Vector4 v) |
| Calculates component-wise rounded value for all elements and returns resulting vector. More... | |
| static Vector4 | componentSqrt (Vector4 v) |
| Calculates component-wise square root all elements and returns resulting vector. More... | |
| static Vector4 | componentSubtract (Vector4 v, float scalar) |
| Subtracts a value from all elements of a vector and returns the result. More... | |
| static Vector4 | componentWiseDivide (Vector4 v1, Vector4 v2) |
| Divides component-wise all vector elements and returns the resulting vector. More... | |
| static Vector4 | componentWiseMax (Vector4 v1, Vector4 v2) |
| Calculates the component-wise maximum for all vector elements and returns the resulting vector. More... | |
| static Vector4 | componentWiseMin (Vector4 v1, Vector4 v2) |
| Calculates the component-wise minimum for all vector elements and returns the resulting vector. More... | |
| static Vector4 | componentWiseMultiply (Vector4 v1, Vector4 v2) |
| Multiplies component-wise all vector elements and returns the resulting vector. More... | |
| static Vector4 | componentWiseRemainder (Vector4 v1, Vector4 v2) |
| Calculates component-wise the remainder for all vector elements and returns the resulting vector. More... | |
| static Vector4 | divide (Vector4 v, float scalar) |
| Divides all vector elements with a scalar and returns the resulting vector. More... | |
| static float | dotProduct (Vector4 v1, Vector4 v2) |
| Calculates the dot product of two vectors. More... | |
| static long | getCPtr (Vector4 obj) |
| static Vector4 | highestValue () |
| Returns the vector with each element having the most positive float value. More... | |
| static Vector4 | linearTosRGB (Vector4 vec) |
| Conversion to whole Vector4 from linear to sRGB. More... | |
| static Vector4 | lowestValue () |
| Returns the vector with each element having the most negative float value. More... | |
| static Vector4 | multiply (float scalar, Vector4 v) |
| Multiplies all vector elements with a scalar and returns the resulting vector. More... | |
| static Vector4 | multiply (Vector4 v, float scalar) |
| Multiplies all vector elements with a scalar and returns the resulting vector. More... | |
| static Vector4 | nan () |
| Returns the vector with each element being NaN. More... | |
| static Vector4 | negate (Vector4 v) |
| Negates all vector elements and returns the resulting vector. More... | |
| static Vector4 | negativeInfinity () |
| Returns the vector with each element being the negative infinity. More... | |
| static Vector4 | one () |
| Returns the vector with each element being one. More... | |
| static Vector4 | positiveInfinity () |
| Returns the vector with each element being the positive infinity. More... | |
| static Vector4 | sRGBToLinear (Vector4 vec) |
| Conversion to whole Vector4 from sRGB to linear. More... | |
| static Vector4 | subtract (Vector4 v1, Vector4 v2) |
| Subtracts two vectors and returns the difference. More... | |
| static long | swigRelease (Vector4 obj) |
| static Vector4 | zero () |
| Returns the vector with each element being zero. More... | |
Protected Member Functions | |
| void | finalize () |
Protected Attributes | |
| transient boolean | swigCMemOwn |
Vector with 4 floating point components: (x, y, z, w).
| Vector4 | ( | float | v | ) |
Constructor, initializes the vector to (v, v, v, v).
| v | x, y, z, and w component of the vector. |
| Vector4 | ( | float | x, |
| float | y, | ||
| float | z, | ||
| float | w | ||
| ) |
Constructor, initializes the vector to (x, y, z, w).
| x | x component of the vector. |
| y | y component of the vector. |
| z | z component of the vector. |
| w | w component of the vector. |
| Vector4 add | ( | float | scalar | ) |
Adds a scalar to each vector element.
| scalar | Addition to each vector element. |
Modifies this vector by adding another vector.
| v | Another vector. |
Adds a scalar and a vector and returns the sum.
| scalar | Left hand side scalar. |
| v | Right hand side vector. |
Adds a vector and a scalar and returns the sum.
| v | Left hand side vector. |
| scalar | Right hand side scalar. |
Adds two vectors and returns the sum.
| v1 | Left hand side vector. |
| v2 | Right hand side vector. |
Calculates component-wise absolute value for all elements and returns resulting vector.
| v | Vector input. |
Adds a value to all elements of a vector and returns the result.
| v | A vector. |
| scalar | A scalar. |
Returns whether each component of the first vector is greater than the corresponding component of the second vector.
| a | First vector. |
| b | Second vector. |
Returns whether each component of the first vector is greater than or equal to the corresponding component of the second vector.
| a | First vector. |
| b | Second vector. |
Returns whether each component of the first vector is less than the corresponding component of the second vector.
| a | First vector. |
| b | Second vector. |
Returns whether each component of the first vector is less than or equal to the corresponding component of the second vector.
| a | First vector. |
| b | Second vector. |
Calculates component-wise ceil value for all elements and returns resulting vector.
| v | Vector input. |
Calculates component-wise floor value for all elements and returns resulting vector.
| v | Vector input. |
Calculates component-wise rounded value for all elements and returns resulting vector.
| v | Vector input. |
Calculates component-wise square root all elements and returns resulting vector.
| v | Vector input. |
Subtracts a value from all elements of a vector and returns the result.
| v | A vector. |
| scalar | A scalar. |
Divides component-wise all vector elements and returns the resulting vector.
| v1 | The first vector. |
| v2 | The second vector. |
Calculates the component-wise maximum for all vector elements and returns the resulting vector.
| v1 | The first vector. |
| v2 | The second vector. |
Calculates the component-wise minimum for all vector elements and returns the resulting vector.
| v1 | The first vector. |
| v2 | The second vector. |
Multiplies component-wise all vector elements and returns the resulting vector.
| v1 | The first vector. |
| v2 | The second vector. |
Calculates component-wise the remainder for all vector elements and returns the resulting vector.
| v1 | The first vector. |
| v2 | The second vector. |
| Vector4 divide | ( | float | scalar | ) |
Divides each vector element with a scalar.
| scalar | Divider for each vector element. |
Divides all vector elements with a scalar and returns the resulting vector.
| v | A vector. |
| scalar | A scalar. |
Calculates the dot product of two vectors.
| v1 | The first vector. |
| v2 | The second vector. |
| float get | ( | long | index | ) |
Returns the vector element value at index.
| float getW | ( | ) |
Returns the w element of the vector.
| float getX | ( | ) |
Returns the x element of the vector.
| float getY | ( | ) |
Returns the y element of the vector.
| float getZ | ( | ) |
Returns the z element of the vector.
|
static |
Returns the vector with each element having the most positive float value.
| float length | ( | ) |
Calculates the length of the vector.
|
static |
Returns the vector with each element having the most negative float value.
| Vector4 multiply | ( | float | scalar | ) |
Multiplies each vector element with a scalar.
| scalar | Multiplier for each vector element. |
Multiplies all vector elements with a scalar and returns the resulting vector.
| scalar | A scalar. |
| v | A vector. |
Multiplies all vector elements with a scalar and returns the resulting vector.
| v | A vector. |
| scalar | A scalar. |
|
static |
Returns the vector with each element being NaN.
Negates all vector elements and returns the resulting vector.
| v | A vector. |
|
static |
Returns the vector with each element being the negative infinity.
| Vector4 normalized | ( | ) |
Normalizes the vector and returns the resulting vector.
|
static |
Returns the vector with each element being one.
|
static |
Returns the vector with each element being the positive infinity.
| void set | ( | long | index, |
| float | value | ||
| ) |
Sets the vector element at index to value.
| index | Vector element index to set. |
| value | Value to set. |
| void setW | ( | float | value | ) |
Sets the w element of the vector.
| value | The new value of the w element. |
| void setX | ( | float | value | ) |
Sets the x element of the vector.
| value | The new value of the x element. |
| void setY | ( | float | value | ) |
Sets the y element of the vector.
| value | The new value of the y element. |
| void setZ | ( | float | value | ) |
Sets the z element of the vector.
| value | The new value of the z element. |
| float squaredLength | ( | ) |
Calculates the squared length of the vector.
Modifies this vector by subtracting another vector from this vector.
| v | Another vector. |
Subtracts two vectors and returns the difference.
| v1 | Left hand side vector. |
| v2 | Right hand side vector. |
|
static |
Returns the vector with each element being zero.