| 366 | } |
| 367 | |
| 368 | void Tr2RotationTool::Update() |
| 369 | { |
| 370 | if( m_moved ) |
| 371 | { |
| 372 | Matrix temp; |
| 373 | Matrix rotation = RotationMatrix( m_movement, m_angle ); |
| 374 | temp = rotation * m_localTransform; |
| 375 | |
| 376 | // Check the move callback for if we should be moving or not |
| 377 | if( OnMoveCallback( m_localTransform, temp ) ) |
| 378 | { |
| 379 | m_localTransform = temp; |
| 380 | m_rotation = RotationQuaternion( temp ); |
| 381 | m_movement.x = 0.0f; |
| 382 | m_movement.y = 0.0f; |
| 383 | m_movement.z = 0.0f; |
| 384 | } |
| 385 | m_moved = false; |
| 386 | } |
| 387 | Matrix translation = TranslationMatrix( m_pivot ); |
| 388 | m_worldTransform = m_localTransform * translation; |
| 389 | for( PrimitiveIterator it = m_primitives.begin(); it != m_primitives.end(); ++it ) |
| 390 | { |
| 391 | ( *it )->m_localTransform = m_localTransform; |
| 392 | ( *it )->UpdateTransform(); |
| 393 | } |
| 394 | } |
| 395 | |
| 396 | Vector3 Tr2RotationTool::Hemisphere( int mouseX, int mouseY, Tr2Viewport& viewport, Matrix& viewMatrix, Matrix& projectionMatrix ) const |
| 397 | { |
nothing calls this directly
no test coverage detected