Beispiel #1
0
void Camera::orbit( const Vector3& center, float angle, const Vector3& axis )
{
	Matrix44 R;
	R.setRotation(angle,axis);
	Matrix44 T;
	T.setTranslation( center.x, center.y, center.z );
	Matrix44 M = T * R;
	T.setTranslation( -center.x, -center.y, -center.z );
	M = M * T;

	this->center = M * this->center;
	this->eye = M * this->eye;
	updateViewMatrix();
}
Beispiel #2
0
void Matrix44::traslateLocal(Float x, Float y, Float z)
{
	Matrix44 T;
	T.setTranslation(x, y, z);
	*this = T * *this;
}
Beispiel #3
0
void Matrix44::traslate(Float x, Float y, Float z)
{
	Matrix44 T;
	T.setTranslation(x, y, z);
	*this = *this * T;
}