[mutter/gbsneto/graphene: 8/15] Remove CoglQuaternion



commit aeb998a6d9caff836cb20c1bdbc2e61308eb1bb2
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Feb 16 11:09:38 2019 -0200

    Remove CoglQuaternion
    
    This is unused API, and there are no plans to actually
    use it. Even if we want to use it in the future, we'll
    be fully Graphene and won't need this API anyway.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/458

 cogl/cogl/cogl-framebuffer.c                       |  13 -
 cogl/cogl/cogl-framebuffer.h                       |  16 -
 cogl/cogl/cogl-matrix-stack-private.h              |  11 -
 cogl/cogl/cogl-matrix-stack.c                      |  49 --
 cogl/cogl/cogl-matrix-stack.h                      |  12 -
 cogl/cogl/cogl-matrix.c                            |  56 +-
 cogl/cogl/cogl-matrix.h                            |  26 -
 cogl/cogl/cogl-quaternion-private.h                |  44 --
 cogl/cogl/cogl-quaternion.c                        | 670 ---------------------
 cogl/cogl/cogl-quaternion.h                        | 561 -----------------
 cogl/cogl/cogl-types.h                             |   4 -
 cogl/cogl/cogl.h                                   |   1 -
 cogl/cogl/cogl.symbols                             |  31 -
 cogl/cogl/meson.build                              |   3 -
 cogl/tests/conform/meson.build                     |   2 +-
 cogl/tests/conform/test-conform-main.c             |   2 +-
 cogl/tests/conform/test-declarations.h             |   2 +-
 .../{test-euler-quaternion.c => test-euler.c}      |  18 +-
 18 files changed, 6 insertions(+), 1515 deletions(-)
---
diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c
index a032feb8c..1120b2538 100644
--- a/cogl/cogl/cogl-framebuffer.c
+++ b/cogl/cogl/cogl-framebuffer.c
@@ -1545,19 +1545,6 @@ cogl_framebuffer_rotate (CoglFramebuffer *framebuffer,
       COGL_FRAMEBUFFER_STATE_MODELVIEW;
 }
 
-void
-cogl_framebuffer_rotate_quaternion (CoglFramebuffer *framebuffer,
-                                    const CoglQuaternion *quaternion)
-{
-  CoglMatrixStack *modelview_stack =
-    _cogl_framebuffer_get_modelview_stack (framebuffer);
-  cogl_matrix_stack_rotate_quaternion (modelview_stack, quaternion);
-
-  if (framebuffer->context->current_draw_buffer == framebuffer)
-    framebuffer->context->current_draw_buffer_changes |=
-      COGL_FRAMEBUFFER_STATE_MODELVIEW;
-}
-
 void
 cogl_framebuffer_rotate_euler (CoglFramebuffer *framebuffer,
                                const graphene_euler_t *euler)
diff --git a/cogl/cogl/cogl-framebuffer.h b/cogl/cogl/cogl-framebuffer.h
index c3fc28d9b..99ed6bde9 100644
--- a/cogl/cogl/cogl-framebuffer.h
+++ b/cogl/cogl/cogl-framebuffer.h
@@ -52,7 +52,6 @@ typedef struct _CoglFramebuffer CoglFramebuffer;
 #include <cogl/cogl-pipeline.h>
 #include <cogl/cogl-indices.h>
 #include <cogl/cogl-bitmap.h>
-#include <cogl/cogl-quaternion.h>
 #include <cogl/cogl-texture.h>
 #include <glib-object.h>
 
@@ -363,21 +362,6 @@ cogl_framebuffer_rotate (CoglFramebuffer *framebuffer,
                          float y,
                          float z);
 
