Subversion Repositories gelsvn

Rev

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

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