Matrix4 mat; // Initialize matrix with translation values vec3 translation = mat.getTranslation(); // returns the translation vector
Matrix4 mat; // Initialize matrix with scaling values float scaleFactor = mat.getScaleFactor(); // returns the scale factor
Matrix4 mat; // Initialize matrix with rotation values Matrix3 rotation = mat.getRotation(); // returns the rotation matrixThese examples demonstrate how to use the Matrix4 class to retrieve specific information from a 4x4 matrix. It is common for the Matrix4 class to be used in combination with other libraries such as OpenGL or DirectX for graphics programming. Therefore, the package library used for Matrix4 may vary depending on the application.