MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / GetFacePlane

Method GetFacePlane

src/lua/LuaObstacle.cpp:650–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

648
649
650int LuaObstacle::GetFacePlane(lua_State* L) {
651 const MeshFace* face = ParseMeshFace(L, 1);
652 if (face == NULL) {
653 return luaL_pushnil(L);
654 }
655 const fvec4& vec = face->getPlane();
656 lua_createtable(L, 4, 0);
657 lua_pushfloat(L, vec.x); lua_rawseti(L, -2, 1);
658 lua_pushfloat(L, vec.y); lua_rawseti(L, -2, 2);
659 lua_pushfloat(L, vec.z); lua_rawseti(L, -2, 3);
660 lua_pushfloat(L, vec.w); lua_rawseti(L, -2, 4);
661 return 1;
662}
663
664
665int LuaObstacle::GetFacePhyDrv(lua_State* L) {

Callers

nothing calls this directly

Calls 6

ParseMeshFaceFunction · 0.85
luaL_pushnilFunction · 0.85
lua_pushfloatFunction · 0.85
getPlaneMethod · 0.80
lua_createtableFunction · 0.50
lua_rawsetiFunction · 0.50

Tested by

no test coverage detected