Quaternion.hpp
Go to the documentation of this file.
T L2Norm() const
Returns L2 norm of this quaternion.
Definition: Quaternion-Impl.hpp:426
Quaternion RMul(const Quaternion &other) const
Returns other quaternion * this quaternion.
Definition: Quaternion-Impl.hpp:275
static Quaternion MakeIdentity()
Returns identity matrix.
Definition: Quaternion-Impl.hpp:497
Quaternion< T > Slerp(const Quaternion< T > &a, const Quaternion< T > &b, T t)
Computes spherical linear interpolation.
Definition: Quaternion-Impl.hpp:503
Matrix4x4< T > Matrix4() const
Converts to the 4x4 rotation matrix.
Definition: Quaternion-Impl.hpp:393
Quaternion Normalized() const
Returns normalized quaternion.
Definition: Quaternion-Impl.hpp:232
Matrix3x3< T > Matrix3() const
Converts to the 3x3 rotation matrix.
Definition: Quaternion-Impl.hpp:373
T Angle() const
Returns the rotational angle.
Definition: Quaternion-Impl.hpp:337
void Rotate(T angleInRadians)
Rotate this quaternion with given angle in radians.
Definition: Quaternion-Impl.hpp:296
Quaternion()
Make an identity quaternion.
Definition: Quaternion-Impl.hpp:17
Definition: Matrix.hpp:27
bool operator==(const Quaternion &other) const
Returns true if equal.
Definition: Quaternion-Impl.hpp:485
Quaternion Inverse() const
Returns the inverse quaternion.
Definition: Quaternion-Impl.hpp:366
Definition: pybind11Utils.hpp:20
void Normalize()
Normalizes the quaternion.
Definition: Quaternion-Impl.hpp:309
Quaternion & operator*=(const Quaternion &other)
Returns this quaternion *= other quaternion.
Definition: Quaternion-Impl.hpp:432
Quaternion< U > CastTo() const
Returns quaternion with other base type.
Definition: Quaternion-Impl.hpp:225
T & operator[](size_t i)
Returns the reference to the i-th element.
Definition: Quaternion-Impl.hpp:439
Vector3< T > Mul(const Vector3< T > &v) const
Returns this quaternion * vector.
Definition: Quaternion-Impl.hpp:240
void IMul(const Quaternion &other)
Returns this quaternion *= other quaternion.
Definition: Quaternion-Impl.hpp:284
T Dot(const Quaternion< T > &other) const
Computes the dot product with other quaternion.
Definition: Quaternion-Impl.hpp:269
Vector3< T > Axis() const
Returns the rotational axis.
Definition: Quaternion-Impl.hpp:323
void Set(const Quaternion &other)
Sets the quaternion with other quaternion.
Definition: Quaternion-Impl.hpp:86
bool operator!=(const Quaternion &other) const
Returns true if not equal.
Definition: Quaternion-Impl.hpp:491
Vector< T, 3 > operator*(const Quaternion< T > &q, const Vector< T, 3 > &v)
Returns quaternion q * vector v.
Definition: Quaternion-Impl.hpp:543
void GetAxisAngle(Vector3< T > *axis, T *angle) const
Returns the axis and angle.
Definition: Quaternion-Impl.hpp:351
Quaternion & operator=(const Quaternion &other)
Copy assignment operator.
Definition: Quaternion-Impl.hpp:72
void SetIdentity()
Makes this quaternion identity.
Definition: Quaternion-Impl.hpp:290
Quaternion class defined as q = w + xi + yj + zk.
Definition: Quaternion.hpp:22