MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / SetPosition

Method SetPosition

src/Nazara/Utility/Node.cpp:476–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474 }
475
476 void Node::SetPosition(const Vector3f& position, CoordSys coordSys)
477 {
478 switch (coordSys)
479 {
480 case CoordSys_Global:
481 if (m_parent && m_inheritPosition)
482 {
483 if (!m_parent->m_derivedUpdated)
484 m_parent->UpdateDerived();
485
486 m_position = (m_parent->m_derivedRotation.GetConjugate()*(position - m_parent->m_derivedPosition))/m_parent->m_derivedScale - m_initialPosition;
487 }
488 else
489 m_position = position - m_initialPosition;
490 break;
491
492 case CoordSys_Local:
493 m_position = position;
494 break;
495 }
496
497 InvalidateNode();
498 }
499
500 void Node::SetPosition(float positionX, float positionY, float positionZ, CoordSys coordSys)
501 {

Callers 15

LayoutMethod · 0.45
OnAttachedMethod · 0.45
InitializeStaticBodyMethod · 0.45
LayoutMethod · 0.45
LayoutMethod · 0.45
LayoutMethod · 0.45
LayoutMethod · 0.45
RefreshCursorMethod · 0.45
OnUpdateMethod · 0.45
OnUpdateMethod · 0.45
AnimateSkeletonMethod · 0.45
RigidBody2D.cppFile · 0.45

Calls 1

UpdateDerivedMethod · 0.80

Tested by

no test coverage detected