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

Method AddNormal

src/world/WorldScript.cpp:709–722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

707//============================================================================//
708
709int WorldScript::AddNormal(lua_State* L) {
710 LuaMesh* mesh = checkMesh(L, 1);
711 fvec3 norm;
712 if (!lua_istable(L, 2)) {
713 norm = luaL_checkfvec3(L, 2);
714 }
715 else {
716 norm = fvec3(checkTableFloat(L, 2, 1),
717 checkTableFloat(L, 2, 2),
718 checkTableFloat(L, 2, 3));
719 }
720 mesh->norms.push_back(norm);
721 return 0;
722}
723
724//============================================================================//
725

Callers

nothing calls this directly

Calls 3

luaL_checkfvec3Function · 0.85
checkTableFloatFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected