int addvert(const vertex &v) { uint h = hthash(v.pos)&(SIZE-1); for(int i = table[h]; i>=0; i = chain[i]) { const vertex &c = verts[i]; if(c.pos==v.pos && c.tc==v.tc && c.norm==v.norm && c.tangent==v.tangent && c.bitangent==v.bitangent) return i; } if(verts.length() >= USHRT_MAX) return -1; verts.add(v); chain.add(table[h]); return table[h] = verts.length()-1; }
static inline uint hthash(const normalkey &k) { return hthash(k.pos); }
/// create hash for hashsts static inline uint hthash(const teaminfo &t) { return hthash(t.team); }
/// create hashes to access hashmaps static inline uint hthash(const teamscore &t) { return hthash(t.team); }