struct
TVector3
template<class T>A three dimensional vector.
Public
Constructors
TVector3<T>
TVector3<T>
TVector3<T>
TVector3<T>
TVector3
TVector3
TVector3
TVector3
TVector3
TVector3
TVector3
TVector3
TVector3
TVector3
Methods
Length
Returns the length (magnitude) of the vector.
SquaredLength
Returns the square of the length(magnitude) of the vector.
SquaredDistance
Returns the square of the distance to another vector.
Dot
Calculates the dot (scalar) product of this vector with another.
Normalize
Normalizes this vector, and returns the previous length.
NormalizeChecked
Normalizes this vector, and returns the previous length.
Checks if the magnitude is above to avoid division by zero or precision issues. If false, no checks are made.
Cross
Calculates the cross-product of 2 vectors, that is, the vector that lies perpendicular to them both.
Min
Sets this vector's components to the minimum of its own and the ones of the passed in vector.
Max
Sets this vector's components to the maximum of its own and the ones of the passed in vector.
AngleBetween
Gets the angle between 2 vectors.
IsZeroLength
Returns true if this vector is zero length.
Reflect
Calculates a reflection vector to the plane with the given normal.
OrthogonalComplement
Calculates two vectors orthonormal to the current vector, and normalizes the current vector if not already.
staticOrthonormalize
Performs Gram-Schmidt orthonormalization.
staticDot
Calculates the dot (scalar) product of two vectors.
staticNormalize
Normalizes the provided vector and returns the result.
staticNormalizeChecked
Normalizes the provided vector and returns the result.
Checks if the magnitude is above to avoid division by zero or precision issues. If false, no checks are made.
staticCross
Calculates the cross-product of 2 vectors, that is, the vector that lies perpendicular to them both.
staticLerp
Linearly interpolates between the two vectors using . t should be in [0, 1] range, where t = 0 corresponds to the left vector, while t = 1 corresponds to the right vector.
IsNaN
Checks are any of the vector components not a number.
staticMin
Returns the minimum of all the vector components as a new vector.
staticMax
Returns the maximum of all the vector components as a new vector.
Length
Returns the length (magnitude) of the vector.
SquaredLength
Returns the square of the length(magnitude) of the vector.
SquaredDistance
Returns the square of the distance to another vector.
Dot
Calculates the dot (scalar) product of this vector with another.
Normalize
Normalizes this vector, and returns the previous length.
NormalizeChecked
Normalizes this vector, and returns the previous length.
Checks if the magnitude is above to avoid division by zero or precision issues. If false, no checks are made.
Cross
Calculates the cross-product of 2 vectors, that is, the vector that lies perpendicular to them both.
Min
Sets this vector's components to the minimum of its own and the ones of the passed in vector.
Max
Sets this vector's components to the maximum of its own and the ones of the passed in vector.
Perpendicular
Generates a vector perpendicular to this vector.
AngleBetween
Gets the angle between 2 vectors.
IsZeroLength
Returns true if this vector is zero length.
Reflect
Calculates a reflection vector to the plane with the given normal.
OrthogonalComplement
Calculates two vectors orthonormal to the current vector, and normalizes the current vector if not already.
staticOrthonormalize
Performs Gram-Schmidt orthonormalization.
staticDot
Calculates the dot (scalar) product of two vectors.
staticNormalize
Normalizes the provided vector and returns the result.
staticNormalizeChecked
Normalizes the provided vector and returns the result.
Checks if the magnitude is above to avoid division by zero or precision issues. If false, no checks are made.
staticCross
Calculates the cross-product of 2 vectors, that is, the vector that lies perpendicular to them both.
staticLerp
Linearly interpolates between the two vectors using . t should be in [0, 1] range, where t = 0 corresponds to the left vector, while t = 1 corresponds to the right vector.
IsNaN
Checks are any of the vector components not a number.
staticMin
Returns the minimum of all the vector components as a new vector.
staticMax
Returns the maximum of all the vector components as a new vector.
Length
Returns the length (magnitude) of the vector.
SquaredLength
Returns the square of the length(magnitude) of the vector.
SquaredDistance
Returns the square of the distance to another vector.
Dot
Calculates the dot (scalar) product of this vector with another.
Normalize
Normalizes this vector, and returns the previous length.
NormalizeChecked
Normalizes this vector, and returns the previous length.
Checks if the magnitude is above to avoid division by zero or precision issues. If false, no checks are made.
Cross
Calculates the cross-product of 2 vectors, that is, the vector that lies perpendicular to them both.
Min
Sets this vector's components to the minimum of its own and the ones of the passed in vector.
Max
Sets this vector's components to the maximum of its own and the ones of the passed in vector.
Perpendicular
Generates a vector perpendicular to this vector.
AngleBetween
Gets the angle between 2 vectors.
IsZeroLength
Returns true if this vector is zero length.
Reflect
Calculates a reflection vector to the plane with the given normal.
OrthogonalComplement
Calculates two vectors orthonormal to the current vector, and normalizes the current vector if not already.
staticOrthonormalize
Performs Gram-Schmidt orthonormalization.
staticDot
Calculates the dot (scalar) product of two vectors.
staticNormalize
Normalizes the provided vector and returns the result.
staticNormalizeChecked
Normalizes the provided vector and returns the result.
Checks if the magnitude is above to avoid division by zero or precision issues. If false, no checks are made.
staticCross
Calculates the cross-product of 2 vectors, that is, the vector that lies perpendicular to them both.
staticLerp
Linearly interpolates between the two vectors using . t should be in [0, 1] range, where t = 0 corresponds to the left vector, while t = 1 corresponds to the right vector.
IsNaN
Checks are any of the vector components not a number.
staticMin
Returns the minimum of all the vector components as a new vector.