mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00: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:
parent
33940021a1
commit
23bf50a07c
7 changed files with 123 additions and 38 deletions
|
@ -167,8 +167,9 @@ public:
|
|||
vector3d<T> getTranslation() const;
|
||||
|
||||
//! Make a rotation matrix from Euler angles. The 4th row and column are unmodified.
|
||||
//! NOTE: Rotation order is ZYX. This means that vectors are
|
||||
//! first rotated around the X, then the Y, and finally the Z axis.
|
||||
//! NOTE: Rotation order is (extrinsic) X-Y-Z.
|
||||
//! This means that vectors are first rotated around the X,
|
||||
//! then the (unrotated) Y, and finally the (unrotated) Z axis.
|
||||
//! NOTE: The rotation is done as per the right-hand rule.
|
||||
//! See test_irr_matrix4.cpp if you're still unsure about the conventions used here.
|
||||
inline CMatrix4<T> &setRotationRadians(const vector3d<T> &rotation);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue