예제 #1
0
파일: object.c 프로젝트: johnh530/electro
int send_create_vert(int i)
{
    send_event(EVENT_CREATE_VERT);
    send_index(i);

    return create_vert(i);
}
예제 #2
0
Dllist* create_rd_data_struct()
{
	Dllist* dll_lnk = create_dll();

	for(int i=0; i<NB_VERTEX; i++)
	{
		int coords[2] = { randn( minX+margin, maxX-margin ), randn( minY+margin, maxY-margin ) };
		Vertex *new_vert = create_vert( coords );
		add_end_dll( dll_lnk, new_vert, STD );
	}
	dll_lnk->up2date[STD] = 1;
	return dll_lnk;
}
예제 #3
0
Dllist* create_dll(void)
{
	Dllist *new_dll = (Dllist *) malloc(sizeof(Dllist));
	if (new_dll != NULL)
	{
		int coords[DIM] = {0};
		new_dll->root = create_vert(coords);

		for(int i=0; i<NBL; i++)
		{
			new_dll->root->links[i][BWD] = new_dll->root;	
			new_dll->root->links[i][FWD] = new_dll->root;
			new_dll->length[i] = 0;
			new_dll->up2date[i] = 0;
		}
	}
	return new_dll;
}
예제 #4
0
파일: object.c 프로젝트: johnh530/electro
void recv_create_vert(void)
{
    int i = recv_index();

    create_vert(i);
}