Ejemplo n.º 1
0
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);
}
Ejemplo n.º 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;
  }
}