@@ -0,0 +1,2058 @@
+package com.aventura.engine;%0D%0A%0D%0Aimport com.aventura.model.world.Element;%0D%0A%0D%0A/**%0D%0A * This class represents and manages the transformations from model to view.%0D%0A * %0D%0A * Interesting explanations on this transformation can be found here:%0D%0A * http://www.opengl-tutorial.org/fr/beginners-tutorials/tutorial-3-matrices/%0D%0A * %0D%0A *     +---------------------+%0D%0A *     %7C  Model Coordinates  %7C%0D%0A *     +---------------------+%0D%0A *                %7C%0D%0A *                %7C   %5BModel Matrix%5D 4x4 Transformation Matrix%0D%0A *                v%0D%0A *     +---------------------+%0D%0A *     %7C  World Coordinates  %7C%0D%0A *     +---------------------+%0D%0A *                %7C%0D%0A *                %7C   %5BView Matrix%5D 4x4 Transformation Matrix%0D%0A *                v%0D%0A *     +----------------------+%0D%0A *     %7C  Camera Coordinates  %7C%0D%0A *     +----------------------+%0D%0A *                %7C%0D%0A *                %7C   %5BProjection Matrix%5D 4x4 Transformation Matrix%0D%0A *                v%0D%0A *   +--------------------------+%0D%0A *   %7C Homogeneous Coordinates  %7C%0D%0A *   +--------------------------+%0D%0A * %0D%0A *  It provides all needed services to the RenderEngine to compute these transformations for each Vertex of the model.%0D%0A *  %0D%0A *  Each Transformation is a set of 1) Scaling then 2) Rotation and last 3) Translation.%0D%0A *  This can be modeled by the following matrix and vectors computation:%0D%0A *  %0D%0A *  %09TransformedVector = %5BTranslationMatrix * RotationMatrix * ScaleMatrix%5D * OriginalVector%0D%0A *  %09TransformedVector = %5B4x4 Transformation Matrix%5D * OriginalVector%0D%0A *  %0D%0A *  The complete transformation, from model to homogeneous coordinates, is done through the following formula:%0D%0A *  %0D%0A *  %09TransformedVector = %5BProjection Matrix%5D * %5BView Matrix%5D * %5BModel Matrix%5D * OriginalVector%0D%0A *  %0D%0A *  Note that the Model Matrix is provided by the model itself.%0D%0A *  In Aventura model, it is at Element level and it may require to be multiplied recursively if the model contains sub-elements.%0D%0A *  See Element class description.%0D%0A *  %0D%0A * @author Bricolage Olivier%0D%0A * @since May 2016%0D%0A * %0D%0A */%0D%0Apublic class ModelView %7B%0D%0A%0D%0A%7D%0D%0A

Add missing ModelView class