Subversion Repositories gelsvn

Rev

Rev 89 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 89 Rev 595
-
 
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
 
-
 
7
/** @file Mat2x2f.h
-
 
8
 * @brief 2x2 float matrix class
-
 
9
 */
-
 
10
 
1
#ifndef __CGLA_MAT2X2F_H__
11
#ifndef __CGLA_MAT2X2F_H__
2
#define __CGLA_MAT2X2F_H__
12
#define __CGLA_MAT2X2F_H__
3
 
13
 
4
#include "Vec2f.h"
14
#include "Vec2f.h"
5
#include "ArithSqMat2x2Float.h"
15
#include "ArithSqMat2x2Float.h"
6
 
16
 
7
 
17
 
8
namespace CGLA 
18
namespace CGLA 
9
{
19
{
10
 
20
 
11
  /** \brief Two by two float matrix. 
21
  /** \brief Two by two float matrix. 
12
 
22
 
13
	This class is useful for various 
23
	This class is useful for various 
14
	vector transformations in the plane. */
24
	vector transformations in the plane. */
15
  class Mat2x2f: public ArithSqMat2x2Float<Vec2f, Mat2x2f>
25
  class Mat2x2f: public ArithSqMat2x2Float<Vec2f, Mat2x2f>
16
    {
26
    {
17
    public:
27
    public:
18
 
28
 
19
      /// Construct a Mat2x2f from two Vec2f vectors.
29
      /// Construct a Mat2x2f from two Vec2f vectors.
20
      Mat2x2f(Vec2f _a, Vec2f _b): ArithSqMat2x2Float<Vec2f, Mat2x2f> (_a,_b) {}
30
      Mat2x2f(Vec2f _a, Vec2f _b): ArithSqMat2x2Float<Vec2f, Mat2x2f> (_a,_b) {}
21
 
31
 
22
      /// Construct a Mat2x2f from four scalars.
32
      /// Construct a Mat2x2f from four scalars.
23
      Mat2x2f(float _a, float _b, float _c, float _d): 
33
      Mat2x2f(float _a, float _b, float _c, float _d): 
24
	ArithSqMat2x2Float<Vec2f, Mat2x2f>(Vec2f(_a,_b),Vec2f(_c,_d)) {}
34
	ArithSqMat2x2Float<Vec2f, Mat2x2f>(Vec2f(_a,_b),Vec2f(_c,_d)) {}
25
  
35
  
26
      /// Construct the NAN matrix
36
      /// Construct the NAN matrix
27
      Mat2x2f() {}
37
      Mat2x2f() {}
28
      
38
      
29
      /// Construct a Mat2x2f from a single scalar
39
      /// Construct a Mat2x2f from a single scalar
30
      explicit Mat2x2f(float a): ArithSqMat2x2Float<Vec2f, Mat2x2f>(a) {}
40
      explicit Mat2x2f(float a): ArithSqMat2x2Float<Vec2f, Mat2x2f>(a) {}
31
 
41
 
32
 
42
 
33
    };
43
    };
34
 
44
 
35
}
45
}
36
#endif
46
#endif
37
 
47