glm – Decompose mat4 into translation and rotation?

It looks like glm 0.9.6 supports matrix decomposition http://glm.g-truc.net/0.9.6/api/a00204.html #include <glm/gtx/matrix_decompose.hpp> glm::mat4 transformation; // your transformation matrix. glm::vec3 scale; glm::quat rotation; glm::vec3 translation; glm::vec3 skew; glm::vec4 perspective; glm::decompose(transformation, scale, rotation, translation, skew, perspective);

What is the best method of re-rendering a web page on orientation change?

Assuming your CSS is already happily rendering on your various size mobile device screens, you need to define the viewport in the <head> of your template. Example, this sets the page width to be the device’s screen width and an initial zoom of 100%. Initial zoom is applied at page load, but not when the … Read more

Algorithm to detect photo orientation

Many photographs from consumer digital cameras are of people, which could be used for orientation. Face detection is a well-studied research area. Basic face detection would give you a rectangle whose longer side should be the vertical dimension. Further, if you can detect the eyes/mouth, you should be able to pick the correct orientation of … Read more

tech