From 8240b8a60af17fcd209042c525885fa29b3e1219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 1 Feb 2019 12:20:01 +0100 Subject: [PATCH] doc: explain why there's no model/view terminology. --- doc/transformations.dox | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/transformations.dox b/doc/transformations.dox index c264ab908..bf9cb3a78 100644 --- a/doc/transformations.dox +++ b/doc/transformations.dox @@ -309,5 +309,23 @@ normalizing them reduces the drift. @snippet MagnumMath.cpp transformations-normalization-quat +@section transformations-modelview Model/view terminology and Magnum + +The model / view matrix terminology, originating in the design of classical +fixed-function GPU pipelines, is not used in Magnum. Instead, the matrix/vector +APIs provide basic building blocks for creating transformations and +concatenating them. No particular convention is enforced and you're free to +create helper functions, if you need them. + +The @ref SceneGraph API provides a hierarchical transformation hierarchy and a +correct camera-relative transformation is calculated automatically in the +background, avoiding the need for manualy handling of model / view +transformations. In particular, camera position is always specified as relative +to scene root and it gets inverted when calculating the final per-object +transformation. See @ref scenegraph for detailed description. + +There's also a @ref Math::Matrix4::lookAt() function, but compared to the +classical @cpp gluLookAt() @ce function it's an inverse, as that makes more +sense together with the @ref SceneGraph API. */ }