The U4DVector4n class represents a 4D vector in space. Note: This class does not perform any linear algebra operations. It simply serves as a representation and is used as a helper in class.
More...
|
float | x |
| x-component
|
|
float | y |
| y-component
|
|
float | z |
| z-component
|
|
float | w |
| w-component
|
|
The U4DVector4n class represents a 4D vector in space. Note: This class does not perform any linear algebra operations. It simply serves as a representation and is used as a helper in class.
◆ U4DVector4n() [1/2]
U4DEngine::U4DVector4n::U4DVector4n |
( |
float |
nx, |
|
|
float |
ny, |
|
|
float |
nz, |
|
|
float |
nw |
|
) |
| |
Constructor which creates a 4D vector with x, y, z and w components.
- Parameters
-
nx | x component |
ny | y component |
nz | z component |
nw | w component |
- Returns
- Constructs a vector with the given x,y, z and w components
◆ U4DVector4n() [2/2]
U4DEngine::U4DVector4n::U4DVector4n |
( |
const U4DVector4n & |
a | ) |
|
Copy constructor.
- Parameters
-
- Returns
- A copy of the 4D vector
◆ dot()
float U4DEngine::U4DVector4n::dot |
( |
const U4DVector4n & |
v | ) |
const |
Method that calculates the dot product between two 4D vectors.
- Parameters
-
v | A 4D vector to compute the dot product with |
- Returns
- Returns the dot product between two 4D vectors
◆ getW()
float U4DEngine::U4DVector4n::getW |
( |
| ) |
|
Method to get the y component value of the vector.
- Returns
- returns the w-component value
◆ getX()
float U4DEngine::U4DVector4n::getX |
( |
| ) |
|
Method to get the x component value of the vector.
- Returns
- returns the x-component value
◆ getY()
float U4DEngine::U4DVector4n::getY |
( |
| ) |
|
Method to get the y component value of the vector.
- Returns
- returns the y-component value
◆ getZ()
float U4DEngine::U4DVector4n::getZ |
( |
| ) |
|
Method to get the z component value of the vector.
- Returns
- returns the z-component value
◆ operator*()
U4DVector4n U4DEngine::U4DVector4n::operator* |
( |
const float |
s | ) |
const |
Method which multiplies a 4D vector by a scalar.
- Parameters
-
s | Scalar value to multiply |
- Returns
- Returns the multiplication product betweent the 4D vector and scalar
◆ operator*=()
void U4DEngine::U4DVector4n::operator*= |
( |
const float |
s | ) |
|
Method which multiplies a 4D vector by a scalar.
- Parameters
-
s | Scalar value to multiply |
- Returns
- Returns the multiplication product betweent the 4D vector and scalar
◆ operator+()
Method that calculates the addition of two vectors.
- Parameters
-
- Returns
- Returns a third vector representing the addition of two 4D vectors
◆ operator+=()
void U4DEngine::U4DVector4n::operator+= |
( |
const U4DVector4n & |
v | ) |
|
Method that calculates the addition of two vectors.
- Parameters
-
- Returns
- Returns the addition of two vectors.
◆ operator=()
Copy constructor.
- Parameters
-
- Returns
- A copy of the 4D vector