Subversion Repositories gelsvn

Rev

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