#include <muu/axis_angle.h>
template <typename Scalar>
axis_angle struct
An axis-angle rotation.
Template parameters | |
---|---|
Scalar | The scalar component type of the data members. |
Public types
-
using axis_type = vector<scalar_
type, 3> - The three-dimensional muu::
vector with the same scalar_ type as this axis-angle. - using scalar_type = Scalar
- The scalar type of the axis and angle.
Public static functions
-
static auto infinity_or_nan(const axis_
angle& aa) -> bool constexpr noexcept - Returns true if any of the scalars in an axis-angle are infinity or NaN.
Constructors, destructors, conversion operators
- axis_angle() defaulted noexcept
- Default constructor. Values are not initialized.
-
axis_angle(const axis_
angle&) defaulted constexpr noexcept - Copy constructor.
-
axis_angle(const axis_
type& axis, scalar_ type angle) constexpr noexcept - Initializes from an axis and an angle.
-
axis_angle(const axis_
type& axis) explicit constexpr noexcept - Initializes from an axis, setting angle to zero.
-
axis_angle(const vector<scalar_
type, 4>& v) explicit constexpr noexcept - Initializes from a vec4, where x, y and z are the axis, and w is the angle.
-
template <typename T>axis_angle(const axis_
angle<T>& other) explicit constexpr noexcept - Converting constructor.
-
template <typename T>axis_angle(const T& obj) constexpr noexcept
- Constructs an axis-angle from an implicitly bit-castable type.
- operator const axis_type&() const explicit constexpr noexcept
- Returns a reference to the axis component.
- operator vector<scalar_type, 4>() const explicit constexpr noexcept
- Converts this axis-angle to a vec4, where x, y and z are the axis, and w is the angle.
Public functions
- auto infinity_or_nan() const -> bool constexpr noexcept
- Returns true if any of the scalars in the axis-angle are infinity or NaN.
-
auto operator=(const axis_
angle&) -> axis_ angle& defaulted constexpr noexcept - Copy-assigment operator.
Public variables
- vector_type axis
- The axis being rotated around.
-
scalar_
type angle - The angle of rotation (in radians).
Friends
-
template <typename Char, typename Traits>auto operator<<(std::
basic_ostream<Char, Traits>& os, const axis_ angle& rot) -> std:: basic_ostream<Char, Traits>& - Writes an axis-angle rotation out to a text stream.
Function documentation
template <typename Scalar>
template <typename T>
muu::axis_angle::axis_angle(const T& obj) constexpr noexcept
template <typename T>
Constructs an axis-angle from an implicitly bit-castable type.
Template parameters | |
---|---|
T | A bit-castable type. |