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(); }
void Matrix44::traslateLocal(Float x, Float y, Float z) { Matrix44 T; T.setTranslation(x, y, z); *this = T * *this; }
void Matrix44::traslate(Float x, Float y, Float z) { Matrix44 T; T.setTranslation(x, y, z); *this = *this * T; }