Template class for 3-vectors of type float, double, …
Allows accessing and changing the elements x, y, z directly or through the corresponding get and set methods.
Angle definitions are phi [-pi, pi]: azimuthal angle in the x-y plane, 0 pointing in x-direction theta [0, pi]: zenith angle towards the z axis, 0 pointing in z-direction
Subclassed by Vector3Quantity< T >
Public Functions
-
Vector3()
-
template <typename U>
Vector3(const Vector3<U> &v)
-
Vector3(const double *v)
-
Vector3(const float *v)
-
Vector3(const T &X, const T &Y, const T &Z)
-
Vector3(T t)
-
virtual void
setX(const T X)
-
virtual void
setY(const T Y)
-
virtual void
setZ(const T Z)
-
virtual void
setXYZ(const T X, const T Y, const T Z)
-
virtual void
setR(const T r)
-
void
setRThetaPhi(const T r, const QAngle theta, const QAngle phi)
-
T
getX() const
-
T
getY() const
-
T
getZ() const
-
T
getR() const
-
T
getR2() const
-
T
getRho() const
-
QAngle
getPhi() const
-
QAngle
getTheta() const
-
Vector3<T>
getUnitVector() const
-
Vector3<T>
getUnitVectorTheta() const
-
Vector3<T>
getUnitVectorPhi() const
-
QAngle
getAngleTo(const Vector3<T> &v) const
-
bool
isParallelTo(const Vector3<T> &v, QAngle maxAngle) const
-
T
getDistanceTo(const Vector3<T> &point) const
-
Vector3<T>
getParallelTo(const Vector3<T> &v) const
-
Vector3<T>
getPerpendicularTo(const Vector3<T> &v) const
-
Vector3<T>
getRotated(const Vector3<T> &axis, T angle) const
-
Vector3<T>
clip(T lower, T upper) const
-
Vector3<T>
abs() const
-
Vector3<T>
floor() const
-
Vector3<T>
ceil() const
-
T
min() const
-
T
max() const
-
T
dot(const Vector3<T> &v) const
-
Vector3<T>
cross(const Vector3<T> &v) const
-
bool
operator==(const Vector3<T> &v) const
-
Vector3<T>
operator+(const Vector3<T> &v) const
-
Vector3<T>
operator+(const T &f) const
-
Vector3<T>
operator-(const Vector3<T> &v) const
-
Vector3<T>
operator-(const T &f) const
-
Vector3<T>
operator*(const Vector3<T> &v) const
-
Vector3<T>
operator*(const T &v) const
-
Vector3<T>
operator/(const Vector3<T> &v) const
-
Vector3<T>
operator/(const T &f) const
-
Vector3<T>
operator%(const Vector3<T> &v) const
-
Vector3<T>
operator%(const T &f) const
-
Vector3<T> &
operator-=(const Vector3<T> &v)
-
Vector3<T> &
operator-=(const T &f)
-
Vector3<T> &
operator+=(const Vector3<T> &v)
-
Vector3<T> &
operator+=(const T &f)
-
Vector3<T> &
operator*=(const Vector3<T> &v)
-
Vector3<T> &
operator*=(const T &f)
-
Vector3<T> &
operator/=(const Vector3<T> &v)
-
Vector3<T> &
operator/=(const T &f)
-
Vector3<T> &
operator%=(const Vector3<T> &v)
-
Vector3<T> &
operator%=(const T &f)
-
Vector3<T> &
operator=(const Vector3<T> &v)
-
Vector3<T> &
operator=(const T &f)
Public Members
-
T
x
-
T
y
-
T
z