User:Hg200: Difference between revisions

Jump to navigation Jump to search
46 bytes added ,  30 September 2020
No edit summary
Tags: Mobile edit Mobile web edit
Line 11: Line 11:
== The role of "x_gl_mat1" ==
== The role of "x_gl_mat1" ==


The following section of code assembles the matrix "x_view", which is a subset of "x_gl_mat1". The matrix "x_gl_mat1" consists of different translations, scalings and a rotation operation.
The following section of code assembles the matrix "x_view", which is a subset of "x_gl_mat1". The matrix "x_gl_mat1" consists of multiple translations, scalings and one rotation operation.


{{Code|Section of axes::properties::update_camera ()"|<syntaxhighlight lang="C" style="font-size:13px">
{{Code|Section of axes::properties::update_camera ()"|<syntaxhighlight lang="C" style="font-size:13px">
   // Unit length vectors for direction of view "f" and up vector "UP"
   // Unit length vector for direction of view "f"
  // up vector "UP" scaled so that "s = f x UP" gets unit length
   ColumnVector F (c_center), f (F), UP (c_upv);
   ColumnVector F (c_center), f (F), UP (c_upv);
   normalize (f);
   normalize (f);
20

edits

Navigation menu