Subversion Repositories gelsvn

Rev

Rev 12 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12 Rev 67
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
  /** Two by two double matrix. This class is useful for various 
10
  /** Two by two double matrix. This class is useful for various 
11
      vector transformations in the plane. */
11
      vector transformations in the plane. */
12
  class Mat2x2d: public ArithSqMat2x2Float<Vec2d, Mat2x2d>
12
  class Mat2x2d: public ArithSqMat2x2Float<Vec2d, Mat2x2d>
13
    {
13
    {
14
    public:
14
    public:
15
 
15
 
16
      /// Construct a Mat2x2d from two Vec2d vectors.
16
      /// Construct a Mat2x2d from two Vec2d vectors.
17
      Mat2x2d(Vec2d a, Vec2d b): ArithSqMat2x2Float<Vec2d, Mat2x2d> (a,b) {}
17
      Mat2x2d(Vec2d a, Vec2d b): ArithSqMat2x2Float<Vec2d, Mat2x2d> (a,b) {}
18
 
18
 
19
      /// Construct a Mat2x2f from four scalars.
19
      /// Construct a Mat2x2f from four scalars.
20
      Mat2x2d(double a, double b, double c, double d): 
20
      Mat2x2d(double a, double b, double c, double d): 
21
	ArithSqMat2x2Float<Vec2d, Mat2x2d>(Vec2d(a,b),Vec2d(c,d)) {}
21
	ArithSqMat2x2Float<Vec2d, Mat2x2d>(Vec2d(a,b),Vec2d(c,d)) {}
22
  
22
  
23
      /// Construct the NAN matrix
23
      /// Construct the NAN matrix
24
      Mat2x2d() {}
24
      Mat2x2d() {}
25
 
25
 
26
      /// Construct a Mat2x2d from a single scalar
26
      /// Construct a Mat2x2d from a single scalar
27
      explicit Mat2x2d(double a): 
27
      explicit Mat2x2d(double a): 
28
	ArithSqMat2x2Float<Vec2d, Mat2x2d>(a) {}
28
	ArithSqMat2x2Float<Vec2d, Mat2x2d>(a) {}
29
    };
29
    };
30
 
30
 
31
}
31
}
32
#endif
32
#endif
33
 
33