示例#1
0
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);
}
示例#2
0
/* 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;
}
示例#3
0
文件: edgehash.c 项目: jinjoh/NOOR
int BLI_edgehash_haskey(EdgeHash *eh, int v0, int v1) {
	return BLI_edgehash_lookup_p(eh, v0, v1)!=NULL;
}
示例#4
0
文件: edgehash.c 项目: jinjoh/NOOR
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;
}
示例#5
0
bool BLI_edgehash_haskey(EdgeHash *eh, unsigned int v0, unsigned int v1)
{
	return BLI_edgehash_lookup_p(eh, v0, v1) != NULL;
}