Subversion Repositories gelsvn

Rev

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

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