Scilab Function
Last update : November 2005

cgal_cdt2_delete - Delete a pointer that represent cdt2.

Calling Sequence

cgal_cdt2_delete(ptr,"ptr")
cgal_cdt2_delete()

Parameters

Description

Given a pointer ptr of cdt2, cgal_cdt2_delete(ptr,"ptr") frees the memory holded by the pointer ptr and clears ptr in Scialb interpreter. if no parameters are given to cgal_cdt2_delete(), then all pointers of differents cdt2 will be deleted.

Examples


x = rand(1,10);
y = rand(1,10);
new_x = rand(1,10);
new_y = rand(1,10);
//example 1:
C=[8.    2.     7.    4.;6.    4.5    4.    5.;3.    6.     3.    7.;3.    4.     2.    3.;9.    4.     8.    7.];
[tri,ptr] = cgal_constraind_delaunay_2(x,y,C);
cgal_cdt2_insert_points(ptr,new_x,new_y);
new_tri = cgal_cdt2_get_connectivity(ptr);
cgal_cdt2_delete(ptr,"ptr"); // ptr is deleted here and cleared from scilab interpreter.
ptr
  !--error     4
undefined variable : ptr
//example 2:
[tri1,ptr1] = cgal_constraind_delaunay_2(rand(1,10),rand(1,10),[]);
clear ptr1; // ptr is not yet defined in scilab interpreter, but the memory is not freed.
cgal_cdt2_delete(); // all pointers of cdt2 will be deleted.
 
  

See Also

cgal_cdt2_insert_constraints ,   cgal_cdt2_remove_constraints ,   cgal_cdt2_insert_points ,   cgal_cdt2_remove_points ,   cgal_cdt2_get_connectivity ,   cgal_cdt2_get_coord ,  

The function above uses the Triangulation_2 package of CGAL, which is under QPL license. See License Terms

Authors

Naceur MESKINI.