mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-07 07:17:57 +00:00
refactor(Core/Entities): clean up vendor item removal and add QuaternionData Euler helpers (#24790)
This commit is contained in:
@@ -43,6 +43,17 @@ bool QuaternionData::IsUnit() const
|
||||
return fabs(x * x + y * y + z * z + w * w - 1.0f) < 1e-5f;
|
||||
}
|
||||
|
||||
void QuaternionData::ToEulerAnglesZYX(float& Z, float& Y, float& X) const
|
||||
{
|
||||
G3D::Matrix3(G3D::Quat(x, y, z, w)).toEulerAnglesZYX(Z, Y, X);
|
||||
}
|
||||
|
||||
QuaternionData QuaternionData::FromEulerAnglesZYX(float Z, float Y, float X)
|
||||
{
|
||||
G3D::Quat quat(G3D::Matrix3::fromEulerAnglesZYX(Z, Y, X));
|
||||
return QuaternionData(quat.x, quat.y, quat.z, quat.w);
|
||||
}
|
||||
|
||||
GameObject::GameObject() : WorldObject(), MovableMapObject(),
|
||||
m_model(nullptr), m_goValue(), m_AI(nullptr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user