Subversion Repositories gelsvn

Rev

Rev 2 | 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
 
10
	/** 3 by 3 float matrix.
11
			This class will typically be used for rotation or
12
			scaling matrices for 3D vectors. */
13
	class Mat3x3d: public ArithSqMat3x3Float<Vec3d, Mat3x3d>
14
	{
15
	public:
16
 
17
		/// Construct matrix from 3 Vec3d vectors.
18
		Mat3x3d(Vec3d _a, Vec3d _b, Vec3d _c): 
19
			ArithSqMat3x3Float<Vec3d, Mat3x3d> (_a,_b,_c) {}
20
 
21
		/// Construct the 0 matrix
22
		Mat3x3d() {}
23
 
24
		/// Construct a matrix from a single scalar value.
25
		explicit Mat3x3d(float a): ArithSqMat3x3Float<Vec3d, Mat3x3d>(a) {}
26
 
27
	};
28
	/// Create an identity matrix.
29
	inline Mat3x3d identity_Mat3x3d()
30
	{
31
		return Mat3x3d(Vec3d(1,0,0), Vec3d(0,1,0), Vec3d(0,0,1));
32
	}
33
 
34
}
35
#endif
36
 
37
 
38
 
39
 
40
 
41
 
42