mirror of https://github.com/CGAL/cgal
Fixed using Weighted_point_creator to construct weighted point
This class is obsolete; kernel functors should be used.
This commit is contained in:
parent
6dd3287538
commit
bfdb4a52da
|
|
@ -214,7 +214,6 @@
|
|||
//#include <CGAL/Mesher_level_visitors.h>
|
||||
//#include <CGAL/Meshes/Filtered_multimap_container.h>
|
||||
//#include <CGAL/Meshes/Triangulation_mesher_level_traits_3.h>
|
||||
//#include <CGAL/Mesh_3/Creator_weighted_point_3.h>
|
||||
//#include <CGAL/Mesh_3/global_parameters.h>
|
||||
//#include <CGAL/Mesh_3/Mesher_3.h>
|
||||
//#include <CGAL/Mesh_3/mesh_standard_cell_criteria.h>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include <CGAL/Bbox_3.h>
|
||||
|
||||
#include "test_utilities.h"
|
||||
#include <CGAL/Mesh_3/Creator_weighted_point_3.h>
|
||||
|
||||
#include <CGAL/Polyhedral_mesh_domain_3.h>
|
||||
|
||||
|
|
@ -47,10 +46,11 @@ struct Tester
|
|||
typedef typename CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
|
||||
typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
|
||||
|
||||
typedef typename Tr::Bare_point Bare_point;
|
||||
typedef typename Tr::Weighted_point Weighted_point;
|
||||
|
||||
typedef typename Tr::Geom_traits Gt;
|
||||
typedef typename Gt::FT FT;
|
||||
typedef typename Gt::Point_3 Point;
|
||||
typedef CGAL::Mesh_3::Creator_weighted_point_3<FT, Point> Point_creator;
|
||||
|
||||
typedef typename C3t3::Cell_handle Cell_handle;
|
||||
typedef typename C3t3::Facet Facet;
|
||||
|
|
@ -79,11 +79,10 @@ struct Tester
|
|||
//-------------------------------------------------------
|
||||
// Data generation : fill a triangulation with 4 vertices
|
||||
//-------------------------------------------------------
|
||||
Point_creator creator;
|
||||
Point p1 = creator(0,0,0);
|
||||
Point p2 = creator(1,0,0);
|
||||
Point p3 = creator(0,1,0);
|
||||
Point p4 = creator(0,0,1);
|
||||
Weighted_point p1(0,0,0);
|
||||
Weighted_point p2(1,0,0);
|
||||
Weighted_point p3(0,1,0);
|
||||
Weighted_point p4(0,0,1);
|
||||
|
||||
tr.insert(p1);
|
||||
tr.insert(p2);
|
||||
|
|
@ -234,8 +233,8 @@ struct Tester
|
|||
input >> polyhedron;
|
||||
input.close();
|
||||
Mesh_domain domain(polyhedron);
|
||||
|
||||
typedef std::vector<std::pair<Point, Index> > Initial_points_vector;
|
||||
|
||||
typedef std::vector<std::pair<Bare_point, Index> > Initial_points_vector;
|
||||
Initial_points_vector initial_points;
|
||||
domain.construct_initial_points_object()(std::back_inserter(initial_points), 6);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include <CGAL/Bbox_3.h>
|
||||
|
||||
#include "test_utilities.h"
|
||||
#include <CGAL/Mesh_3/Creator_weighted_point_3.h>
|
||||
|
||||
#include <CGAL/Implicit_mesh_domain_3.h>
|
||||
#include <CGAL/Mesh_domain_with_polyline_features_3.h>
|
||||
|
|
@ -48,10 +47,11 @@ struct Tester
|
|||
typedef CGAL::Mesh_complex_3_in_triangulation_3<
|
||||
Tr, typename Md::Corner_index, typename Md::Curve_segment_index> C3t3;
|
||||
|
||||
typedef typename Tr::Geom_traits Gt;
|
||||
typedef typename Gt::FT FT;
|
||||
typedef typename Tr::Weighted_point Point;
|
||||
typedef CGAL::Mesh_3::Creator_weighted_point_3<FT, Point> Point_creator;
|
||||
typedef typename Tr::Bare_point Bare_point;
|
||||
typedef typename Tr::Weighted_point Weighted_point;
|
||||
|
||||
typedef typename Tr::Geom_traits Gt;
|
||||
typedef typename Gt::FT FT;
|
||||
|
||||
typedef typename C3t3::Cell_handle Cell_handle;
|
||||
typedef typename C3t3::Facet Facet;
|
||||
|
|
@ -83,15 +83,14 @@ struct Tester
|
|||
assert(c3t3.number_of_facets_in_complex() == 0);
|
||||
assert(c3t3.number_of_edges_in_complex() == 0);
|
||||
assert(c3t3.number_of_vertices_in_complex() == 0);
|
||||
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Data generation : fill a triangulation with 4 vertices
|
||||
//-------------------------------------------------------
|
||||
Point_creator creator;
|
||||
Point p1 = creator(0,0,0);
|
||||
Point p2 = creator(1,0,0);
|
||||
Point p3 = creator(0,1,0);
|
||||
Point p4 = creator(0,0,1);
|
||||
Weighted_point p1(0,0,0);
|
||||
Weighted_point p2(1,0,0);
|
||||
Weighted_point p3(0,1,0);
|
||||
Weighted_point p4(0,0,1);
|
||||
|
||||
Vertex_handle vp1 = tr.insert(p1);
|
||||
Vertex_handle vp2 = tr.insert(p2);
|
||||
|
|
@ -248,14 +247,14 @@ struct Tester
|
|||
//-------------------------------------------------------
|
||||
std::cout << "Insert 6 points in c3t3_bis, add 1 corner and 1 edge to c3t3_bis\n";
|
||||
|
||||
std::vector<Point> points;
|
||||
points.push_back(creator(10,11,12));
|
||||
points.push_back(creator(11,13,10));
|
||||
points.push_back(creator(7,4,6));
|
||||
points.push_back(creator(5,2,14));
|
||||
points.push_back(creator(1,2,3));
|
||||
points.push_back(creator(3,9,13));
|
||||
|
||||
std::vector<Weighted_point> points;
|
||||
points.push_back(Weighted_point(10,11,12));
|
||||
points.push_back(Weighted_point(11,13,10));
|
||||
points.push_back(Weighted_point(7,4,6));
|
||||
points.push_back(Weighted_point(5,2,14));
|
||||
points.push_back(Weighted_point(1,2,3));
|
||||
points.push_back(Weighted_point(3,9,13));
|
||||
|
||||
C3t3 c3t3_bis;
|
||||
c3t3_bis.triangulation().insert(points.begin(),points.end());
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
#include "test_utilities.h"
|
||||
#include <CGAL/Polyhedral_mesh_domain_3.h>
|
||||
#include <CGAL/Mesh_3/Creator_weighted_point_3.h>
|
||||
#include <CGAL/Polyhedron_3.h>
|
||||
|
||||
#include <CGAL/Mesh_criteria_3.h>
|
||||
|
|
@ -55,16 +54,17 @@ struct Tester
|
|||
typedef typename C3t3::Facet Facet;
|
||||
typedef typename C3t3::Surface_patch_index Surface_patch_index;
|
||||
|
||||
typedef typename Tr::Geom_traits Gt;
|
||||
typedef typename Gt::FT FT;
|
||||
typedef typename Gt::Point_3 Point;
|
||||
typedef CGAL::Mesh_3::Creator_weighted_point_3<FT, Point> Point_creator;
|
||||
typedef typename Tr::Bare_point Bare_point;
|
||||
typedef typename Tr::Weighted_point Weighted_point;
|
||||
|
||||
typedef typename Tr::Geom_traits Gt;
|
||||
typedef typename Gt::FT FT;
|
||||
|
||||
C3t3 c3t3_;
|
||||
// Cells & facets
|
||||
int c1_,c2_,f1_,f2_;
|
||||
// Facets center
|
||||
Point p1_,p2_;
|
||||
Bare_point p1_,p2_;
|
||||
|
||||
Tester()
|
||||
: c3t3_()
|
||||
|
|
@ -75,15 +75,14 @@ struct Tester
|
|||
{
|
||||
Tr& tr = c3t3_.triangulation();
|
||||
|
||||
Point_creator creator;
|
||||
Point p1 = creator(0,0,0);
|
||||
Point p2 = creator(1,0,0);
|
||||
Point p3 = creator(0,1,0);
|
||||
Point p4 = creator(0,0,100);
|
||||
Point p5 = creator(0,0,-1);
|
||||
Weighted_point p1(0,0,0);
|
||||
Weighted_point p2(1,0,0);
|
||||
Weighted_point p3(0,1,0);
|
||||
Weighted_point p4(0,0,100);
|
||||
Weighted_point p5(0,0,-1);
|
||||
|
||||
p1_ = creator(0,.5,50);
|
||||
p2_ = creator(1,1,-1);
|
||||
p1_ = Bare_point(0,.5,50);
|
||||
p2_ = Bare_point(1,1,-1);
|
||||
|
||||
tr.insert(p1);
|
||||
tr.insert(p2);
|
||||
|
|
@ -92,7 +91,7 @@ struct Tester
|
|||
tr.insert(p5);
|
||||
}
|
||||
|
||||
void init_facet(const Facet& f, const Point& p) const
|
||||
void init_facet(const Facet& f, const Bare_point& p) const
|
||||
{
|
||||
f.first->set_surface_patch_index(f.second,Surface_patch_index(0,1));
|
||||
f.first->set_facet_surface_center(f.second,p);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
//******************************************************************************
|
||||
|
||||
#include "test_utilities.h"
|
||||
#include <CGAL/Mesh_3/Creator_weighted_point_3.h>
|
||||
#include <CGAL/Polyhedral_mesh_domain_3.h>
|
||||
#include <CGAL/Polyhedron_3.h>
|
||||
#include <CGAL/Timer.h>
|
||||
|
|
@ -36,32 +35,29 @@ struct Tester
|
|||
typedef CGAL::Polyhedral_mesh_domain_3<Polyhedron, K> Mesh_traits;
|
||||
|
||||
typedef typename CGAL::Mesh_triangulation_3<Mesh_traits>::type Tr;
|
||||
|
||||
typedef typename Tr::Geom_traits Gt;
|
||||
|
||||
typedef typename Tr::Bare_point Bare_point;
|
||||
typedef typename Tr::Weighted_point Weighted_point;
|
||||
typedef typename Gt::FT FT;
|
||||
|
||||
typedef CGAL::Mesh_3::Creator_weighted_point_3<FT, Bare_point> Point_creator;
|
||||
typedef typename Tr::Geom_traits Gt;
|
||||
typedef typename Gt::FT FT;
|
||||
|
||||
typedef CGAL::Regular_triangulation_3<Gt> Triangulation;
|
||||
|
||||
void operator()() const
|
||||
{
|
||||
typename Gt::Construct_weighted_point_3 p2wp;
|
||||
//-------------------------------------------------------
|
||||
// Data generation : get 4 nearly coplanar points
|
||||
//-------------------------------------------------------
|
||||
Point_creator creator;
|
||||
FT little(1e-10);
|
||||
FT tiny(1e-25);
|
||||
|
||||
Weighted_point p1 = p2wp(creator(little,1,tiny));
|
||||
Weighted_point p2 = p2wp(creator(1,little,0));
|
||||
Weighted_point p3 = p2wp(creator(-1*little,1,0));
|
||||
Weighted_point p4 = p2wp(creator(1,-1*little,0));
|
||||
Weighted_point p5 = p2wp(creator(0,0,1));
|
||||
Weighted_point p6 = p2wp(creator(0,1,0));
|
||||
|
||||
Weighted_point p1(little,1,tiny);
|
||||
Weighted_point p2(1,little,0);
|
||||
Weighted_point p3(-1*little,1,0);
|
||||
Weighted_point p4(1,-1*little,0);
|
||||
Weighted_point p5(0,0,1);
|
||||
Weighted_point p6(0,1,0);
|
||||
|
||||
std::cerr << "Using points: p1[" << p1 << "]\tp2[" << p2
|
||||
<< "]\tp3[" << p3 << "]\tp4[" << p4 << "]\tp5[" << p5
|
||||
|
|
|
|||
Loading…
Reference in New Issue