#ifndef VLIUTILS_H #define VLIUTILS_H #include "vli.h" // Compose and Decompose translate between two representations of // nonsingular affine transformations, the standard 4x4 matrix // and a decomposition into translation, rotation, shear and scale // matricies as given by the following equation. // // | 1 0 0 Translation[0] | // | 0 1 0 Translation[1] | // Matrix == | 0 0 1 Translation[2] | * outRotation // | 0 0 0 1 | // // | 1 Shear[0] Shear[1] 0 | | Scale[0] 0 0 0 | // | 0 1 Shear[2] 0 | | 0 Scale[1] 0 0 | // * | 0 0 1 0 | * | 0 0 Scale[2] 0 | // | 0 0 0 1 | | 0 0 0 1 | VLIMatrix VLIUtCompose(VLIMatrix& inRotation, // Rotation. double inScale[3], // X, Y, and Z Scales. double inTranslation[3], // X, Y, and Z Translations. double inShear[3]); // XY, XZ, and YZ shear. void VLIUtDecompose (const VLIMatrix& inMatrix, // Matrix to decompose VLIMatrix& outRotation, // Rotation. double outScale[3], // X, Y, and Z Scales. double outTranslation[3], // X, Y, and Z Translations. double outShear[3]); // XY, XZ, and YZ shear. // Returns a string describing the given VLIStatus. const char *VLIUtGetErrorString(VLIStatus status); #endif VLIUTILS_H