예제 #1
0
파일: rcdt.c 프로젝트: KyleLink/poly2tri-c
void
p2tr_cdt_free_full (P2trCDT* self, gboolean clear_mesh)
{
  p2tr_pslg_free (self->outline);
  if (clear_mesh)
    p2tr_mesh_clear (self->mesh);
  p2tr_mesh_unref (self->mesh);

  g_slice_free (P2trCDT, self);
}
예제 #2
0
void
p2tr_point_remove (P2trPoint *self)
{
  /* We can not iterate over the list of edges while removing the edges,
   * because the removal action will modify the list. Instead we will
   * simply look at the first edge untill the list is emptied. */
  while (self->outgoing_edges != NULL)
    p2tr_edge_remove ((P2trEdge*) self->outgoing_edges->data);

  if (self->mesh != NULL)
  {
    p2tr_mesh_on_point_removed (self->mesh, self);
    p2tr_mesh_unref (self->mesh);
    self->mesh = NULL;
  }
}