Subversion Repositories gelsvn

Rev

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

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