template<class T>
nCine::Matrix4x4 class

Four-by-four matrix.

Public static variables

static const Matrix4x4 Zero
A matrix with all zero elements.
static const Matrix4x4 Identity
An identity matrix.

Public static functions

static auto Translation(T xx, T yy, T zz) -> Matrix4x4
static auto Translation(const Vector3<T>& v) -> Matrix4x4
static auto RotationX(T radians) -> Matrix4x4
static auto RotationY(T radians) -> Matrix4x4
static auto RotationZ(T radians) -> Matrix4x4
static auto Scaling(T xx, T yy, T zz) -> Matrix4x4
static auto Scaling(const Vector3<T>& v) -> Matrix4x4
static auto Scaling(T s) -> Matrix4x4
static auto Ortho(T left, T right, T bottom, T top, T near, T far) -> Matrix4x4
static auto Frustum(T left, T right, T bottom, T top, T near, T far) -> Matrix4x4
static auto Perspective(T fovY, T aspect, T near, T far) -> Matrix4x4

Constructors, destructors, conversion operators

Matrix4x4() constexpr noexcept
Matrix4x4(NoInitT) explicit noexcept
Matrix4x4(const Vector4<T>& v0, const Vector4<T>& v1, const Vector4<T>& v2, const Vector4<T>& v3) noexcept

Public functions

void Set(const Vector4<T>& v0, const Vector4<T>& v1, const Vector4<T>& v2, const Vector4<T>& v3)
auto Data() -> T*
auto Data() const -> const T*
auto operator[](std::size_t index) -> Vector4<T>&
auto operator[](std::size_t index) const -> const Vector4<T>&
auto operator==(const Matrix4x4& m) const -> bool
auto operator!=(const Matrix4x4& m) const -> bool
auto operator-() const -> Matrix4x4
auto operator+=(const Matrix4x4& m) -> Matrix4x4&
auto operator-=(const Matrix4x4& m) -> Matrix4x4&
auto operator*=(const Matrix4x4& m) -> Matrix4x4&
auto operator/=(const Matrix4x4& m) -> Matrix4x4&
auto operator+=(T s) -> Matrix4x4&
auto operator-=(T s) -> Matrix4x4&
auto operator*=(T s) -> Matrix4x4&
auto operator/=(T s) -> Matrix4x4&
auto operator*(const Vector4<T>& v) const -> Vector4<T>
auto operator*(const Vector3<T>& v) const -> Vector3<T>
auto operator+(const Matrix4x4& m) const -> Matrix4x4
auto operator-(const Matrix4x4& m) const -> Matrix4x4
auto operator*(const Matrix4x4& m) const -> Matrix4x4
auto operator/(const Matrix4x4& m) const -> Matrix4x4
auto operator+(T s) const -> Matrix4x4
auto operator-(T s) const -> Matrix4x4
auto operator*(T s) const -> Matrix4x4
auto operator/(T s) const -> Matrix4x4
auto Transposed() const -> Matrix4x4
auto Transpose() -> Matrix4x4&
auto Inverse() const -> Matrix4x4
auto Translate(T xx, T yy, T zz) -> Matrix4x4&
auto Translate(const Vector3<T>& v) -> Matrix4x4&
auto RotateX(T radians) -> Matrix4x4&
auto RotateY(T radians) -> Matrix4x4&
auto RotateZ(T radians) -> Matrix4x4&
auto Scale(T xx, T yy, T zz) -> Matrix4x4&
auto Scale(const Vector3<T>& v) -> Matrix4x4&
auto Scale(T s) -> Matrix4x4&

Friends

template<class S>
auto operator*(const Vector4<S>& v, const Matrix4x4<S>& m) -> Vector4<S>
template<class S>
auto operator*(const Vector3<S>& v, const Matrix4x4<S>& m) -> Vector3<S>
template<class S>
auto operator*(S s, const Matrix4x4<S>& m) -> Matrix4x4<S>