Subversion Repositories gelsvn

Rev

Rev 2 | Rev 501 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 189
Line 1... Line 1...
1
#include "Mat3x3f.h"
1
#include "Mat3x3f.h"
2
 
2
 
3
namespace CGLA {
3
namespace CGLA {
4
	Mat3x3f rotation_Mat3x3f(Axis axis, float angle)
4
	Mat3x3f rotation_Mat3x3f(Axis axis, float angle)
5
	{
5
	{
6
		Mat3x3f m;
6
		Mat3x3f m(0.0);
7
 
7
 
8
		switch(axis)
8
		switch(axis)
9
			{
9
			{
10
			case XAXIS:
10
			case XAXIS:
11
				m[0][0] = 1.0;
11
				m[0][0] = 1.0;
Line 33... Line 33...
33
		return m;
33
		return m;
34
	}
34
	}
35
 
35
 
36
	Mat3x3f scaling_Mat3x3f(const Vec3f& v)
36
	Mat3x3f scaling_Mat3x3f(const Vec3f& v)
37
	{
37
	{
38
		Mat3x3f m;
38
		Mat3x3f m(0.0);
39
		m[0][0] = v[0];
39
		m[0][0] = v[0];
40
		m[1][1] = v[1];
40
		m[1][1] = v[1];
41
		m[2][2] = v[2];
41
		m[2][2] = v[2];
42
		return m;
42
		return m;
43
	}
43
	}