| 479 | |
| 480 | |
| 481 | void Tr2ScalingTool::Init( Matrix& initialTransform ) |
| 482 | { |
| 483 | // Extract the scaling and translation |
| 484 | Vector3 scaling; |
| 485 | Vector3 pos; |
| 486 | Quaternion rotation; |
| 487 | Matrix rotationMatrix; |
| 488 | Decompose( scaling, rotation, pos, initialTransform ); |
| 489 | rotationMatrix = RotationMatrix( rotation ); |
| 490 | |
| 491 | m_localTransform = TranslationMatrix( pos ); |
| 492 | m_localTransform = rotationMatrix * m_localTransform; |
| 493 | |
| 494 | Matrix translation = TranslationMatrix( m_pivot ); |
| 495 | m_worldTransform = m_localTransform * translation; |
| 496 | ResetPrimitives(); |
| 497 | // Compute initial length when captured |
| 498 | Vector3 vecA, vecB, vecC; |
| 499 | vecA.x = m_worldTransform._41; |
| 500 | vecA.y = m_worldTransform._42; |
| 501 | vecA.z = m_worldTransform._43; |
| 502 | vecB = m_xBox->GetCenterOfMass(); |
| 503 | |
| 504 | m_initialLength = -1; |
| 505 | m_scale = scaling; |
| 506 | m_initialScale = scaling; |
| 507 | } |
nothing calls this directly
no test coverage detected