Kaim::Vec3f Class Reference
#include <vec3f.h>
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbers.
This class is frequently used by all Gameware Navigation components to refer to specific points in three-dimensional space.
- gamekit/Tutorial_CrowdDispersion.cpp, gamekit/Tutorial_GameKitTraverseLogic.cpp, performance/Tutorial_MultiThreading.cpp, performance/Tutorial_MultiThreading_5_worlds.cpp, performance/Tutorial_NoTimeSlicing.cpp, Tutorial_AvoidanceFilter.cpp, Tutorial_FirstIntegration.cpp, Tutorial_Generation_basics.cpp, Tutorial_Generation_Navdata_FromMem.cpp, Tutorial_Generation_postProcess.cpp, Tutorial_Generation_rebuild.cpp, Tutorial_Generation_swappable.cpp, Tutorial_Generation_tagVolume.cpp, Tutorial_NavMeshTraversal.cpp, Tutorial_NavTag.cpp, Tutorial_ObstacleIntegration.cpp, Tutorial_Obstacles.cpp, Tutorial_PointOfInterest.cpp, Tutorial_QueryQueue.cpp, Tutorial_SplineFollow.cpp, Tutorial_VisualDebug.cpp, and Tutorial_WorldInit.cpp.
Creates a vector with coordinates (0,0,0).
Creates a vector with the specified coordinates.
Kaim::Vec3f::Vec3f |
( |
const KyFloat32 * |
coords | ) |
|
|
inlineexplicit |
Creates a vector with the specified coordinates.
- Parameters
-
coords | array of coordinates {x, y, z} |
Kaim::Vec3f::Vec3f |
( |
const Vec2f & |
v | ) |
|
|
inlineexplicit |
Creates a vector with provided Vec2f horizontal coordinates and z = 0.
Creates a vector with provided Vec2f horizontal coordinates and the provided z.
void Kaim::Vec3f::Cross |
( |
const Vec3f & |
u, |
|
|
const Vec3f & |
v |
|
) |
| |
|
inline |
Calculates the cross product ofu and v, and stores the result in this vector.
Vec2f Kaim::Vec3f::Get2d |
( |
| ) |
const |
|
inline |
Returns a Vec2f that contains the X and Y coordinates of this vector. The Z coordinate is ignored.
Returns the magnitude of the vector.
Returns the magnitude of the vector on the plane of the (X,Y) axes.
Normalizes the vector, making it one unit in length without changing its orientation.
This method does not change this object. Instead, it stores the computed normal in the normalized parameter.
- Parameters
-
[out] | normalized | Stores the normalized vector computed from this vector. |
- Returns
- The magnitude of this vector before normalization.
Normalizes the (X,Y) coordinates of the vector, making it one unit in length without changing its orientation.
This method ignores the Z coordinate of the vector. This method does not change this object. Instead, it stores the computed normal in the normalized parameter.
- Parameters
-
[out] | normalized | Stores the normalized vector computed from X and Y coordinates of this vector. |
- Returns
- The magnitude of the vector on the plane of the (X,Y) axes before normalization.
KyFloat32 Kaim::Vec3f::GetSquareLength |
( |
| ) |
const |
|
inline |
Returns the square of the magnitude of the vector.
KyFloat32 Kaim::Vec3f::GetSquareLength2d |
( |
| ) |
const |
|
inline |
Returns the square of the magnitude of the vector on the plane of the (X,Y) axes.
bool Kaim::Vec3f::IsZero |
( |
| ) |
const |
|
inline |
Returns true if the X, Y and Z coordinates of this vector are all 0.
Normalizes the vector, making it one unit in length without changing its orientation.
- Returns
- The previous magnitude of this vector before normalization.
bool Kaim::Vec3f::operator!= |
( |
const Vec3f & |
v | ) |
const |
|
inline |
Returns true if this object contains at least one different coordinate from v.
Multiplies the X, Y and Z coordinates of this vector by the specified value.
Returns the dot product of this vector and v.
Multiplies the X, Y and Z coordinates of this vector by the specified value.
Vec3f Kaim::Vec3f::operator+ |
( |
const Vec3f & |
v | ) |
const |
|
inline |
Adds the X coordinate of v to the X coordinate of this vector, adds the Y coordinate of v to the Y coordinate of this vector, and adds the Z coordinate of v to the Z coordinate of this vector.
Vec3f Kaim::Vec3f::operator+ |
( |
const Vec2f & |
v | ) |
const |
|
inline |
Adds the X coordinate of v to the X coordinate of this vector and the Y coordinate of v to the Y coordinate of this vector.
Adds the X coordinate of v to the X coordinate of this vector, adds the Y coordinate of v to the Y coordinate of this vector, and adds the Z coordinate of v to the Z coordinate of this vector.
Adds the X coordinate of v to the X coordinate of this vector and the Y coordinate of v to the Y coordinate of this vector.
Vec3f Kaim::Vec3f::operator- |
( |
const Vec3f & |
v | ) |
const |
|
inline |
Subtracts the X coordinate of v from the X coordinate of this vector, subtracts the Y coordinate of v from the Y coordinate of this vector, and subtracts the Z coordinate of v from the Z coordinate of this vector.
Vec3f Kaim::Vec3f::operator- |
( |
| ) |
const |
|
inline |
Negates the X, Y and Z coordinates of this vector, effectively flipping it around the origin.
Vec3f Kaim::Vec3f::operator- |
( |
const Vec2f & |
v | ) |
const |
|
inline |
Subtracts the X coordinate of v from the X coordinate of this vector and the Y coordinate of v from the Y coordinate of this vector.
Subtracts the X coordinate of v from the X coordinate of this vector, subtracts the Y coordinate of v from the Y coordinate of this vector, and subtracts the Z coordinate of v from the Z coordinate of this vector.
Subtracts the X coordinate of v from the X coordinate of this vector and the Y coordinate of v from the Y coordinate of this vector.
Divides the X, Y and Z coordinates of this vector by the specified value.
Divides the X, Y and Z coordinates of this vector by the specified value.
bool Kaim::Vec3f::operator< |
( |
const Vec3f & |
v | ) |
const |
|
inline |
Returns true if the size of this vector along all three of the X, Y and Z axes is less than that of v.
bool Kaim::Vec3f::operator== |
( |
const Vec3f & |
v | ) |
const |
|
inline |
Returns true if this object contains the same coordinates as v.
Retrieves the size of the vector around one of its axes.
Use [0] for the X axis, [1] for the Y axis, or [2] for the Z axis.
Retrieves the size of the vector around one of its axes.
Use [0] for the X axis, [1] for the Y axis, or [2] for the Z axis.
Vec3f Kaim::Vec3f::operator^ |
( |
const Vec3f & |
v | ) |
const |
|
inline |
Returns the cross product of this vector and v.
void Kaim::Vec3f::Set |
( |
const KyFloat32 * |
coords | ) |
|
|
inline |
Sets the coordinates.
- Parameters
-
coords | array of coordinates {x, y, z} |
void Kaim::Vec3f::Set |
( |
const Vec2f & |
v | ) |
|
|
inline |
Sets x = v.x, y = v.y and z = 0.0f.
Sets x = v.x, y = v.y and z = z.
static Vec3f Kaim::Vec3f::UnitX |
( |
| ) |
|
|
inlinestatic |
Returns the normalized orientation of the X axis.
static Vec3f Kaim::Vec3f::UnitY |
( |
| ) |
|
|
inlinestatic |
Returns the normalized orientation of the Y axis.
static Vec3f Kaim::Vec3f::UnitZ |
( |
| ) |
|
|
inlinestatic |
Returns the normalized orientation of the Z axis.
static Vec3f Kaim::Vec3f::Zero |
( |
| ) |
|
|
inlinestatic |
Returns a vector of zero size: (0,0,0).
The size of the vector along the X axis.
The size of the vector along the Y axis.
The size of the vector along the Z axis.
The documentation for this class was generated from the following file: