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