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

Method AddVertex

src/world/WorldScript.cpp:692–705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

690//============================================================================//
691
692int WorldScript::AddVertex(lua_State* L) {
693 LuaMesh* mesh = checkMesh(L, 1);
694 fvec3 vert;
695 if (!lua_istable(L, 2)) {
696 vert = luaL_checkfvec3(L, 2);
697 }
698 else {
699 vert = fvec3(checkTableFloat(L, 2, 1),
700 checkTableFloat(L, 2, 2),
701 checkTableFloat(L, 2, 3));
702 }
703 mesh->verts.push_back(vert);
704 return 0;
705}
706
707//============================================================================//
708

Callers

nothing calls this directly

Calls 3

luaL_checkfvec3Function · 0.85
checkTableFloatFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected