mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
clutter/util: Make ClutterVertex4 internal to clutter-util.c
It's an implementation detail now, and not used not exposed anywhere. One less Clutter type for us to deal with \o/ https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439
This commit is contained in:
parent
eed3c62751
commit
f61377bb5e
@ -44,7 +44,6 @@
|
|||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef struct _ClutterMainContext ClutterMainContext;
|
typedef struct _ClutterMainContext ClutterMainContext;
|
||||||
typedef struct _ClutterVertex4 ClutterVertex4;
|
|
||||||
|
|
||||||
#define CLUTTER_REGISTER_VALUE_TRANSFORM_TO(TYPE_TO,func) { \
|
#define CLUTTER_REGISTER_VALUE_TRANSFORM_TO(TYPE_TO,func) { \
|
||||||
g_value_register_transform_func (g_define_type_id, TYPE_TO, func); \
|
g_value_register_transform_func (g_define_type_id, TYPE_TO, func); \
|
||||||
@ -240,21 +239,6 @@ gboolean _clutter_util_rectangle_intersection (const cairo_rectangle_int_t *src1
|
|||||||
gboolean clutter_util_rectangle_equal (const cairo_rectangle_int_t *src1,
|
gboolean clutter_util_rectangle_equal (const cairo_rectangle_int_t *src1,
|
||||||
const cairo_rectangle_int_t *src2);
|
const cairo_rectangle_int_t *src2);
|
||||||
|
|
||||||
|
|
||||||
struct _ClutterVertex4
|
|
||||||
{
|
|
||||||
float x;
|
|
||||||
float y;
|
|
||||||
float z;
|
|
||||||
float w;
|
|
||||||
};
|
|
||||||
|
|
||||||
void
|
|
||||||
_clutter_util_vertex4_interpolate (const ClutterVertex4 *a,
|
|
||||||
const ClutterVertex4 *b,
|
|
||||||
double progress,
|
|
||||||
ClutterVertex4 *res);
|
|
||||||
|
|
||||||
float _clutter_util_matrix_determinant (const CoglMatrix *matrix);
|
float _clutter_util_matrix_determinant (const CoglMatrix *matrix);
|
||||||
|
|
||||||
gboolean _clutter_util_matrix_decompose (const CoglMatrix *src,
|
gboolean _clutter_util_matrix_decompose (const CoglMatrix *src,
|
||||||
|
@ -49,6 +49,14 @@
|
|||||||
|
|
||||||
#define ROUND_TO_256THS(x) (roundf ((x) * 256) / 256)
|
#define ROUND_TO_256THS(x) (roundf ((x) * 256) / 256)
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
float z;
|
||||||
|
float w;
|
||||||
|
} ClutterVertex4;
|
||||||
|
|
||||||
void
|
void
|
||||||
_clutter_util_fully_transform_vertices (const CoglMatrix *modelview,
|
_clutter_util_fully_transform_vertices (const CoglMatrix *modelview,
|
||||||
const CoglMatrix *projection,
|
const CoglMatrix *projection,
|
||||||
@ -307,18 +315,6 @@ _clutter_util_vertex_combine (const graphene_point3d_t *a,
|
|||||||
res->z = (ascl * a->z) + (bscl * b->z);
|
res->z = (ascl * a->z) + (bscl * b->z);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
_clutter_util_vertex4_interpolate (const ClutterVertex4 *a,
|
|
||||||
const ClutterVertex4 *b,
|
|
||||||
double progress,
|
|
||||||
ClutterVertex4 *res)
|
|
||||||
{
|
|
||||||
res->x = a->x + (b->x - a->x) * progress;
|
|
||||||
res->y = a->y + (b->y - a->y) * progress;
|
|
||||||
res->z = a->z + (b->z - a->z) * progress;
|
|
||||||
res->w = a->w + (b->w - a->w) * progress;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*< private >
|
/*< private >
|
||||||
* clutter_util_matrix_decompose:
|
* clutter_util_matrix_decompose:
|
||||||
* @src: the matrix to decompose
|
* @src: the matrix to decompose
|
||||||
|
Loading…
Reference in New Issue
Block a user