1 /* LIBGIMP - The GIMP Library 2 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball 3 * 4 * gimpmathtypes.h 5 * 6 * This library is free software: you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 3 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library. If not, see 18 * <https://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef __GIMP_MATH_TYPES_H__ 22 #define __GIMP_MATH_TYPES_H__ 23 24 25 #include <libgimpbase/gimpbasetypes.h> 26 27 28 G_BEGIN_DECLS 29 30 typedef struct _GimpMatrix2 GimpMatrix2; 31 typedef struct _GimpMatrix3 GimpMatrix3; 32 typedef struct _GimpMatrix4 GimpMatrix4; 33 34 /** 35 * GimpMatrix2 36 * @coeff: the coefficients 37 * 38 * A two by two matrix. 39 **/ 40 struct _GimpMatrix2 41 { 42 gdouble coeff[2][2]; 43 }; 44 45 /** 46 * GimpMatrix3 47 * @coeff: the coefficients 48 * 49 * A three by three matrix. 50 **/ 51 struct _GimpMatrix3 52 { 53 gdouble coeff[3][3]; 54 }; 55 56 /** 57 * GimpMatrix4 58 * @coeff: the coefficients 59 * 60 * A four by four matrix. 61 **/ 62 struct _GimpMatrix4 63 { 64 gdouble coeff[4][4]; 65 }; 66 67 68 typedef struct _GimpVector2 GimpVector2; 69 typedef struct _GimpVector3 GimpVector3; 70 typedef struct _GimpVector4 GimpVector4; 71 72 /** 73 * GimpVector2: 74 * @x: the x axis 75 * @y: the y axis 76 * 77 * A two dimensional vector. 78 **/ 79 struct _GimpVector2 80 { 81 gdouble x, y; 82 }; 83 84 /** 85 * GimpVector3: 86 * @x: the x axis 87 * @y: the y axis 88 * @z: the z axis 89 * 90 * A three dimensional vector. 91 **/ 92 struct _GimpVector3 93 { 94 gdouble x, y, z; 95 }; 96 97 /** 98 * GimpVector4: 99 * @x: the x axis 100 * @y: the y axis 101 * @z: the z axis 102 * @w: the w axis 103 * 104 * A four dimensional vector. 105 **/ 106 struct _GimpVector4 107 { 108 gdouble x, y, z, w; 109 }; 110 111 112 G_END_DECLS 113 114 #endif /* __GIMP_MATH_TYPES_H__ */ 115