Subversion Repositories gelsvn

Rev

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