sandbox
Loading...
Searching...
No Matches
sbx::math::basic_quaternion< Type > Class Template Reference

Public Types

using value_type = Type
 
using reference = value_type &
 
using const_reference = const value_type &
 
using size_type = std::size_t
 
using length_type = std::float_t
 
using vector_type = vector_type_for< value_type >
 
using matrix_type = matrix_type_for< value_type >
 
using angle_type = basic_angle< value_type >
 

Public Member Functions

template<floating_point Other = value_type>
constexpr basic_quaternion (Other value=Other{0}) noexcept
 
template<floating_point Complex = value_type, floating_point Scalar = value_type>
constexpr basic_quaternion (const vector_type_for< Complex > &complex, Scalar scalar) noexcept
 
template<floating_point Other = value_type>
constexpr basic_quaternion (const vector_type_for< Other > &euler_angles) noexcept
 
template<floating_point Other = value_type>
constexpr basic_quaternion (Other x, Other y, Other z, Other w) noexcept
 
template<floating_point Complex = value_type, floating_point Scalar = value_type>
constexpr basic_quaternion (const vector_type_for< Complex > &axis, const basic_angle< Scalar > &angle) noexcept
 
template<floating_point Other = value_type>
constexpr basic_quaternion (const matrix_type_for< Other > &matrix) noexcept
 
constexpr operator matrix_type () const noexcept
 
constexpr auto to_matrix () const noexcept -> matrix_type
 
template<floating_point Other = value_type>
constexpr auto operator+= (const basic_quaternion< Other > &other) noexcept -> basic_quaternion &
 
template<floating_point Other = value_type>
constexpr auto operator-= (const basic_quaternion< Other > &other) noexcept -> basic_quaternion &
 
template<floating_point Other = value_type>
constexpr auto operator*= (Other value) noexcept -> basic_quaternion &
 
template<floating_point Other = value_type>
constexpr auto operator*= (const basic_quaternion< Other > &other) noexcept -> basic_quaternion &
 
template<floating_point Other = value_type>
constexpr auto operator/= (Other value) noexcept -> basic_quaternion &
 
constexpr auto x () noexcept -> reference
 
constexpr auto x () const noexcept -> const_reference
 
constexpr auto y () noexcept -> reference
 
constexpr auto y () const noexcept -> const_reference
 
constexpr auto z () noexcept -> reference
 
constexpr auto z () const noexcept -> const_reference
 
constexpr auto w () noexcept -> reference
 
constexpr auto w () const noexcept -> const_reference
 
constexpr auto complex () noexcept -> vector_type &
 
constexpr auto complex () const noexcept -> const vector_type &
 
constexpr auto scalar () noexcept -> reference
 
constexpr auto scalar () const noexcept -> const_reference
 
constexpr auto length_squared () const noexcept -> length_type
 
constexpr auto length () const noexcept -> length_type
 
constexpr auto normalize () noexcept -> basic_quaternion &
 

Static Public Attributes

static constexpr basic_quaternion identity {vector_type::zero, value_type{1}}
 

The documentation for this class was generated from the following files: