Subversion Repositories gelsvn

Rev

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

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