Subversion Repositories gelsvn

Rev

Rev 89 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 89 Rev 595
-
 
1
/* ----------------------------------------------------------------------- *
-
 
2
 * This file is part of GEL, http://www.imm.dtu.dk/GEL
-
 
3
 * Copyright (C) the authors and DTU Informatics
-
 
4
 * For license and list of authors, see ../../doc/intro.pdf
-
 
5
 * ----------------------------------------------------------------------- */
-
 
6
 
-
 
7
/** @file Mat2x3f.h
-
 
8
 * @brief 2x3 float matrix class
-
 
9
 */
-
 
10
 
1
#ifndef __CGLA_MAT2X3F_H__
11
#ifndef __CGLA_MAT2X3F_H__
2
#define __CGLA_MAT2X3F_H__
12
#define __CGLA_MAT2X3F_H__
3
 
13
 
4
#include "Vec2f.h"
14
#include "Vec2f.h"
5
#include "Vec3f.h"
15
#include "Vec3f.h"
6
#include "ArithMatFloat.h"
16
#include "ArithMatFloat.h"
7
 
17
 
8
namespace CGLA
18
namespace CGLA
9
{
19
{
10
 
20
 
11
  /**  \brief 2x3 float matrix class.
21
  /**  \brief 2x3 float matrix class.
12
 
22
 
13
       This class is useful for projecting a vector from 3D space to 2D.
23
       This class is useful for projecting a vector from 3D space to 2D.
14
  */
24
  */
15
  class Mat2x3f: public ArithMatFloat<Vec2f, Vec3f, Mat2x3f, 2>
25
  class Mat2x3f: public ArithMatFloat<Vec2f, Vec3f, Mat2x3f, 2>
16
    {
26
    {
17
 
27
 
18
    public:
28
    public:
19
      /// Construct Mat2x3f from two Vec3f vectors (vectors become rows)
29
      /// Construct Mat2x3f from two Vec3f vectors (vectors become rows)
20
      Mat2x3f(const Vec3f& _a, const Vec3f& _b): 
30
      Mat2x3f(const Vec3f& _a, const Vec3f& _b): 
21
	ArithMatFloat<Vec2f, Vec3f, Mat2x3f, 2> (_a,_b) {}
31
	ArithMatFloat<Vec2f, Vec3f, Mat2x3f, 2> (_a,_b) {}
22
 
32
 
23
      /// Construct NAN matrix.
33
      /// Construct NAN matrix.
24
      Mat2x3f() {}
34
      Mat2x3f() {}
25
    };
35
    };
26
 
36
 
27
 
37
 
28
  /**  \brief 3x2 float matrix class.
38
  /**  \brief 3x2 float matrix class.
29
 
39
 
30
       This class is useful for going from plane to 3D coordinates.
40
       This class is useful for going from plane to 3D coordinates.
31
  */
41
  */
32
  class Mat3x2f: public ArithMatFloat<Vec3f, Vec2f, Mat3x2f, 3>
42
  class Mat3x2f: public ArithMatFloat<Vec3f, Vec2f, Mat3x2f, 3>
33
    {
43
    {
34
 
44
 
35
    public:
45
    public:
36
 
46
 
37
      /** Construct matrix from three Vec2f vectors which become the 
47
      /** Construct matrix from three Vec2f vectors which become the 
38
	  rows of the matrix. */
48
	  rows of the matrix. */
39
      Mat3x2f(const Vec2f& _a, const Vec2f& _b, const Vec2f& _c): 
49
      Mat3x2f(const Vec2f& _a, const Vec2f& _b, const Vec2f& _c): 
40
	ArithMatFloat<Vec3f, Vec2f, Mat3x2f, 3> (_a,_b,_c) {}
50
	ArithMatFloat<Vec3f, Vec2f, Mat3x2f, 3> (_a,_b,_c) {}
41
 
51
 
42
      /// Construct NAN matrix.
52
      /// Construct NAN matrix.
43
      Mat3x2f() {}
53
      Mat3x2f() {}
44
    };
54
    };
45
 
55
 
46
}
56
}
47
#endif
57
#endif
48
 
58