matrix.h
Go to the documentation of this file.
00001 /* ========================================================================
00002 * PROJECT: ARToolKitPlus
00003 * ========================================================================
00004 * This work is based on the original ARToolKit developed by
00005 *   Hirokazu Kato
00006 *   Mark Billinghurst
00007 *   HITLab, University of Washington, Seattle
00008 * http://www.hitl.washington.edu/artoolkit/
00009 *
00010 * Copyright of the derived and new portions of this work
00011 *     (C) 2006 Graz University of Technology
00012 *
00013 * This framework is free software; you can redistribute it and/or modify
00014 * it under the terms of the GNU General Public License as published by
00015 * the Free Software Foundation; either version 2 of the License, or
00016 * (at your option) any later version.
00017 *
00018 * This framework is distributed in the hope that it will be useful,
00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021 * GNU General Public License for more details.
00022 *
00023 * You should have received a copy of the GNU General Public License
00024 * along with this framework; if not, write to the Free Software
00025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026 *
00027 * For further information please contact 
00028 *   Dieter Schmalstieg
00029 *   <schmalstieg@icg.tu-graz.ac.at>
00030 *   Graz University of Technology, 
00031 *   Institut for Computer Graphics and Vision,
00032 *   Inffeldgasse 16a, 8010 Graz, Austria.
00033 * ========================================================================
00034 ** @author   Daniel Wagner
00035 *
00036 * $Id: matrix.h 162 2006-04-19 21:28:10Z grabner $
00037 * @file
00038 * ======================================================================== */
00039 
00040 
00041 #ifndef __ARTOOLKITMATRIX_HEADERFILE__
00042 #define __ARTOOLKITMATRIX_HEADERFILE__
00043 
00044 #include <math.h>
00045 #include <ARToolKitPlus/config.h>
00046 #include <ARToolKitPlus/vector.h>
00047 
00048 
00049 /* === matrix definition ===
00050 
00051   <---- clm --->
00052   [ 10  20  30 ] ^
00053   [ 20  10  15 ] |
00054   [ 12  23  13 ] row
00055   [ 20  10  15 ] |
00056   [ 13  14  15 ] v
00057 
00058 =========================== */
00059 
00060 
00061 namespace ARToolKitPlus {
00062 
00063 
00064 struct ARMat {
00065         ARFloat *m;
00066         int row;
00067         int clm;
00068 };
00069 
00070 
00071 namespace Matrix {
00072 
00073 
00074 /* 0 origin */
00075 #define ARELEM0(mat,r,c) ((mat)->m[(r)*((mat)->clm)+(c)])
00076 /* 1 origin */
00077 #define ARELEM1(mat,row,clm) ARELEM0(mat,row-1,clm-1)
00078 
00079 
00080 
00081 static ARMat  *alloc(int row, int clm);
00082 static int    free(ARMat *m);
00083 
00084 static int    dup(ARMat *dest, ARMat *source);
00085 static ARMat  *allocDup(ARMat *source);
00086 
00087 // static int    unit(ARMat *unit);
00088 // static ARMat  *allocUnit(int dim);
00089 
00090 static int    mul(ARMat *dest, ARMat *a, ARMat *b);
00091 // static ARMat  *allocMul(ARMat *a, ARMat *b);
00092 
00093 // static int    trans(ARMat *dest, ARMat *source);
00094 // static ARMat  *allocTrans(ARMat *source);
00095 
00096 // static int    inv(ARMat *dest, ARMat *source);
00097 static int    selfInv(ARMat *m);
00098 // static ARMat  *allocInv(ARMat *source);
00099 
00100 // static ARFloat det(ARMat *m);
00101 
00102 // static int    PCA( ARMat *input, ARMat *evec, ARVec *ev, ARVec *mean );
00103 // static int    PCA2( ARMat *input, ARMat *evec, ARVec *ev );
00104 
00105 // static int    disp(ARMat *m);
00106 
00107 
00108 }  // namespace Matrix
00109 
00110 
00111 }  // namespace ARToolKitPlus
00112 
00113 
00114 #endif // __ARTOOLKITMATRIX_HEADERFILE__


tuw_artoolkitplus
Author(s): Markus Bader
autogenerated on Sun May 29 2016 02:50:12