mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-02 00:05:26 +01:00
Document & extend testing for rotation conventions (#16200)
* Document Luanti rotation conventions * Add test for setPitchYawRollRad (entity) rotation conventions * Test and document that `vector.rotate` uses (extrinsic) Z-X-Y rotation order
This commit is contained in:
@@ -478,6 +478,8 @@ inline void wrappedApproachShortest(T ¤t, const T target, const T stepsize
|
||||
}
|
||||
}
|
||||
|
||||
/// @note Uses (extrinsic) Z-X-Y rotation order, left-handed rotation
|
||||
/// @note This is not consistent with matrix4::setRotationRadians
|
||||
void setPitchYawRollRad(core::matrix4 &m, v3f rot);
|
||||
|
||||
inline void setPitchYawRoll(core::matrix4 &m, v3f rot)
|
||||
@@ -485,6 +487,7 @@ inline void setPitchYawRoll(core::matrix4 &m, v3f rot)
|
||||
setPitchYawRollRad(m, rot * core::DEGTORAD);
|
||||
}
|
||||
|
||||
/// @see setPitchYawRollRad
|
||||
v3f getPitchYawRollRad(const core::matrix4 &m);
|
||||
|
||||
inline v3f getPitchYawRoll(const core::matrix4 &m)
|
||||
|
||||
Reference in New Issue
Block a user