-/**
- * cogl_framebuffer_rotate_quaternion:
- * @framebuffer: A #CoglFramebuffer pointer
- * @quaternion: A #CoglQuaternion
- *
- * Multiplies the current model-view matrix by one that rotates
- * according to the rotation described by @quaternion.
- *
- * Since: 2.0
- * Stability: unstable
- */
-void
-cogl_framebuffer_rotate_quaternion (CoglFramebuffer *framebuffer,
-                                    const CoglQuaternion *quaternion);
-
 /**
  * cogl_framebuffer_rotate_euler:
  * @framebuffer: A #CoglFramebuffer pointer
diff --git a/cogl/cogl/cogl-matrix-stack-private.h b/cogl/cogl/cogl-matrix-stack-private.h
index f510d97d7..0678d199e 100644
--- a/cogl/cogl/cogl-matrix-stack-private.h
+++ b/cogl/cogl/cogl-matrix-stack-private.h
@@ -45,7 +45,6 @@ typedef enum _CoglMatrixOp
   COGL_MATRIX_OP_LOAD_IDENTITY,
   COGL_MATRIX_OP_TRANSLATE,
   COGL_MATRIX_OP_ROTATE,
-  COGL_MATRIX_OP_ROTATE_QUATERNION,
   COGL_MATRIX_OP_ROTATE_EULER,
   COGL_MATRIX_OP_SCALE,
   COGL_MATRIX_OP_MULTIPLY,
@@ -93,15 +92,6 @@ typedef struct _CoglMatrixEntryRotateEuler
   graphene_euler_t euler;
 } CoglMatrixEntryRotateEuler;
 
-typedef struct _CoglMatrixEntryRotateQuaternion
-{
-  CoglMatrixEntry _parent_data;
-
-  /* This doesn't store an actual CoglQuaternion in order to avoid the
-   * padding */
-  float values[4];
-} CoglMatrixEntryRotateQuaternion;
-
 typedef struct _CoglMatrixEntryScale
 {
   CoglMatrixEntry _parent_data;
@@ -143,7 +133,6 @@ typedef union _CoglMatrixEntryFull
   CoglMatrixEntryTranslate translate;
   CoglMatrixEntryRotate rotate;
   CoglMatrixEntryRotateEuler rotate_euler;
-  CoglMatrixEntryRotateQuaternion rotate_quaternion;
   CoglMatrixEntryScale scale;
   CoglMatrixEntryMultiply multiply;
   CoglMatrixEntryLoad load;
diff --git a/cogl/cogl/cogl-matrix-stack.c b/cogl/cogl/cogl-matrix-stack.c
index 5bacb7e51..3b9300f05 100644
--- a/cogl/cogl/cogl-matrix-stack.c
+++ b/cogl/cogl/cogl-matrix-stack.c
@@ -180,21 +180,6 @@ cogl_matrix_stack_rotate (CoglMatrixStack *stack,
   entry->z = z;
 }
 
-void
-cogl_matrix_stack_rotate_quaternion (CoglMatrixStack *stack,
-                                     const CoglQuaternion *quaternion)
-{
-  CoglMatrixEntryRotateQuaternion *entry;
-
-  entry = _cogl_matrix_stack_push_operation (stack,
-                                             COGL_MATRIX_OP_ROTATE_QUATERNION);
-
-  entry->values[0] = quaternion->w;
-  entry->values[1] = quaternion->x;
-  entry->values[2] = quaternion->y;
-  entry->values[3] = quaternion->z;
-}
-
 void
 cogl_matrix_stack_rotate_euler (CoglMatrixStack        *stack,
                                 const graphene_euler_t *euler)
@@ -354,7 +339,6 @@ cogl_matrix_entry_unref (CoglMatrixEntry *entry)
         case COGL_MATRIX_OP_LOAD_IDENTITY:
         case COGL_MATRIX_OP_TRANSLATE:
         case COGL_MATRIX_OP_ROTATE:
-        case COGL_MATRIX_OP_ROTATE_QUATERNION:
         case COGL_MATRIX_OP_ROTATE_EULER:
         case COGL_MATRIX_OP_SCALE:
           break;
@@ -495,7 +479,6 @@ initialized:
         case COGL_MATRIX_OP_LOAD_IDENTITY:
         case COGL_MATRIX_OP_TRANSLATE:
         case COGL_MATRIX_OP_ROTATE:
-        case COGL_MATRIX_OP_ROTATE_QUATERNION:
         case COGL_MATRIX_OP_ROTATE_EULER:
         case COGL_MATRIX_OP_SCALE:
         case COGL_MATRIX_OP_MULTIPLY:
@@ -581,15 +564,6 @@ initialized:
                                       &rotate->euler);
             continue;
           }
