Esempio n. 1
0
 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;
 }
Esempio n. 2
0
static inline uint hthash(const normalkey &k) { return hthash(k.pos); }
Esempio n. 3
0
/// create hash for hashsts
static inline uint hthash(const teaminfo &t) { return hthash(t.team); }
Esempio n. 4
0
/// create hashes to access hashmaps
static inline uint hthash(const teamscore &t) { return hthash(t.team); }