Subversion Repositories gelsvn

Rev

Rev 67 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 bj 1
#ifndef __CGLA_MAT3X3D_H__
2
#define __CGLA_MAT3X3D_H__
3
 
4
#include "CGLA.h"
5
#include "Vec3d.h"
6
#include "ArithSqMat3x3Float.h"
7
 
8
namespace CGLA {
9
 
94 bj 10
	/** \brief 3 by 3 double matrix.
11
 
2 bj 12
			This class will typically be used for rotation or
13
			scaling matrices for 3D vectors. */
14
	class Mat3x3d: public ArithSqMat3x3Float<Vec3d, Mat3x3d>
15
	{
16
	public:
17
 
18
		/// Construct matrix from 3 Vec3d vectors.
19
		Mat3x3d(Vec3d _a, Vec3d _b, Vec3d _c): 
20
			ArithSqMat3x3Float<Vec3d, Mat3x3d> (_a,_b,_c) {}
21
 
22
		/// Construct the 0 matrix
23
		Mat3x3d() {}
24
 
25
		/// Construct a matrix from a single scalar value.
26
		explicit Mat3x3d(float a): ArithSqMat3x3Float<Vec3d, Mat3x3d>(a) {}
27
 
28
	};
29
	/// Create an identity matrix.
30
	inline Mat3x3d identity_Mat3x3d()
31
	{
32
		return Mat3x3d(Vec3d(1,0,0), Vec3d(0,1,0), Vec3d(0,0,1));
33
	}
34
 
35
}
36
#endif
37
 
38
 
39
 
40
 
41
 
42
 
43