-        case COGL_MATRIX_OP_ROTATE_QUATERNION:
-          {
-            CoglMatrixEntryRotateQuaternion *rotate =
-              (CoglMatrixEntryRotateQuaternion *)children[i];
-            CoglQuaternion quaternion;
-            cogl_quaternion_init_from_array (&quaternion, rotate->values);
-            cogl_matrix_rotate_quaternion (matrix, &quaternion);
-            continue;
-          }
         case COGL_MATRIX_OP_SCALE:
           {
             CoglMatrixEntryScale *scale =
@@ -981,18 +955,6 @@ cogl_matrix_entry_equal (CoglMatrixEntry *entry0,
               return FALSE;
           }
           break;
-        case COGL_MATRIX_OP_ROTATE_QUATERNION:
-          {
-            CoglMatrixEntryRotateQuaternion *rotate0 =
-              (CoglMatrixEntryRotateQuaternion *)entry0;
-            CoglMatrixEntryRotateQuaternion *rotate1 =
-              (CoglMatrixEntryRotateQuaternion *)entry1;
-            int i;
-            for (i = 0; i < 4; i++)
-              if (rotate0->values[i] != rotate1->values[i])
-                return FALSE;
-          }
-          break;
         case COGL_MATRIX_OP_ROTATE_EULER:
           {
             CoglMatrixEntryRotateEuler *rotate0 =
@@ -1092,17 +1054,6 @@ cogl_debug_matrix_entry_print (CoglMatrixEntry *entry)
                      rotate->z);
             continue;
           }
