// Hashset iterator function for rehashing the spatial hash. (hash hash hash hash?) static void handleRehashHelper(void *elt, void *data) { cpHandle *hand = (cpHandle *)elt; cpSpaceHash *hash = (cpSpaceHash *)data; hashHandle(hash, hand, hash->bbfunc(hand->obj)); }
void cpSpaceHashRehashObject(cpSpaceHash *hash, void *obj, unsigned int id) { cpHandle *hand = (cpHandle *)cpHashSetFind(hash->handleSet, id, obj); hashHandle(hash, hand, hash->bbfunc(obj)); }
void cpSpaceHashInsert(cpSpaceHash *hash, void *obj, unsigned int id, cpBB bb) { cpHandle *hand = (cpHandle *)cpHashSetInsert(hash->handleSet, id, obj, NULL); hashHandle(hash, hand, bb); }
static void rehash_helper(cpHandle *hand, cpSpaceHash *hash) { hashHandle(hash, hand, hash->spatialIndex.bbfunc(hand->obj)); }
static void cpSpaceHashInsert(cpSpaceHash *hash, void *obj, cpHashValue hashid) { cpHandle *hand = (cpHandle *)cpHashSetInsert(hash->handleSet, hashid, obj, hash, (cpHashSetTransFunc)handleSetTrans); hashHandle(hash, hand, hash->spatialIndex.bbfunc(obj)); }
void cpSpaceHashRehashObject(cpSpaceHash *hash, void *obj, cpHashValue hashid) { cpHandle *hand = (cpHandle *)cpHashSetFind(hash->handleSet, hashid, obj); hashHandle(hash, hand, hash->bbfunc(obj)); }
void cpSpaceHashInsert(cpSpaceHash *hash, void *obj, cpHashValue hashid, cpBB bb) { cpHandle *hand = (cpHandle *)cpHashSetInsert(hash->handleSet, hashid, obj, hash); hashHandle(hash, hand, bb); }