mirror of
https://github.com/BlackMATov/vmath.hpp.git
synced 2025-12-16 14:11:28 +07:00
remove vec4 rotation by quaternion
This commit is contained in:
@@ -838,31 +838,6 @@ namespace vmath_hpp
|
||||
return v * qrotate(angle, axis);
|
||||
}
|
||||
|
||||
template < typename T >
|
||||
[[nodiscard]] vec<T, 4> rotate_x(const vec<T, 4>& v, T angle) {
|
||||
return v * qrotate(angle, unit3_x<T>);
|
||||
}
|
||||
|
||||
template < typename T >
|
||||
[[nodiscard]] vec<T, 4> rotate_y(const vec<T, 4>& v, T angle) {
|
||||
return v * qrotate(angle, unit3_y<T>);
|
||||
}
|
||||
|
||||
template < typename T >
|
||||
[[nodiscard]] vec<T, 4> rotate_z(const vec<T, 4>& v, T angle) {
|
||||
return v * qrotate(angle, unit3_z<T>);
|
||||
}
|
||||
|
||||
template < typename T >
|
||||
[[nodiscard]] vec<T, 4> rotate(const vec<T, 4>& v, const qua<T>& q) {
|
||||
return v * q;
|
||||
}
|
||||
|
||||
template < typename T >
|
||||
[[nodiscard]] vec<T, 4> rotate(const vec<T, 4>& v, T angle, const vec<T, 3>& axis) {
|
||||
return v * qrotate(angle, axis);
|
||||
}
|
||||
|
||||
// project
|
||||
|
||||
template < typename T, std::size_t Size >
|
||||
|
||||
@@ -83,11 +83,6 @@ namespace vmath_hpp
|
||||
return xs + qv2 * ys.s + cross(ys.v, qv2);
|
||||
}
|
||||
|
||||
template < typename T >
|
||||
[[nodiscard]] constexpr vec<T, 4> operator*(const vec<T, 4>& xs, const qua<T>& ys) {
|
||||
return {vec<T, 3>{xs} * ys, xs.w};
|
||||
}
|
||||
|
||||
template < typename T >
|
||||
[[nodiscard]] constexpr qua<T> operator*(const qua<T>& xs, const qua<T>& ys) {
|
||||
/// REFERENCE:
|
||||
@@ -110,11 +105,6 @@ namespace vmath_hpp
|
||||
return (xs = (xs * ys));
|
||||
}
|
||||
|
||||
template < typename T >
|
||||
constexpr vec<T, 4>& operator*=(vec<T, 4>& xs, const qua<T>& ys) {
|
||||
return (xs = (xs * ys));
|
||||
}
|
||||
|
||||
template < typename T >
|
||||
constexpr qua<T>& operator*=(qua<T>& xs, const qua<T>& ys) {
|
||||
return (xs = (xs * ys));
|
||||
|
||||
Reference in New Issue
Block a user