-----------------------------------------------------------------------
| 785 | } |
| 786 | //----------------------------------------------------------------------- |
| 787 | Vector3 Node::convertWorldToLocalPosition( const Vector3 &worldPos ) |
| 788 | { |
| 789 | OGRE_ASSERT_MEDIUM( !mCachedTransformOutOfDate ); |
| 790 | #if OGRE_NODE_INHERIT_TRANSFORM |
| 791 | return Node::_getFullTransform().inverseAffine().transformAffine( worldPos ); // non virt call |
| 792 | #else |
| 793 | // result is the same as above, but inversion of Quaternion is faster than inversion of Mat3x4 |
| 794 | return Node::_getDerivedOrientation().Inverse() * ( worldPos - Node::_getDerivedPosition() ) / |
| 795 | Node::_getDerivedScale(); // non virt calls |
| 796 | #endif |
| 797 | } |
| 798 | //----------------------------------------------------------------------- |
| 799 | Vector3 Node::convertLocalToWorldPosition( const Vector3 &localPos ) |
| 800 | { |
no test coverage detected