matrix.h
Go to the documentation of this file.
1 /* ========================================================================
2 * PROJECT: ARToolKitPlus
3 * ========================================================================
4 * This work is based on the original ARToolKit developed by
5 * Hirokazu Kato
6 * Mark Billinghurst
7 * HITLab, University of Washington, Seattle
8 * http://www.hitl.washington.edu/artoolkit/
9 *
10 * Copyright of the derived and new portions of this work
11 * (C) 2006 Graz University of Technology
12 *
13 * This framework is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This framework is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this framework; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 *
27 * For further information please contact
28 * Dieter Schmalstieg
29 * <schmalstieg@icg.tu-graz.ac.at>
30 * Graz University of Technology,
31 * Institut for Computer Graphics and Vision,
32 * Inffeldgasse 16a, 8010 Graz, Austria.
33 * ========================================================================
34 ** @author Daniel Wagner
35 *
36 * $Id: matrix.h 162 2006-04-19 21:28:10Z grabner $
37 * @file
38 * ======================================================================== */
39 
40 
41 #ifndef __ARTOOLKITMATRIX_HEADERFILE__
42 #define __ARTOOLKITMATRIX_HEADERFILE__
43 
44 #include <math.h>
45 #include <ARToolKitPlus/config.h>
46 #include <ARToolKitPlus/vector.h>
47 
48 
49 /* === matrix definition ===
50 
51  <---- clm --->
52  [ 10 20 30 ] ^
53  [ 20 10 15 ] |
54  [ 12 23 13 ] row
55  [ 20 10 15 ] |
56  [ 13 14 15 ] v
57 
58 =========================== */
59 
60 
61 namespace ARToolKitPlus {
62 
63 
64 struct ARMat {
66  int row;
67  int clm;
68 };
69 
70 
71 namespace Matrix {
72 
73 
74 /* 0 origin */
75 #define ARELEM0(mat,r,c) ((mat)->m[(r)*((mat)->clm)+(c)])
76 /* 1 origin */
77 #define ARELEM1(mat,row,clm) ARELEM0(mat,row-1,clm-1)
78 
79 
80 
81 static ARMat *alloc(int row, int clm);
82 static int free(ARMat *m);
83 
84 static int dup(ARMat *dest, ARMat *source);
85 static ARMat *allocDup(ARMat *source);
86 
87 // static int unit(ARMat *unit);
88 // static ARMat *allocUnit(int dim);
89 
90 static int mul(ARMat *dest, ARMat *a, ARMat *b);
91 // static ARMat *allocMul(ARMat *a, ARMat *b);
92 
93 // static int trans(ARMat *dest, ARMat *source);
94 // static ARMat *allocTrans(ARMat *source);
95 
96 // static int inv(ARMat *dest, ARMat *source);
97 static int selfInv(ARMat *m);
98 // static ARMat *allocInv(ARMat *source);
99 
100 // static ARFloat det(ARMat *m);
101 
102 // static int PCA( ARMat *input, ARMat *evec, ARVec *ev, ARVec *mean );
103 // static int PCA2( ARMat *input, ARMat *evec, ARVec *ev );
104 
105 // static int disp(ARMat *m);
106 
107 
108 } // namespace Matrix
109 
110 
111 } // namespace ARToolKitPlus
112 
113 
114 #endif // __ARTOOLKITMATRIX_HEADERFILE__
ARFloat * m
Definition: matrix.h:65
static int dup(ARMat *dest, ARMat *source)
static int free(ARMat *m)
static int mul(ARMat *dest, ARMat *a, ARMat *b)
This file should only be compiled when using ARToolKitPlus as a DLL.
Definition: ar.h:60
static int selfInv(ARMat *m)
static ARMat * allocDup(ARMat *source)
float ARFloat
Definition: config.h:60
static ARMat * alloc(int row, int clm)


tuw_artoolkitplus
Author(s): Markus Bader
autogenerated on Sun Sep 4 2016 03:24:33