diff options
Diffstat (limited to 'cogl/cogl/cogl-matrix.h')
-rw-r--r-- | cogl/cogl/cogl-matrix.h | 135 |
1 files changed, 0 insertions, 135 deletions
diff --git a/cogl/cogl/cogl-matrix.h b/cogl/cogl/cogl-matrix.h index 072ed61d4..601c29c69 100644 --- a/cogl/cogl/cogl-matrix.h +++ b/cogl/cogl/cogl-matrix.h @@ -503,141 +503,6 @@ COGL_EXPORT gboolean cogl_matrix_get_inverse (const CoglMatrix *matrix, CoglMatrix *inverse); -/* FIXME: to be consistent with cogl_matrix_{transform,project}_points - * this could be renamed to cogl_matrix_project_point for Cogl 2.0... - */ - -/** - * cogl_matrix_transform_point: - * @matrix: A 4x4 transformation matrix - * @x: (inout): The X component of your points position - * @y: (inout): The Y component of your points position - * @z: (inout): The Z component of your points position - * @w: (inout): The W component of your points position - * - * Transforms a point whose position is given and returned as four float - * components. - */ -COGL_EXPORT void -cogl_matrix_transform_point (const CoglMatrix *matrix, - float *x, - float *y, - float *z, - float *w); - -/** - * cogl_matrix_transform_points: - * @matrix: A transformation matrix - * @n_components: The number of position components for each input point. - * (either 2 or 3) - * @stride_in: The stride in bytes between input points. - * @points_in: A pointer to the first component of the first input point. - * @stride_out: The stride in bytes between output points. - * @points_out: A pointer to the first component of the first output point. - * @n_points: The number of points to transform. - * - * Transforms an array of input points and writes the result to - * another array of output points. The input points can either have 2 - * or 3 components each. The output points always have 3 components. - * The output array can simply point to the input array to do the - * transform in-place. - * - * If you need to transform 4 component points see - * cogl_matrix_project_points(). - * - * Here's an example with differing input/output strides: - * |[ - * typedef struct { - * float x,y; - * uint8_t r,g,b,a; - * float s,t,p; - * } MyInVertex; - * typedef struct { - * uint8_t r,g,b,a; - * float x,y,z; - * } MyOutVertex; - * MyInVertex vertices[N_VERTICES]; - * MyOutVertex results[N_VERTICES]; - * CoglMatrix matrix; - * - * my_load_vertices (vertices); - * my_get_matrix (&matrix); - * - * cogl_matrix_transform_points (&matrix, - * 2, - * sizeof (MyInVertex), - * &vertices[0].x, - * sizeof (MyOutVertex), - * &results[0].x, - * N_VERTICES); - * ]| - * - * Stability: unstable - */ -COGL_EXPORT void -cogl_matrix_transform_points (const CoglMatrix *matrix, - int n_components, - size_t stride_in, - const void *points_in, - size_t stride_out, - void *points_out, - int n_points); - -/** - * cogl_matrix_project_points: - * @matrix: A projection matrix - * @n_components: The number of position components for each input point. - * (either 2, 3 or 4) - * @stride_in: The stride in bytes between input points. - * @points_in: A pointer to the first component of the first input point. - * @stride_out: The stride in bytes between output points. - * @points_out: A pointer to the first component of the first output point. - * @n_points: The number of points to transform. - * - * Projects an array of input points and writes the result to another - * array of output points. The input points can either have 2, 3 or 4 - * components each. The output points always have 4 components (known - * as homogeneous coordinates). The output array can simply point to - * the input array to do the transform in-place. - * - * Here's an example with differing input/output strides: - * |[ - * typedef struct { - * float x,y; - * uint8_t r,g,b,a; - * float s,t,p; - * } MyInVertex; - * typedef struct { - * uint8_t r,g,b,a; - * float x,y,z; - * } MyOutVertex; - * MyInVertex vertices[N_VERTICES]; - * MyOutVertex results[N_VERTICES]; - * CoglMatrix matrix; - * - * my_load_vertices (vertices); - * my_get_matrix (&matrix); - * - * cogl_matrix_project_points (&matrix, - * 2, - * sizeof (MyInVertex), - * &vertices[0].x, - * sizeof (MyOutVertex), - * &results[0].x, - * N_VERTICES); - * ]| - * - * Stability: unstable - */ -COGL_EXPORT void -cogl_matrix_project_points (const CoglMatrix *matrix, - int n_components, - size_t stride_in, - const void *points_in, - size_t stride_out, - void *points_out, - int n_points); - /** * cogl_matrix_is_identity: * @matrix: A #CoglMatrix |