comparison engine/core/view/camera.cpp @ 548:f45e3e2995e0

* Corrected the h,w calculation for zooming in layercache.cpp. * Fixed the bug, that x,y camera position result in an screen offset. fixes[ticket:462] Note: chewie was right, the ExactModellCoordinate object for camera creating is useless(always 0,0,0). I'm believe that we can remove it from the camera constructor but that would mean an api change.
author helios2000@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 11 Jun 2010 21:10:40 +0000
parents 16c2b3ee59ce
children c9113e23b004
comparison
equal deleted inserted replaced
547:e59ece21ab3e 548:f45e3e2995e0
292 } 292 }
293 scale = m_zoom; 293 scale = m_zoom;
294 m_matrix.applyScale(scale, scale, scale); 294 m_matrix.applyScale(scale, scale, scale);
295 m_matrix.applyRotate(-m_rotation, 0.0, 0.0, 1.0); 295 m_matrix.applyRotate(-m_rotation, 0.0, 0.0, 1.0);
296 m_matrix.applyRotate(-m_tilt, 1.0, 0.0, 0.0); 296 m_matrix.applyRotate(-m_tilt, 1.0, 0.0, 0.0);
297 m_matrix.applyTranslate(+m_viewport.w/2, +m_viewport.h/2, 0); 297 m_matrix.applyTranslate(+m_viewport.x+m_viewport.w/2, +m_viewport.y+m_viewport.h/2, 0);
298 m_inverse_matrix = m_matrix.inverse(); 298 m_inverse_matrix = m_matrix.inverse();
299 299
300 300
301 m_vs_matrix.applyTranslate(0,0,0); 301 m_vs_matrix.applyTranslate(0,0,0);
302 m_vs_matrix.applyRotate(-m_rotation, 0.0, 0.0, 1.0); 302 m_vs_matrix.applyRotate(-m_rotation, 0.0, 0.0, 1.0);