-        case COGL_MATRIX_OP_ROTATE_QUATERNION:
-          {
-            CoglMatrixEntryRotateQuaternion *rotate =
-              (CoglMatrixEntryRotateQuaternion *)entry;
-            g_print ("  ROTATE QUATERNION w=%f x=%f y=%f z=%f\n",
-                     rotate->values[0],
-                     rotate->values[1],
-                     rotate->values[2],
-                     rotate->values[3]);
-            continue;
-          }
         case COGL_MATRIX_OP_ROTATE_EULER:
           {
             CoglMatrixEntryRotateEuler *rotate =
diff --git a/cogl/cogl/cogl-matrix-stack.h b/cogl/cogl/cogl-matrix-stack.h
index 9ab4aa733..5a2c7d138 100644
--- a/cogl/cogl/cogl-matrix-stack.h
+++ b/cogl/cogl/cogl-matrix-stack.h
@@ -307,18 +307,6 @@ cogl_matrix_stack_rotate (CoglMatrixStack *stack,
                           float y,
                           float z);
 
-/**
- * cogl_matrix_stack_rotate_quaternion:
- * @stack: A #CoglMatrixStack
- * @quaternion: A #CoglQuaternion
- *
- * Multiplies the current matrix by one that rotates according to the
- * rotation described by @quaternion.
- */
-void
-cogl_matrix_stack_rotate_quaternion (CoglMatrixStack *stack,
-                                     const CoglQuaternion *quaternion);
-
 /**
  * cogl_matrix_stack_rotate_euler:
  * @stack: A #CoglMatrixStack
diff --git a/cogl/cogl/cogl-matrix.c b/cogl/cogl/cogl-matrix.c
index 21fffe42f..185ded57a 100644
--- a/cogl/cogl/cogl-matrix.c
+++ b/cogl/cogl/cogl-matrix.c
@@ -73,11 +73,9 @@
 
 #include <cogl-util.h>
 #include <cogl-debug.h>
-#include <cogl-quaternion.h>
-#include <cogl-quaternion-private.h>
 #include <cogl-matrix.h>
 #include <cogl-matrix-private.h>
-#include <cogl-quaternion-private.h>
+#include <cogl-vector.h>
 
 #include <glib.h>
 #include <math.h>
@@ -1358,16 +1356,6 @@ cogl_matrix_rotate (CoglMatrix *matrix,
   _COGL_MATRIX_DEBUG_PRINT (matrix);
 }
 
-void
-cogl_matrix_rotate_quaternion (CoglMatrix *matrix,
-                               const CoglQuaternion *quaternion)
-{
-  CoglMatrix rotation_transform;
-
-  cogl_matrix_init_from_quaternion (&rotation_transform, quaternion);
-  cogl_matrix_multiply (matrix, matrix, &rotation_transform);
-}
-
 void
 cogl_matrix_rotate_euler (CoglMatrix *matrix,
                           const graphene_euler_t *euler)
@@ -1735,48 +1723,6 @@ _cogl_matrix_init_from_matrix_without_inverse (CoglMatrix *matrix,
   matrix->flags = src->flags | MAT_DIRTY_INVERSE;
 }
 
-static void
-_cogl_matrix_init_from_quaternion (CoglMatrix *matrix,
-                                   const CoglQuaternion *quaternion)
-{
-  float qnorm = _COGL_QUATERNION_NORM (quaternion);
-  float s = (qnorm > 0.0f) ? (2.0f / qnorm) : 0.0f;
-  float xs = quaternion->x * s;
-  float ys = quaternion->y * s;
-  float zs = quaternion->z * s;
-  float wx = quaternion->w * xs;
-  float wy = quaternion->w * ys;
-  float wz = quaternion->w * zs;
-  float xx = quaternion->x * xs;
-  float xy = quaternion->x * ys;
-  float xz = quaternion->x * zs;
-  float yy = quaternion->y * ys;
-  float yz = quaternion->y * zs;
-  float zz = quaternion->z * zs;
-
-  matrix->xx = 1.0f - (yy + zz);
-  matrix->yx = xy + wz;
-  matrix->zx = xz - wy;
-  matrix->xy = xy - wz;
-  matrix->yy = 1.0f - (xx + zz);
-  matrix->zy = yz + wx;
-  matrix->xz = xz + wy;
-  matrix->yz = yz - wx;
-  matrix->zz = 1.0f - (xx + yy);
-  matrix->xw = matrix->yw = matrix->zw = 0.0f;
-  matrix->wx = matrix->wy = matrix->wz = 0.0f;
-  matrix->ww = 1.0f;
-
-  matrix->flags = (MAT_FLAG_GENERAL | MAT_DIRTY_ALL);
-}
-
-void
-cogl_matrix_init_from_quaternion (CoglMatrix *matrix,
-                                  const CoglQuaternion *quaternion)
-{
-  _cogl_matrix_init_from_quaternion (matrix, quaternion);
-}
-
 void
 cogl_matrix_init_from_euler (CoglMatrix *matrix,
                              const graphene_euler_t *euler)
diff --git a/cogl/cogl/cogl-matrix.h b/cogl/cogl/cogl-matrix.h
index 30af4ac7d..7779b4ae7 100644
--- a/cogl/cogl/cogl-matrix.h
+++ b/cogl/cogl/cogl-matrix.h
@@ -41,7 +41,6 @@
 #include <cogl/cogl-types.h>
 #include <cogl/cogl-macros.h>
 
-#include <cogl/cogl-quaternion.h>
 #include <glib-object.h>
 
 #include <graphene.h>
@@ -198,20 +197,6 @@ cogl_matrix_rotate (CoglMatrix *matrix,
                    float y,
                    float z);
 
-/**
- * cogl_matrix_rotate_quaternion:
- * @matrix: A 4x4 transformation matrix
- * @quaternion: A quaternion describing a rotation
- *
- * Multiplies @matrix with a rotation transformation described by the
- * given #CoglQuaternion.
- *
- * Since: 2.0
- */
-void
-cogl_matrix_rotate_quaternion (CoglMatrix *matrix,
-                               const CoglQuaternion *quaternion);
-
 /**
  * cogl_matrix_rotate_euler:
  * @matrix: A 4x4 transformation matrix
@@ -517,17 +502,6 @@ cogl_matrix_init_from_array (CoglMatrix *matrix,
 const float *
 cogl_matrix_get_array (const CoglMatrix *matrix);
 
-/**
- * cogl_matrix_init_from_quaternion:
- * @matrix: A 4x4 transformation matrix
- * @quaternion: A #CoglQuaternion
- *
- * Initializes @matrix from a #CoglQuaternion rotation.
- */
-void
-cogl_matrix_init_from_quaternion (CoglMatrix *matrix,
-                                  const CoglQuaternion *quaternion);
-
 /**
  * cogl_matrix_init_from_euler:
  * @matrix: A 4x4 transformation matrix
diff --git a/cogl/cogl/cogl-types.h b/cogl/cogl/cogl-types.h
index f7b9b38ba..7906287e4 100644
--- a/cogl/cogl/cogl-types.h
+++ b/cogl/cogl/cogl-types.h
@@ -88,10 +88,6 @@ cogl_handle_get_type (void) G_GNUC_CONST;
  * between cogl-matrix.h and cogl-quaterion.h */
 typedef struct _CoglMatrix      CoglMatrix;
 
-/* Same as above we forward declared CoglQuaternion to avoid
- * circular dependencies. */
-typedef struct _CoglQuaternion CoglQuaternion;
-
 /**
  * CoglAngle:
  *
diff --git a/cogl/cogl/cogl.h b/cogl/cogl/cogl.h
index aeda0d3b4..e0c93c873 100644
--- a/cogl/cogl/cogl.h
+++ b/cogl/cogl/cogl.h
@@ -102,7 +102,6 @@
 #include <cogl/cogl-buffer.h>
 #include <cogl/cogl-pixel-buffer.h>
 #include <cogl/cogl-vector.h>
-#include <cogl/cogl-quaternion.h>
 #include <cogl/cogl-texture-2d.h>
 #include <cogl/cogl-texture-2d-gl.h>
 #include <cogl/cogl-texture-2d-sliced.h>
diff --git a/cogl/cogl/cogl.symbols b/cogl/cogl/cogl.symbols
index 996fd775b..e0a9b57d8 100644
--- a/cogl/cogl/cogl.symbols
+++ b/cogl/cogl/cogl.symbols
@@ -266,7 +266,6 @@ cogl_framebuffer_rotate
 
 #ifdef COGL_ENABLE_EXPERIMENTAL_API
 cogl_framebuffer_rotate_euler
-cogl_framebuffer_rotate_quaternion
 #endif
 
 cogl_framebuffer_scale
@@ -309,8 +308,6 @@ cogl_get_proc_address
 cogl_get_projection_matrix
 cogl_get_rectangle_indices
 cogl_get_source
-cogl_get_static_identity_quaternion
-cogl_get_static_zero_quaternion
 cogl_get_viewport
 
 #ifdef COGL_HAS_GLIB_SUPPORT
@@ -458,7 +455,6 @@ cogl_matrix_init_from_array
 cogl_matrix_init_translation
 cogl_matrix_is_identity
 cogl_matrix_init_from_euler
-cogl_matrix_init_from_quaternion
 cogl_matrix_init_identity
 cogl_matrix_look_at
 cogl_matrix_multiply
@@ -472,7 +468,6 @@ cogl_matrix_rotate
 
 #ifdef COGL_ENABLE_EXPERIMENTAL_API
 cogl_matrix_rotate_euler
-cogl_matrix_rotate_quaternion
 #endif
 
 cogl_matrix_scale
@@ -492,7 +487,6 @@ cogl_matrix_stack_pop
 cogl_matrix_stack_push
 cogl_matrix_stack_rotate
 cogl_matrix_stack_rotate_euler
-cogl_matrix_stack_rotate_quaternion
 cogl_matrix_stack_scale
 cogl_matrix_stack_set
 cogl_matrix_stack_translate
@@ -721,31 +715,6 @@ cogl_push_framebuffer
 cogl_push_matrix
 cogl_push_source
 
-cogl_quaternion_copy
-cogl_quaternion_dot_product
-cogl_quaternion_equal
-cogl_quaternion_free
-#ifdef COGL_HAS_GTYPE_SUPPORT
-cogl_quaternion_get_gtype
-#endif
-cogl_quaternion_get_rotation_angle
-cogl_quaternion_get_rotation_axis
-cogl_quaternion_init
-cogl_quaternion_init_from_angle_vector
-cogl_quaternion_init_from_array
-cogl_quaternion_init_from_euler
-cogl_quaternion_init_from_x_rotation
-cogl_quaternion_init_from_y_rotation
-cogl_quaternion_init_from_z_rotation
-cogl_quaternion_init_identity
-cogl_quaternion_invert
-cogl_quaternion_multiply
-cogl_quaternion_nlerp
-cogl_quaternion_normalize
-cogl_quaternion_pow
-cogl_quaternion_slerp
-cogl_quaternion_squad
-
 cogl_read_pixels
 cogl_read_pixels_flags_get_type
 
diff --git a/cogl/cogl/meson.build b/cogl/cogl/meson.build
index 6da28e254..ed20e46a6 100644
--- a/cogl/cogl/meson.build
+++ b/cogl/cogl/meson.build
@@ -114,7 +114,6 @@ cogl_nonintrospected_headers = [
   'cogl-frame-info.h',
   'cogl-vector.h',
   'cogl-output.h',
-  'cogl-quaternion.h',
   'cogl-matrix-stack.h',
   'cogl-poll.h',
   'cogl-texture-2d-gl.h',
@@ -266,8 +265,6 @@ cogl_sources = [
   'cogl-primitive.c',
   'cogl-matrix.c',
   'cogl-vector.c',
-  'cogl-quaternion-private.h',
-  'cogl-quaternion.c',
   'cogl-matrix-private.h',
   'cogl-matrix-stack.c',
   'cogl-matrix-stack-private.h',
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index d5dcdc0aa..b8c3c0749 100644
--- a/cogl/tests/conform/meson.build
+++ b/cogl/tests/conform/meson.build
@@ -25,7 +25,7 @@ cogl_test_conformance_sources = [
   'test-point-sprite.c',
   'test-no-gl-header.c',
   'test-version.c',
-  'test-euler-quaternion.c',
+  'test-euler.c',
   'test-layer-remove.c',
   'test-alpha-test.c',
   'test-map-buffer-range.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index 2b70d3543..a01026d43 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -127,7 +127,7 @@ main (int argc, char **argv)
 
   UNPORTED_TEST (test_viewport);
 
-  ADD_TEST (test_euler_quaternion, 0, 0);
+  ADD_TEST (test_euler, 0, 0);
   ADD_TEST (test_color_hsl, 0, 0);
 
   ADD_TEST (test_fence, TEST_REQUIREMENT_FENCE, 0);
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index 531111962..850d59f0f 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -44,7 +44,7 @@ void test_pipeline_shader_state (void);
 void test_gles2_context (void);
 void test_gles2_context_fbo (void);
 void test_gles2_context_copy_tex_image (void);
-void test_euler_quaternion (void);
+void test_euler (void);
 void test_color_hsl (void);
 void test_fence (void);
 void test_texture_no_allocate (void);
diff --git a/cogl/tests/conform/test-euler-quaternion.c b/cogl/tests/conform/test-euler.c
similarity index 78%
rename from cogl/tests/conform/test-euler-quaternion.c
rename to cogl/tests/conform/test-euler.c
index 8aa413a19..c911a1a13 100644
--- a/cogl/tests/conform/test-euler-quaternion.c
+++ b/cogl/tests/conform/test-euler.c
@@ -36,10 +36,9 @@
   } while (0)
 
 void
-test_euler_quaternion (void)
+test_euler (void)
 {
   graphene_euler_t euler;
-  CoglQuaternion quaternion;
   CoglMatrix matrix_a, matrix_b;
 
   /* Try doing the rotation with three separate rotations */
@@ -49,18 +48,12 @@ test_euler_quaternion (void)
   cogl_matrix_rotate (&matrix_a, 50.0f, 0.0f, 0.0f, 1.0f);
 
   /* And try the same rotation with a euler */
-  graphene_euler_init_with_order (&euler, 40, -30, 50, GRAPHENE_EULER_ORDER_YXZ);
+  graphene_euler_init_with_order (&euler, 40, -30, 50, GRAPHENE_EULER_ORDER_RYXZ);
   cogl_matrix_init_from_euler (&matrix_b, &euler);
 
   /* Verify that the matrices are approximately the same */
   COMPARE_MATRICES (&matrix_a, &matrix_b);
 
-  /* Try converting the euler to a matrix via a quaternion */
-  cogl_quaternion_init_from_euler (&quaternion, &euler);
-  memset (&matrix_b, 0, sizeof (matrix_b));
-  cogl_matrix_init_from_quaternion (&matrix_b, &quaternion);
-  COMPARE_MATRICES (&matrix_a, &matrix_b);
-
   /* Try applying the rotation from a euler to a framebuffer */
   cogl_framebuffer_identity_matrix (test_fb);
   cogl_framebuffer_rotate_euler (test_fb, &euler);
@@ -68,13 +61,6 @@ test_euler_quaternion (void)
   cogl_framebuffer_get_modelview_matrix (test_fb, &matrix_b);
   COMPARE_MATRICES (&matrix_a, &matrix_b);
 
-  /* And again with a quaternion */
-  cogl_framebuffer_identity_matrix (test_fb);
-  cogl_framebuffer_rotate_quaternion (test_fb, &quaternion);
-  memset (&matrix_b, 0, sizeof (matrix_b));
-  cogl_framebuffer_get_modelview_matrix (test_fb, &matrix_b);
-  COMPARE_MATRICES (&matrix_a, &matrix_b);
-
   /* FIXME: This needs a lot more tests! */
 
   if (cogl_test_verbose ())


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]