Subversion Repositories gelsvn

Rev

Rev 12 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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