Subversion Repositories gelsvn

Rev

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

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