| 300 | } |
| 301 | |
| 302 | void Tr2TranslationTool::Update() |
| 303 | { |
| 304 | if( m_moved ) |
| 305 | { |
| 306 | Matrix temp; |
| 307 | Matrix translation = TranslationMatrix( m_movement ); |
| 308 | temp = m_localTransform * translation; |
| 309 | // Check the move callback for if we should be moving or not |
| 310 | if( OnMoveCallback( m_localTransform, temp ) ) |
| 311 | { |
| 312 | m_localTransform = temp; |
| 313 | m_translation.x = m_localTransform._41; |
| 314 | m_translation.y = m_localTransform._42; |
| 315 | m_translation.z = m_localTransform._43; |
| 316 | m_movement.x = 0.0f; |
| 317 | m_movement.y = 0.0f; |
| 318 | m_movement.z = 0.0f; |
| 319 | } |
| 320 | m_moved = false; |
| 321 | } |
| 322 | |
| 323 | Matrix translation = TranslationMatrix( m_pivot ); |
| 324 | m_worldTransform = m_localTransform * translation; |
| 325 | for( PrimitiveIterator it = m_primitives.begin(); it != m_primitives.end(); ++it ) |
| 326 | { |
| 327 | ( *it )->m_localTransform = m_localTransform; |
| 328 | ( *it )->UpdateTransform(); |
| 329 | } |
| 330 | } |
nothing calls this directly
no test coverage detected