Ejemplo n.º 1
0
int get_first_region(client_handle_t handle, region_info_t *rgn)
{
    socket_info_t *s = SOCKET(handle);
    if (CHECK_HANDLE(handle))
	return CS_BAD_HANDLE;
    
    if ((handle->Attributes & INFO_MASTER_CLIENT) &&
	(!(s->state & SOCKET_REGION_INFO))) {
	setup_regions(handle, 0, &s->c_region);
	setup_regions(handle, 1, &s->a_region);
	s->state |= SOCKET_REGION_INFO;
    }

    if (rgn->Attributes & REGION_TYPE_AM)
	return match_region(handle, s->a_region, rgn);
    else
	return match_region(handle, s->c_region, rgn);
} /* get_first_region */
Ejemplo n.º 2
0
void TriangleGenerator::setup_input(TriangleInput & input, 
                                    struct ::triangulateio *in) {
  setup_vertex_coords(input, in); 
  setup_vertex_params(input, in);
  setup_vertex_markers(input, in);
  setup_segments(input, in);
  setup_holes(input, in);
  setup_regions(input, in);
}