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 89
1
#ifndef __CGLA_MAT2X3F_H__
1
#ifndef __CGLA_MAT2X3F_H__
2
#define __CGLA_MAT2X3F_H__
2
#define __CGLA_MAT2X3F_H__
3
 
3
 
4
#include "Vec2f.h"
4
#include "Vec2f.h"
5
#include "Vec3f.h"
5
#include "Vec3f.h"
6
#include "ArithMatFloat.h"
6
#include "ArithMatFloat.h"
7
 
7
 
8
namespace CGLA
8
namespace CGLA
9
{
9
{
10
 
10
 
11
  /**  2x3 float matrix class.
11
  /**  \brief 2x3 float matrix class.
-
 
12
 
12
       This class is useful for projecting a vector from 3D space to 2D.
13
       This class is useful for projecting a vector from 3D space to 2D.
13
  */
14
  */
14
  class Mat2x3f: public ArithMatFloat<Vec2f, Vec3f, Mat2x3f, 2>
15
  class Mat2x3f: public ArithMatFloat<Vec2f, Vec3f, Mat2x3f, 2>
15
    {
16
    {
16
 
17
 
17
    public:
18
    public:
18
      /// Construct Mat2x3f from two Vec3f vectors (vectors become rows)
19
      /// Construct Mat2x3f from two Vec3f vectors (vectors become rows)
19
      Mat2x3f(const Vec3f& _a, const Vec3f& _b): 
20
      Mat2x3f(const Vec3f& _a, const Vec3f& _b): 
20
	ArithMatFloat<Vec2f, Vec3f, Mat2x3f, 2> (_a,_b) {}
21
	ArithMatFloat<Vec2f, Vec3f, Mat2x3f, 2> (_a,_b) {}
21
 
22
 
22
      /// Construct NAN matrix.
23
      /// Construct NAN matrix.
23
      Mat2x3f() {}
24
      Mat2x3f() {}
24
    };
25
    };
25
 
26
 
26
 
27
 
27
  /**  3x2 float matrix class.
28
  /**  \brief 3x2 float matrix class.
-
 
29
 
28
       This class is useful for going from plane to 3D coordinates.
30
       This class is useful for going from plane to 3D coordinates.
29
  */
31
  */
30
  class Mat3x2f: public ArithMatFloat<Vec3f, Vec2f, Mat3x2f, 3>
32
  class Mat3x2f: public ArithMatFloat<Vec3f, Vec2f, Mat3x2f, 3>
31
    {
33
    {
32
 
34
 
33
    public:
35
    public:
34
 
36
 
35
      /** Construct matrix from three Vec2f vectors which become the 
37
      /** Construct matrix from three Vec2f vectors which become the 
36
	  rows of the matrix. */
38
	  rows of the matrix. */
37
      Mat3x2f(const Vec2f& _a, const Vec2f& _b, const Vec2f& _c): 
39
      Mat3x2f(const Vec2f& _a, const Vec2f& _b, const Vec2f& _c): 
38
	ArithMatFloat<Vec3f, Vec2f, Mat3x2f, 3> (_a,_b,_c) {}
40
	ArithMatFloat<Vec3f, Vec2f, Mat3x2f, 3> (_a,_b,_c) {}
39
 
41
 
40
      /// Construct NAN matrix.
42
      /// Construct NAN matrix.
41
      Mat3x2f() {}
43
      Mat3x2f() {}
42
    };
44
    };
43
 
45
 
44
}
46
}
45
#endif
47
#endif
46
 
48