Subversion Repositories gelsvn

Rev

Rev 113 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 113 Rev 595
Line -... Line 1...
-
 
1
/* ----------------------------------------------------------------------- *
-
 
2
 * This file is part of GEL, http://www.imm.dtu.dk/GEL
-
 
3
 * Copyright (C) the authors and DTU Informatics
-
 
4
 * For license and list of authors, see ../../doc/intro.pdf
-
 
5
 * ----------------------------------------------------------------------- */
-
 
6
 
1
#include "ArithSqMat3x3Float.h"
7
#include "ArithSqMat3x3Float.h"
2
#include "Mat3x3f.h"
8
#include "Mat3x3f.h"
3
#include "Mat3x3d.h"
9
#include "Mat3x3d.h"
4
 
10
 
5
namespace CGLA {
11
namespace CGLA {
6
 
12
 
7
	template<class V, class M>
13
	template<class V, class M>
8
	M invert(const ArithSqMat3x3Float<V,M>& _a)
14
	M invert(const ArithSqMat3x3Float<V,M>& _a)
9
	{
15
	{
-
 
16
        // From Graphcis Gems IV, Jean-Francois Doue, C++ Vector and Matrix Algebra Routines.
-
 
17
        // From the EULA "Using the code is permitted in any program, product, or library, non-commercial 
-
 
18
        // or commercial. Giving credit is not required, though is a nice gesture"
10
		M a(_a[0], _a[1], _a[2]);
19
		M a(_a[0], _a[1], _a[2]);
11
		M	b;
20
		M	b;
12
		b.identity();
21
		b.identity();
13
 
22
 
14
		unsigned int  i, j, i1;
23
		unsigned int  i, j, i1;