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