mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 07:03:34 +00:00
fixing rotation
This commit is contained in:
@@ -95,8 +95,8 @@ namespace mlx
|
||||
static constexpr Mat4 ConcatenateTransform(const Mat4& left, const Mat4& right);
|
||||
static constexpr Mat4 Identity();
|
||||
static constexpr Mat4 LookAt(const Vec3<T>& eye, const Vec3<T>& target, const Vec3<T>& up = Vec3<T>::Up());
|
||||
static constexpr Mat4 Ortho(T left, T right, T top, T bottom, T zNear = -1.0, T zFar = 1.0);
|
||||
static Mat4 Perspective(RadianAngle<T> angle, T ratio, T zNear, T zFar);
|
||||
static constexpr Mat4 Ortho(T left, T right, T top, T bottom, T z_near = -1.0, T zFar = 1.0);
|
||||
static Mat4 Perspective(RadianAngle<T> angle, T ratio, T z_near, T z_far);
|
||||
static constexpr Mat4 Rotate(const Quat<T>& rotation);
|
||||
static constexpr Mat4 Scale(const Vec3<T>& scale);
|
||||
static constexpr Mat4 Translate(const Vec3<T>& translation);
|
||||
|
||||
@@ -20,10 +20,9 @@ namespace mlx
|
||||
template<typename U> constexpr explicit Quat(const Quat<U>& quat);
|
||||
constexpr Quat(const Quat&) = default;
|
||||
constexpr Quat(Quat&&) = default;
|
||||
~Quat() = default;
|
||||
|
||||
RadianAngle<T> AngleBetween(const Quat& vec) const;
|
||||
constexpr bool ApproxEqual(const Quat& quat, T maxDifference = std::numeric_limits<T>::epsilon()) const;
|
||||
constexpr bool ApproxEqual(const Quat& quat, T max_difference = std::numeric_limits<T>::epsilon()) const;
|
||||
|
||||
Quat& ComputeW();
|
||||
constexpr Quat& Conjugate();
|
||||
@@ -68,16 +67,18 @@ namespace mlx
|
||||
constexpr bool operator>=(const Quat& quat) const;
|
||||
|
||||
static RadianAngle<T> AngleBetween(const Quat& lhs, const Quat& rhs);
|
||||
static constexpr bool ApproxEqual(const Quat& lhs, const Quat& rhs, T maxDifference = std::numeric_limits<T>::epsilon());
|
||||
static constexpr bool ApproxEqual(const Quat& lhs, const Quat& rhs, T max_difference = std::numeric_limits<T>::epsilon());
|
||||
static constexpr Quat Identity();
|
||||
static constexpr Quat Lerp(const Quat& from, const Quat& to, T interpolation);
|
||||
static Quat LookAt(const Vec3<T>& forward, const Vec3<T>& up);
|
||||
static Quat Normalize(const Quat& quat, T* length = nullptr);
|
||||
static Quat RotationBetween(const Vec3<T>& from, const Vec3<T>& to);
|
||||
static Quat RotateTowards(const Quat& from, const Quat& to, RadianAngle<T> maxRotation);
|
||||
static Quat RotateTowards(const Quat& from, const Quat& to, RadianAngle<T> max_rotation);
|
||||
static Quat Mirror(Quat quat, const Vec3<T>& axis);
|
||||
static Quat Slerp(const Quat& from, const Quat& to, T interpolation);
|
||||
static constexpr Quat Zero();
|
||||
|
||||
~Quat() = default;
|
||||
};
|
||||
|
||||
using Quatd = Quat<double>;
|
||||
|
||||
Reference in New Issue
Block a user