MCPcopy Create free account
hub / github.com/defold/defold / CalculateNodeTransform

Function CalculateNodeTransform

engine/gui/src/gui.cpp:4712–4733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4710 }
4711
4712 void CalculateNodeTransform(HScene scene, InternalNode* n, const CalculateNodeTransformFlags flags, Matrix4& out_transform)
4713 {
4714 Matrix4 parent_trans;
4715 if (n->m_ParentIndex != INVALID_INDEX)
4716 {
4717 InternalNode* parent = &scene->m_Nodes[n->m_ParentIndex];
4718 CalculateParentNodeTransform(scene, parent, parent_trans);
4719 }
4720
4721 const Node& node = n->m_Node;
4722 if (node.m_DirtyLocal || (scene->m_ResChanged && scene->m_AdjustReference != ADJUST_REFERENCE_DISABLED))
4723 {
4724 UpdateLocalTransform(scene, n);
4725 }
4726 out_transform = node.m_LocalTransform;
4727 CalculateNodeExtents(node, flags, out_transform);
4728
4729 if (n->m_ParentIndex != INVALID_INDEX)
4730 {
4731 out_transform = parent_trans * out_transform;
4732 }
4733 }
4734
4735 void* GetResource(dmGui::HScene scene, dmhash_t resource_id, dmhash_t suffix_with_dot)
4736 {

Callers 8

GetNodeWorldTransformFunction · 0.70
PlayNodeParticlefxFunction · 0.70
PickNodeFunction · 0.70
ScreenToLocalPositionFunction · 0.70
SetNodeParentFunction · 0.70
LuaGetScreenPositionFunction · 0.70
TEST_FFunction · 0.50
_GET_NODE_SCENE_POSITIONFunction · 0.50

Calls 3

CalculateNodeExtentsFunction · 0.85
UpdateLocalTransformFunction · 0.70

Tested by 2

TEST_FFunction · 0.40
_GET_NODE_SCENE_POSITIONFunction · 0.40