gfx/qcms/matrix.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/qcms/matrix.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +/* vim: set ts=8 sw=8 noexpandtab: */
     1.5 +//  qcms
     1.6 +//  Copyright (C) 2009 Mozilla Foundation
     1.7 +//  Copyright (C) 1998-2007 Marti Maria
     1.8 +//
     1.9 +// Permission is hereby granted, free of charge, to any person obtaining 
    1.10 +// a copy of this software and associated documentation files (the "Software"), 
    1.11 +// to deal in the Software without restriction, including without limitation 
    1.12 +// the rights to use, copy, modify, merge, publish, distribute, sublicense, 
    1.13 +// and/or sell copies of the Software, and to permit persons to whom the Software 
    1.14 +// is furnished to do so, subject to the following conditions:
    1.15 +//
    1.16 +// The above copyright notice and this permission notice shall be included in 
    1.17 +// all copies or substantial portions of the Software.
    1.18 +//
    1.19 +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
    1.20 +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO 
    1.21 +// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
    1.22 +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
    1.23 +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
    1.24 +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
    1.25 +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    1.26 +
    1.27 +#ifndef _QCMS_MATRIX_H
    1.28 +#define _QCMS_MATRIX_H
    1.29 +
    1.30 +struct vector {
    1.31 +        float v[3];
    1.32 +};
    1.33 +
    1.34 +struct vector matrix_eval(struct matrix mat, struct vector v);
    1.35 +float matrix_det(struct matrix mat);
    1.36 +struct matrix matrix_identity(void);
    1.37 +struct matrix matrix_multiply(struct matrix a, struct matrix b);
    1.38 +struct matrix matrix_invert(struct matrix mat);
    1.39 +
    1.40 +struct matrix matrix_invalid(void);
    1.41 +
    1.42 +#endif

mercurial