Beispiel #1
0
	void set_scale(Matrix44f &m, float sx, float sy, float sz)
	{
		m.makeIdentity();
		m[0][0] = sx;
		m[1][1] = sy;
		m[2][2] = sz;
	}
Beispiel #2
0
	void set_translate(Matrix44f &m, float dx, float dy, float dz)
	{
		m.makeIdentity();
		m[0][3] = dx;
		m[1][3] = dy;
		m[2][3] = dz;
	}
Beispiel #3
0
	void set_rotate_y(Matrix44f &m, float radian)
	{
		float sina = std::sin(radian);
		m.makeIdentity();
		m[0][0] = m[2][2] = std::cos(radian);
		m[0][2] =  sina;
		m[2][0] = -sina;
	}