static void laplacian_increase_edge_count(EdgeHash *edgehash, int v1, int v2) { void **p = BLI_edgehash_lookup_p(edgehash, v1, v2); if(p) *p = (void*)((intptr_t)*p + (intptr_t)1); else BLI_edgehash_insert(edgehash, v1, v2, (void*)(intptr_t)1); }
/* Creates a hash of edges to flags indicating selected/visible */ static void get_marked_edge_info__orFlags(EdgeHash *eh, int v0, int v1, int flags) { int *flags_p; if (!BLI_edgehash_haskey(eh, v0, v1)) BLI_edgehash_insert(eh, v0, v1, NULL); flags_p = (int *) BLI_edgehash_lookup_p(eh, v0, v1); *flags_p |= flags; }
int BLI_edgehash_haskey(EdgeHash *eh, int v0, int v1) { return BLI_edgehash_lookup_p(eh, v0, v1)!=NULL; }
void* BLI_edgehash_lookup(EdgeHash *eh, int v0, int v1) { void **value_p = BLI_edgehash_lookup_p(eh,v0,v1); return value_p?*value_p:NULL; }
bool BLI_edgehash_haskey(EdgeHash *eh, unsigned int v0, unsigned int v1) { return BLI_edgehash_lookup_p(eh, v0, v1) != NULL; }