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

Method SetRotation

src/Nazara/Utility/Node.cpp:505–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503 }
504
505 void Node::SetRotation(const Quaternionf& rotation, CoordSys coordSys)
506 {
507 // Évitons toute mauvaise surprise ..
508 Quaternionf q(rotation);
509 q.Normalize();
510
511 switch (coordSys)
512 {
513 case CoordSys_Global:
514 if (m_parent && m_inheritRotation)
515 {
516 Quaternionf rot(m_parent->GetRotation() * m_initialRotation);
517
518 m_rotation = rot.GetConjugate() * q;
519 }
520 else
521 m_rotation = q;
522
523 break;
524
525 case CoordSys_Local:
526 m_rotation = q;
527 break;
528 }
529
530 InvalidateNode();
531 }
532
533 void Node::SetScale(const Vector3f& scale, CoordSys coordSys)
534 {

Callers 12

OnUpdateMethod · 0.45
OnUpdateMethod · 0.45
DrawConeMethod · 0.45
AnimateSkeletonMethod · 0.45
RigidBody2D.cppFile · 0.45
ListenerSystem.cppFile · 0.45
OnUpdateMethod · 0.45
EnterMethod · 0.45
UpdateMethod · 0.45
CreateSpaceShipMethod · 0.45
CreateTurretMethod · 0.45
mainFunction · 0.45

Calls 1

GetRotationMethod · 0.45

Tested by

no test coverage detected