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

Function GetPositionFromArgumentIndex

engine/gui/src/gui_script.cpp:1684–1694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1682 }
1683
1684 static inline Point3 GetPositionFromArgumentIndex(lua_State* L, int index)
1685 {
1686 Vector4* v4;
1687 if ((v4 = dmScript::ToVector4(L, index)))
1688 {
1689 return Point3(v4->getXYZ());
1690 }
1691
1692 Vector3* v3 = dmScript::CheckVector3(L, index);
1693 return Point3(*v3);
1694 }
1695
1696 /*# creates a new box node
1697 * Dynamically create a new box node.

Callers 6

LuaNewBoxNodeFunction · 0.85
LuaNewTextNodeFunction · 0.85
LuaNewPieNodeFunction · 0.85
LuaSetScreenPositionFunction · 0.85
LuaScreenToLocalFunction · 0.85
LuaNewParticlefxNodeFunction · 0.85

Calls 4

ToVector4Function · 0.85
CheckVector3Function · 0.85
Point3Class · 0.50
getXYZMethod · 0.45

Tested by

no test coverage detected