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_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
  /** Two by two float matrix. This class is useful for various 
11
  /** Two by two float matrix. This class is useful for various 
12
      vector transformations in the plane. */
12
      vector transformations in the plane. */
13
  class Mat2x2f: public ArithSqMat2x2Float<Vec2f, Mat2x2f>
13
  class Mat2x2f: public ArithSqMat2x2Float<Vec2f, Mat2x2f>
14
    {
14
    {
15
    public:
15
    public:
16
 
16
 
17
      /// Construct a Mat2x2f from two Vec2f vectors.
17
      /// Construct a Mat2x2f from two Vec2f vectors.
18
      Mat2x2f(Vec2f _a, Vec2f _b): ArithSqMat2x2Float<Vec2f, Mat2x2f> (_a,_b) {}
18
      Mat2x2f(Vec2f _a, Vec2f _b): ArithSqMat2x2Float<Vec2f, Mat2x2f> (_a,_b) {}
19
 
19
 
20
      /// Construct a Mat2x2f from four scalars.
20
      /// Construct a Mat2x2f from four scalars.
21
      Mat2x2f(float _a, float _b, float _c, float _d): 
21
      Mat2x2f(float _a, float _b, float _c, float _d): 
22
	ArithSqMat2x2Float<Vec2f, Mat2x2f>(Vec2f(_a,_b),Vec2f(_c,_d)) {}
22
	ArithSqMat2x2Float<Vec2f, Mat2x2f>(Vec2f(_a,_b),Vec2f(_c,_d)) {}
23
  
23
  
24
      /// Construct the NAN matrix
24
      /// Construct the NAN matrix
25
      Mat2x2f() {}
25
      Mat2x2f() {}
26
      
26
      
27
      /// Construct a Mat2x2f from a single scalar
27
      /// Construct a Mat2x2f from a single scalar
28
      explicit Mat2x2f(float a): ArithSqMat2x2Float<Vec2f, Mat2x2f>(a) {}
28
      explicit Mat2x2f(float a): ArithSqMat2x2Float<Vec2f, Mat2x2f>(a) {}
29
 
29
 
30
 
30
 
31
    };
31
    };
32
 
32
 
33
}
33
}
34
#endif
34
#endif
35
 
35