#include <FMVector3.h>
Public Member Functions | |
FMVector3 () | |
Creates an empty FMVector3. | |
FMVector3 (float _x, float _y, float _z) | |
Creates the FMVector3 with the coordinates given. | |
FMVector3 (const FMVector3 &rhs) | |
Copy constuctor. | |
FMVector3 (const FMVector4 &vect4) | |
Constructor. | |
FMVector3 (const float *source, uint32 startIndex=0) | |
Creates the FMVector3 from a list of floating-point values. | |
FMVector3 (const double *source, uint32 startIndex=0) | |
See above. | |
float | LengthSquared () const |
Retrieves the squared length of the vector. | |
float | Length () const |
Retrieves the length of the vector. | |
void | NormalizeIt () |
Normalizes this vector. | |
FMVector3 | Normalize () const |
Get a normalized FMVector3 with the same direction as this vector. | |
void | Project (const FMVector3 &unto) |
Project this FMVector3 onto another FMVector3. | |
FMVector3 | Projected (const FMVector3 &unto) const |
Get the projection of this FMVector3 onto another FMVector3. | |
operator float * () | |
Get this FMVector3 as an array of floats . | |
operator const float * () const | |
Get this FMVector3 as an array of floats . | |
void | Set (float x, float y, float z) |
Set the values of this vector. | |
FMVector3 & | operator= (const float *v) |
Assign this FMVector3 to the given float array. | |
FMVector3 & | operator= (const FMVector3 &rhs) |
Assigns the FMVector3 passed to outselves. | |
void | ComponentMinimum (const FMVector3 &min) |
Update each component of this FMVector to the minimum of two FMVector3s. | |
float | ComponentMinimum () const |
Retrieves the smallest component of the vector. | |
void | ComponentMaximum (const FMVector3 &max) |
Update each component of this FMVector to the maximum of two FMVector3s. | |
float | ComponentMaximum () const |
Retrieves the largest component of the vector. | |
void | ComponentClamp (const FMVector3 &min, const FMVector3 &max) |
Clamp each component of this FMVector by the corresponding components in the specified min and max FMVector3. | |
float | ComponentAverage () const |
Retrieves the average of the three vector components. | |
Public Attributes | |
float | x |
The first coordinate. | |
float | y |
The second coordinate. | |
float | z |
The third coordinate. | |
Static Public Attributes | |
static const FMVector3 | XAxis |
The FMVector3 representing the x axis. | |
static const FMVector3 | YAxis |
The FMVector3 representing the y axis. | |
static const FMVector3 | ZAxis |
The FMVector3 representing the z axis. | |
static const FMVector3 | Origin |
The FMVector3 representing the origin. | |
static const FMVector3 | Zero |
The FMVector3 containing all zeroes: (0,0,0). | |
static const FMVector3 | One |
The FMVector3 containing all ones: (1,1,1). |
Simple, non-optimized vector class: * is the dot-product, ^ is the cross-product.
|
Creates the FMVector3 with the coordinates given.
|
|
Copy constuctor.
|
|
Constructor. Reduces the 4D vector into 3D by removing the 4th dimension.
|
|
Creates the FMVector3 from a list of floating-point values. It takes the first three floating-point starting from and including startIndex (0 indexing) in the array as the 3 coordinates. The first as the first coordinate, the second as the second, and the third as the third.
|
|
Retrieves the average of the three vector components.
|
|
Clamp each component of this FMVector by the corresponding components in the specified min and max FMVector3. Clamp refers to setting a value within a given range. If the value is lower than the minimum of the range, it is set to the minimum; same for the maximum.
|
|
Retrieves the largest component of the vector.
|
|
Update each component of this FMVector to the maximum of two FMVector3s. Updates each of the three components to be the maximum of the current value and that of the corresponding value of the given FMVector3.
|
|
Retrieves the smallest component of the vector.
|
|
Update each component of this FMVector to the minimum of two FMVector3s. Updates each of the three components to be the minimum of the current value and that of the corresponding value of the given FMVector3.
|
|
Retrieves the length of the vector.
|
|
Retrieves the squared length of the vector.
|
|
Get a normalized FMVector3 with the same direction as this vector.
|
|
Get this FMVector3 as an array of
|
|
Get this FMVector3 as an array of
|
|
Assigns the FMVector3 passed to outselves. Copies XYZ from the passed vector
|
|
Assign this FMVector3 to the given float array.
Assigns each coordinate of this FMVector3 to the elements in the
|
|
Project this FMVector3 onto another FMVector3.
|
|
Get the projection of this FMVector3 onto another FMVector3.
|
|
Set the values of this vector.
|