Nuclide
Software Development Kit for id Tech
|
Go to the source code of this file.
Functions | |
vector | anglesToForward (vector angle) |
Calculates the forward vector of a set of euler-angles. More... | |
vector | anglesToRight (vector angle) |
Calculates the right vector of a set of euler-angles. More... | |
vector | anglesToUp (vector angle) |
Calculates the up vector of a set of euler-angles. More... | |
float | distanceSquared (vector pointA, vector pointB) |
Calculates the squared distance between two points. More... | |
float | distance (vector pointA, vector pointB) |
Calculates the distance between two points. More... | |
float | distance2D (vector pointA, vector pointB) |
Calculates the distance between two vectors, ignoring the height difference between them. More... | |
bool | closer (vector referencePoint, vector pointA, vector pointB) |
Figure out which point is the closest between two options. More... | |
vector | combineAngles (vector angleA, vector angleB) |
Calculates a set of angles from a given vector. More... | |
float | length (vector toCalculate) |
Calculates accurate length of a given vector. More... | |
float | lengthSquared (vector target) |
Calculates the length of a given vector using a dot product. More... | |
float | vectorDot (vector vectorA, vector vectorB) |
Calculate the dot product of two vectors. More... | |
vector | vectorLerp (vector fromVector, vector toVector, float lerpFraction) |
Calculates an interpolated (linear) point between two points. More... | |
vector | vectorNormalize (vector toNormalize) |
Calculates a normalized version of a given vector. More... | |
vector | vectorToAngles (vector toAngles) |
Calculates a set of angles from a given vector. More... | |
vector | vectorToAnglesRoll (vector forwardDir, vector rollDir) |
Calculates a set of angles from a given vector, with roll support. More... | |
vector | lerpAngleVector (vector inputAngle, vector endAngle, float lerpAmount) |
Variables | |
var vector | g_vectorCacheLast |
var vector | g_vectorCacheForward |
var vector | g_vectorCacheRight |
var vector | g_vectorCacheUp |
Calculates the forward vector of a set of euler-angles.
Will use a cached result to speed up queries.
angle | is an of euler-angle. |
Calculates the right vector of a set of euler-angles.
Will use a cached result to speed up queries.
angle | is an of euler-angle. |
Calculates the up vector of a set of euler-angles.
Will use a cached result to speed up queries.
angle | is an of euler-angle. |
Figure out which point is the closest between two options.
referencePoint | is our shared point of reference. |
pointA | is the first point to check referencePoint against. |
pointB | is the second point to check referencePoint against. |
Calculates a set of angles from a given vector.
toAngles | is the vector to convert. |
Calculates the distance between two points.
pointA | is the first point. |
pointB | is the second point. |
Calculates the distance between two vectors, ignoring the height difference between them.
pointA | is the first point. |
pointB | is the second point. |
Calculates the squared distance between two points.
This is a lot faster than distance() calls, but does not reflect in-game units. Use it for any distance check you need to be fast.
pointA | is the first point. |
pointB | is the second point. |
Calculates accurate length of a given vector.
target | is the only input vector. |
Calculates the length of a given vector using a dot product.
target | is the only input vector. |
Calculate the dot product of two vectors.
vectorA | is the first input. |
vectorB | is the second input. |
Calculates an interpolated (linear) point between two points.
fromVector | is the point closest when lerpFraction is 0.0 . |
toVector | is the point closest when lerpFraction is 1.0 . |
lerpFraction | controls the fraction of the way between the two points. |
Calculates a normalized version of a given vector.
toNormalize | is the vector to convert. |
Calculates a set of angles from a given vector.
toAngles | is the vector to convert. |
Calculates a set of angles from a given vector, with roll support.
var vector g_vectorCacheForward |
var vector g_vectorCacheLast |
var vector g_vectorCacheRight |
var vector g_vectorCacheUp |