MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / convertWorldToLocalPosition

Method convertWorldToLocalPosition

OgreMain/src/OgreNode.cpp:787–797  ·  view source on GitHub ↗

-----------------------------------------------------------------------

Source from the content-addressed store, hash-verified

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 {

Callers 6

updateTrailMethod · 0.45
resetTrailMethod · 0.45
_sortParticlesMethod · 0.45
updateVertexBufferMethod · 0.45
_setDerivedPositionMethod · 0.45
_notifyCurrentCameraMethod · 0.45

Calls 2

inverseAffineMethod · 0.80
InverseMethod · 0.45

Tested by

no test coverage detected