mirror of https://github.com/CGAL/cgal
Misc minor changes
Indentation, comments, whitespace, etc.
This commit is contained in:
parent
57142bd545
commit
41f5c47394
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#include <CGAL/license/Convex_hull_2.h>
|
#include <CGAL/license/Convex_hull_2.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/Point_2.h>
|
#include <CGAL/Point_2.h>
|
||||||
#include <CGAL/predicates_on_points_2.h>
|
#include <CGAL/predicates_on_points_2.h>
|
||||||
#include <CGAL/distance_predicates_2.h>
|
#include <CGAL/distance_predicates_2.h>
|
||||||
|
|
|
||||||
|
|
@ -650,7 +650,6 @@ Labeled_mesh_domain_3<F,BGT,Null>::Construct_initial_points::operator()(
|
||||||
typedef Random_points_on_sphere_3<Point_3> Random_points_on_sphere_3;
|
typedef Random_points_on_sphere_3<Point_3> Random_points_on_sphere_3;
|
||||||
typedef Random_points_in_sphere_3<Point_3> Random_points_in_sphere_3;
|
typedef Random_points_in_sphere_3<Point_3> Random_points_in_sphere_3;
|
||||||
|
|
||||||
|
|
||||||
const FT squared_radius = BGT().compute_squared_radius_3_object()(
|
const FT squared_radius = BGT().compute_squared_radius_3_object()(
|
||||||
r_domain_.bounding_sphere(r_domain_.bbox_));
|
r_domain_.bounding_sphere(r_domain_.bbox_));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -960,7 +960,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// -----------------------------------
|
// -----------------------------------
|
||||||
// Usefull Functors
|
// Useful Functors
|
||||||
// -----------------------------------
|
// -----------------------------------
|
||||||
/**
|
/**
|
||||||
* @class Get_all_facets
|
* @class Get_all_facets
|
||||||
|
|
@ -1089,7 +1089,7 @@ private:
|
||||||
/**
|
/**
|
||||||
* @class Update_c3t3
|
* @class Update_c3t3
|
||||||
*
|
*
|
||||||
* A functor which updates c3t3 w.r.t the domain.
|
* A functor which updates c3t3 w.r.t. the domain.
|
||||||
*/
|
*/
|
||||||
class Update_c3t3
|
class Update_c3t3
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#include <CGAL/license/Mesh_3.h>
|
#include <CGAL/license/Mesh_3.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/Mesh_3/config.h>
|
#include <CGAL/Mesh_3/config.h>
|
||||||
|
|
||||||
#include <CGAL/convex_hull_2.h>
|
#include <CGAL/convex_hull_2.h>
|
||||||
|
|
@ -45,34 +44,32 @@ template <typename C3T3,
|
||||||
typename SizingField = Uniform_sizing_field<typename C3T3::Triangulation> >
|
typename SizingField = Uniform_sizing_field<typename C3T3::Triangulation> >
|
||||||
class Lloyd_move
|
class Lloyd_move
|
||||||
{
|
{
|
||||||
typedef typename C3T3::Triangulation Tr;
|
typedef typename C3T3::Triangulation Tr;
|
||||||
typedef typename Tr::Geom_traits Gt;
|
typedef typename Tr::Geom_traits Gt;
|
||||||
|
|
||||||
typedef typename Tr::Cell_handle Cell_handle;
|
typedef typename Tr::Vertex_handle Vertex_handle;
|
||||||
typedef typename Tr::Vertex_handle Vertex_handle;
|
typedef typename Tr::Edge Edge;
|
||||||
typedef typename Tr::Edge Edge;
|
typedef typename Tr::Facet Facet;
|
||||||
typedef typename Tr::Facet Facet;
|
typedef typename Tr::Cell_handle Cell_handle;
|
||||||
typedef typename Tr::Weighted_point Weighted_point;
|
|
||||||
typedef typename Tr::Bare_point Bare_point;
|
|
||||||
|
|
||||||
typedef typename std::vector<Cell_handle> Cell_vector;
|
typedef typename Tr::Bare_point Bare_point;
|
||||||
typedef typename std::vector<Vertex_handle> Vertex_vector;
|
|
||||||
typedef typename std::vector<Facet> Facet_vector;
|
|
||||||
|
|
||||||
typedef typename Gt::FT FT;
|
typedef typename std::vector<Facet> Facet_vector;
|
||||||
typedef typename Gt::Vector_3 Vector_3;
|
typedef typename std::vector<Cell_handle> Cell_vector;
|
||||||
typedef typename Gt::Tetrahedron_3 Tetrahedron_3;
|
|
||||||
typedef typename Gt::Plane_3 Plane_3;
|
|
||||||
typedef typename Gt::Point_2 Point_2;
|
|
||||||
|
|
||||||
typedef typename Gt::Aff_transformation_3 Aff_transformation_3;
|
typedef typename Gt::FT FT;
|
||||||
|
typedef typename Gt::Point_2 Point_2;
|
||||||
|
typedef typename Gt::Vector_3 Vector_3;
|
||||||
|
typedef typename Gt::Tetrahedron_3 Tetrahedron_3;
|
||||||
|
typedef typename Gt::Plane_3 Plane_3;
|
||||||
|
typedef typename Gt::Aff_transformation_3 Aff_transformation_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef SizingField Sizing_field;
|
typedef SizingField Sizing_field;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Return move to apply on \c v according to Lloyd optimization
|
* @brief Return the move to apply on \c v according to Lloyd optimization
|
||||||
* function
|
* function.
|
||||||
*/
|
*/
|
||||||
Vector_3 operator()(const Vertex_handle& v,
|
Vector_3 operator()(const Vertex_handle& v,
|
||||||
const Cell_vector& incident_cells,
|
const Cell_vector& incident_cells,
|
||||||
|
|
@ -112,7 +109,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* Project_on_plane defines operator() to project point object on plane.
|
* Project_on_plane defines `operator()` to project a point object on the plane `plane`.
|
||||||
*/
|
*/
|
||||||
struct Project_on_plane
|
struct Project_on_plane
|
||||||
{
|
{
|
||||||
|
|
@ -130,7 +127,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To_2d defines operator() to transform Bare_point into Point_2
|
* `To_2d` defines `operator()` to transform from `Bare_point` to `Point_2`.
|
||||||
*/
|
*/
|
||||||
struct To_2d
|
struct To_2d
|
||||||
{
|
{
|
||||||
|
|
@ -144,7 +141,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To_3d defines operator() to transform Point_2 into Bare_point
|
* `To_3d` defines `operator()` to transform from `Point_2` to `Bare_point`.
|
||||||
*/
|
*/
|
||||||
struct To_3d
|
struct To_3d
|
||||||
{
|
{
|
||||||
|
|
@ -159,7 +156,7 @@ private:
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return move for inside vertex \c v
|
* Return the move for the inside vertex \c v.
|
||||||
*/
|
*/
|
||||||
Vector_3 lloyd_move_inside_domain(const Vertex_handle& v,
|
Vector_3 lloyd_move_inside_domain(const Vertex_handle& v,
|
||||||
const Cell_vector& incident_cells,
|
const Cell_vector& incident_cells,
|
||||||
|
|
@ -202,7 +199,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return move for on boundary vertex \c v
|
* Return the move for the on-boundary vertex \c v.
|
||||||
*/
|
*/
|
||||||
Vector_3 lloyd_move_on_boundary(const Vertex_handle& v,
|
Vector_3 lloyd_move_on_boundary(const Vertex_handle& v,
|
||||||
const C3T3& c3t3,
|
const C3T3& c3t3,
|
||||||
|
|
@ -221,7 +218,7 @@ private:
|
||||||
return CGAL::NULL_VECTOR;
|
return CGAL::NULL_VECTOR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2: // centroid
|
case 2: // segment centroid
|
||||||
{
|
{
|
||||||
const Bare_point& a = points.front();
|
const Bare_point& a = points.front();
|
||||||
const Bare_point& b = points.back();
|
const Bare_point& b = points.back();
|
||||||
|
|
@ -245,8 +242,8 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a vector containing surface delaunay ball center of surface
|
* Returns a vector containing the surface delaunay ball centers of the surface
|
||||||
* facets incident to vertex \c v
|
* facets that are incident to vertex \c v.
|
||||||
*/
|
*/
|
||||||
std::vector<Bare_point> extract_lloyd_boundary_points(const Vertex_handle& v,
|
std::vector<Bare_point> extract_lloyd_boundary_points(const Vertex_handle& v,
|
||||||
const C3T3& c3t3) const
|
const C3T3& c3t3) const
|
||||||
|
|
@ -274,7 +271,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return move from \c v to centroid of segment [a,b]
|
* Return the move from \c v to the centroid of the segment [a,b].
|
||||||
*/
|
*/
|
||||||
Vector_3 centroid_segment_move(const Vertex_handle& v,
|
Vector_3 centroid_segment_move(const Vertex_handle& v,
|
||||||
const Bare_point& a,
|
const Bare_point& a,
|
||||||
|
|
@ -282,12 +279,12 @@ private:
|
||||||
const C3T3& c3t3,
|
const C3T3& c3t3,
|
||||||
const Sizing_field& sizing_field) const
|
const Sizing_field& sizing_field) const
|
||||||
{
|
{
|
||||||
|
typename Gt::Construct_point_3 cp =
|
||||||
|
c3t3.triangulation().geom_traits().construct_point_3_object();
|
||||||
typename Gt::Construct_vector_3 vector =
|
typename Gt::Construct_vector_3 vector =
|
||||||
c3t3.triangulation().geom_traits().construct_vector_3_object();
|
c3t3.triangulation().geom_traits().construct_vector_3_object();
|
||||||
typename Gt::Construct_point_3 wp2p =
|
|
||||||
c3t3.triangulation().geom_traits().construct_point_3_object();
|
|
||||||
|
|
||||||
const Bare_point& p = wp2p(v->point());
|
const Bare_point& p = cp(v->point());
|
||||||
|
|
||||||
FT da = density_1d(a,v,sizing_field);
|
FT da = density_1d(a,v,sizing_field);
|
||||||
FT db = density_1d(b,v,sizing_field);
|
FT db = density_1d(b,v,sizing_field);
|
||||||
|
|
@ -297,7 +294,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return move from \c v to centroid of triangle [a,b,c]
|
* Return the move from \c v to the centroid of triangle [a,b,c].
|
||||||
*/
|
*/
|
||||||
Vector_3 centroid_triangle_move(const Vertex_handle& v,
|
Vector_3 centroid_triangle_move(const Vertex_handle& v,
|
||||||
const Bare_point& a,
|
const Bare_point& a,
|
||||||
|
|
@ -308,10 +305,10 @@ private:
|
||||||
{
|
{
|
||||||
typename Gt::Construct_vector_3 vector =
|
typename Gt::Construct_vector_3 vector =
|
||||||
c3t3.triangulation().geom_traits().construct_vector_3_object();
|
c3t3.triangulation().geom_traits().construct_vector_3_object();
|
||||||
typename Gt::Construct_point_3 wp2p =
|
typename Gt::Construct_point_3 cp =
|
||||||
c3t3.triangulation().geom_traits().construct_point_3_object();
|
c3t3.triangulation().geom_traits().construct_point_3_object();
|
||||||
|
|
||||||
const Bare_point& p = wp2p(v->point());
|
const Bare_point& p = cp(v->point());
|
||||||
|
|
||||||
FT da = density_2d<true>(a,v,sizing_field);
|
FT da = density_2d<true>(a,v,sizing_field);
|
||||||
FT db = density_2d<false>(b,v,sizing_field);
|
FT db = density_2d<false>(b,v,sizing_field);
|
||||||
|
|
@ -322,9 +319,9 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* compute approximate centroid of intersection between 3D voronoi cell and
|
* Compute the approximate centroid of the intersection between the 3D voronoi
|
||||||
* boundary. The input is the set of intersection points between Voronoi
|
* cell and the boundary. The input is the set of intersection points between
|
||||||
* edges and the boundary.
|
* Voronoi edges and the boundary.
|
||||||
*/
|
*/
|
||||||
template <typename ForwardIterator>
|
template <typename ForwardIterator>
|
||||||
Vector_3 centroid_general_move(const Vertex_handle& v,
|
Vector_3 centroid_general_move(const Vertex_handle& v,
|
||||||
|
|
@ -375,8 +372,8 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return move from \c v to centroid of polygon[first,last]
|
* Return the move from \c v to the centroid of polygon[first,last].
|
||||||
* Polygon has to be convex
|
* The polygon has to be convex.
|
||||||
*/
|
*/
|
||||||
template <typename ForwardIterator>
|
template <typename ForwardIterator>
|
||||||
Vector_3 centroid_3d_polygon_move(const Vertex_handle& v,
|
Vector_3 centroid_3d_polygon_move(const Vertex_handle& v,
|
||||||
|
|
@ -435,7 +432,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the transformation from reference_point to plane
|
* Return the transformation from `reference_point` to `plane`.
|
||||||
*/
|
*/
|
||||||
Aff_transformation_3 compute_to_3d_transform(const Plane_3& plane,
|
Aff_transformation_3 compute_to_3d_transform(const Plane_3& plane,
|
||||||
const Bare_point& reference_point,
|
const Bare_point& reference_point,
|
||||||
|
|
@ -461,7 +458,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns density_1d
|
* Return density_1d
|
||||||
*/
|
*/
|
||||||
template <typename Sizing_field>
|
template <typename Sizing_field>
|
||||||
FT density_1d(const Bare_point& p,
|
FT density_1d(const Bare_point& p,
|
||||||
|
|
@ -476,7 +473,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns density_2d
|
* Return density_2d
|
||||||
*/
|
*/
|
||||||
template <bool use_v, typename Sizing_field>
|
template <bool use_v, typename Sizing_field>
|
||||||
FT density_2d(const Bare_point& p,
|
FT density_2d(const Bare_point& p,
|
||||||
|
|
@ -491,7 +488,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns density_3d
|
* Return density_3d
|
||||||
*/
|
*/
|
||||||
template <typename Sizing_field>
|
template <typename Sizing_field>
|
||||||
FT density_3d(const Bare_point& p,
|
FT density_3d(const Bare_point& p,
|
||||||
|
|
@ -506,8 +503,8 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns around edge \c edge and add values computed from tets made by
|
* Turn around the edge \c edge and add the values computed from tets made by
|
||||||
* v->point() and circumcenters of the cells incident to \c edge
|
* v->point() and the circumcenters of cells incident to \c edge.
|
||||||
*
|
*
|
||||||
* Note that this function abundantly uses dual() calls and using a cell base
|
* Note that this function abundantly uses dual() calls and using a cell base
|
||||||
* which stores the circumcenter thus improves its efficiency.
|
* which stores the circumcenter thus improves its efficiency.
|
||||||
|
|
@ -526,7 +523,7 @@ private:
|
||||||
typename Gt::Compute_volume_3 volume = tr.geom_traits().compute_volume_3_object();
|
typename Gt::Compute_volume_3 volume = tr.geom_traits().compute_volume_3_object();
|
||||||
typename Gt::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object();
|
typename Gt::Construct_centroid_3 centroid = tr.geom_traits().construct_centroid_3_object();
|
||||||
typename Gt::Construct_vector_3 vector = tr.geom_traits().construct_vector_3_object();
|
typename Gt::Construct_vector_3 vector = tr.geom_traits().construct_vector_3_object();
|
||||||
typename Gt::Construct_point_3 wp2p = tr.geom_traits().construct_point_3_object();
|
typename Gt::Construct_point_3 cp = tr.geom_traits().construct_point_3_object();
|
||||||
|
|
||||||
// <PERIODIC>
|
// <PERIODIC>
|
||||||
typename Gt::Construct_tetrahedron_3 tetrahedron =
|
typename Gt::Construct_tetrahedron_3 tetrahedron =
|
||||||
|
|
@ -540,22 +537,22 @@ private:
|
||||||
Cell_circulator done = current_cell;
|
Cell_circulator done = current_cell;
|
||||||
|
|
||||||
// a & b are fixed points
|
// a & b are fixed points
|
||||||
const Bare_point& a = wp2p(v->point());
|
const Bare_point& a = cp(v->point());
|
||||||
|
|
||||||
// <PERIODIC>
|
// <PERIODIC>
|
||||||
const Bare_point b = tr.dual(current_cell);
|
const Bare_point b = tr.dual(current_cell);
|
||||||
const Bare_point a_b = wp2p(tr.point(current_cell, current_cell->index(v)));
|
const Bare_point a_b = cp(tr.point(current_cell, current_cell->index(v)));
|
||||||
Vector_3 ba = Vector_3(a_b, b);
|
Vector_3 ba = Vector_3(a_b, b);
|
||||||
current_cell++;
|
++current_cell;
|
||||||
// </PERIODIC>
|
// </PERIODIC>
|
||||||
CGAL_assertion(current_cell != done);
|
CGAL_assertion(current_cell != done);
|
||||||
|
|
||||||
// c & d are moving points
|
// c & d are moving points
|
||||||
// <PERIODIC>
|
// <PERIODIC>
|
||||||
Bare_point c = tr.dual(current_cell);
|
Bare_point c = tr.dual(current_cell);
|
||||||
Bare_point a_c = wp2p(tr.point(current_cell, current_cell->index(v)));
|
Bare_point a_c = cp(tr.point(current_cell, current_cell->index(v)));
|
||||||
Vector_3 ca = Vector_3(a_c, c);
|
Vector_3 ca = Vector_3(a_c, c);
|
||||||
current_cell++;
|
++current_cell;
|
||||||
// </PERIODIC>
|
// </PERIODIC>
|
||||||
|
|
||||||
CGAL_assertion(current_cell != done);
|
CGAL_assertion(current_cell != done);
|
||||||
|
|
@ -564,9 +561,9 @@ private:
|
||||||
{
|
{
|
||||||
// <PERIODIC>
|
// <PERIODIC>
|
||||||
const Bare_point d = tr.dual(current_cell);
|
const Bare_point d = tr.dual(current_cell);
|
||||||
const Bare_point a_d = wp2p(tr.point(current_cell, current_cell->index(v)));
|
const Bare_point a_d = cp(tr.point(current_cell, current_cell->index(v)));
|
||||||
Vector_3 da = Vector_3(a_d, d);
|
Vector_3 da = Vector_3(a_d, d);
|
||||||
current_cell++;
|
++current_cell;
|
||||||
|
|
||||||
Tetrahedron_3 tet = tetrahedron(a, translate(a, ba), translate(a, ca), translate(a, da));
|
Tetrahedron_3 tet = tetrahedron(a, translate(a, ba), translate(a, ca), translate(a, da));
|
||||||
|
|
||||||
|
|
@ -575,10 +572,10 @@ private:
|
||||||
|
|
||||||
// Compute mass
|
// Compute mass
|
||||||
FT density = density_3d(tet_centroid, current_cell, sizing_field);
|
FT density = density_3d(tet_centroid, current_cell, sizing_field);
|
||||||
FT abs_volume = CGAL::abs(volume(a,b,c,d));
|
FT abs_volume = CGAL::abs(volume(tet));
|
||||||
FT mass = abs_volume * density;
|
FT mass = abs_volume * density;
|
||||||
|
|
||||||
move = move + mass * vector(a,tet_centroid);
|
move = move + mass * vector(a, tet_centroid);
|
||||||
sum_masses += mass;
|
sum_masses += mass;
|
||||||
|
|
||||||
c = d;
|
c = d;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#include <CGAL/license/Mesh_3.h>
|
#include <CGAL/license/Mesh_3.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/Mesh_3/config.h>
|
#include <CGAL/Mesh_3/config.h>
|
||||||
|
|
||||||
#include <CGAL/Mesh_3/Uniform_sizing_field.h>
|
#include <CGAL/Mesh_3/Uniform_sizing_field.h>
|
||||||
|
|
@ -36,32 +35,29 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
|
||||||
namespace Mesh_3 {
|
namespace Mesh_3 {
|
||||||
|
|
||||||
|
|
||||||
template <typename C3T3,
|
template <typename C3T3,
|
||||||
typename SizingField = Uniform_sizing_field<typename C3T3::Triangulation> >
|
typename SizingField = Uniform_sizing_field<typename C3T3::Triangulation> >
|
||||||
class Odt_move
|
class Odt_move
|
||||||
{
|
{
|
||||||
typedef typename C3T3::Triangulation Tr;
|
typedef typename C3T3::Triangulation Tr;
|
||||||
typedef typename Tr::Geom_traits Gt;
|
typedef typename Tr::Geom_traits Gt;
|
||||||
|
|
||||||
typedef typename Tr::Cell_handle Cell_handle;
|
typedef typename Tr::Vertex_handle Vertex_handle;
|
||||||
typedef typename Tr::Vertex_handle Vertex_handle;
|
typedef typename Tr::Facet Facet;
|
||||||
typedef typename Tr::Facet Facet;
|
typedef typename Tr::Cell_handle Cell_handle;
|
||||||
typedef typename Tr::Weighted_point Weighted_point;
|
|
||||||
typedef typename Tr::Bare_point Bare_point;
|
|
||||||
|
|
||||||
typedef typename std::vector<Cell_handle> Cell_vector;
|
typedef typename Tr::Bare_point Bare_point;
|
||||||
typedef typename std::vector<Vertex_handle> Vertex_vector;
|
|
||||||
typedef typename std::vector<Facet> Facet_vector;
|
|
||||||
|
|
||||||
typedef typename Gt::FT FT;
|
typedef typename std::vector<Facet> Facet_vector;
|
||||||
typedef typename Gt::Vector_3 Vector_3;
|
typedef typename std::vector<Cell_handle> Cell_vector;
|
||||||
|
|
||||||
|
typedef typename Gt::FT FT;
|
||||||
|
typedef typename Gt::Vector_3 Vector_3;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef SizingField Sizing_field;
|
typedef SizingField Sizing_field;
|
||||||
|
|
||||||
Vector_3 operator()(const Vertex_handle& v,
|
Vector_3 operator()(const Vertex_handle& v,
|
||||||
const Cell_vector& incident_cells,
|
const Cell_vector& incident_cells,
|
||||||
|
|
|
||||||
|
|
@ -1606,8 +1606,8 @@ compute_facet_properties(const Facet& facet,
|
||||||
// Trick to have canonical vector : thus, we compute always the same
|
// Trick to have canonical vector : thus, we compute always the same
|
||||||
// intersection
|
// intersection
|
||||||
Segment_3 segment = ( compare_xyz(p1, p2)== CGAL::SMALLER )
|
Segment_3 segment = ( compare_xyz(p1, p2)== CGAL::SMALLER )
|
||||||
? construct_segment(p1, p2)
|
? construct_segment(p1, p2)
|
||||||
: construct_segment(p2, p1);
|
: construct_segment(p2, p1);
|
||||||
|
|
||||||
// If facet is on surface, compute intersection point and return true
|
// If facet is on surface, compute intersection point and return true
|
||||||
#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
|
#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ no_topological_change(const Tr& tr,
|
||||||
if(c->is_facet_visited(j))
|
if(c->is_facet_visited(j))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Set facet and it's mirror's one visited
|
// Set facet and its mirrored version as visited
|
||||||
Cell_handle cj = c->neighbor(j);
|
Cell_handle cj = c->neighbor(j);
|
||||||
int mj = tr.mirror_index(c, j);
|
int mj = tr.mirror_index(c, j);
|
||||||
c->set_facet_visited(j);
|
c->set_facet_visited(j);
|
||||||
|
|
@ -349,8 +349,8 @@ inside_protecting_balls(const Tr& tr,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// This function well_oriented is called by no_topological_change after a
|
/// This function well_oriented is called by no_topological_change after the
|
||||||
/// v->set_point(p)
|
/// position of the vertex has been (tentatively) modified.
|
||||||
template<typename Tr>
|
template<typename Tr>
|
||||||
bool
|
bool
|
||||||
Triangulation_helpers<Tr>::
|
Triangulation_helpers<Tr>::
|
||||||
|
|
|
||||||
|
|
@ -57,48 +57,51 @@ class Periodic_3_regular_triangulation_3_mesher_3
|
||||||
: public Periodic_3_regular_triangulation_3<Gt, Tds>
|
: public Periodic_3_regular_triangulation_3<Gt, Tds>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Sequential_tag Concurrency_tag;
|
typedef Sequential_tag Concurrency_tag;
|
||||||
typedef void Lock_data_structure;
|
typedef void Lock_data_structure;
|
||||||
|
|
||||||
void *get_lock_data_structure() const { return 0; }
|
void *get_lock_data_structure() const { return 0; }
|
||||||
void set_lock_data_structure(void *) const { }
|
void set_lock_data_structure(void *) const { }
|
||||||
|
|
||||||
typedef Periodic_3_regular_triangulation_3<Gt, Tds> Base;
|
typedef Periodic_3_regular_triangulation_3<Gt, Tds> Base;
|
||||||
|
|
||||||
typedef Gt Geom_traits;
|
typedef Gt Geom_traits;
|
||||||
typedef Tds Triangulation_data_structure;
|
typedef Tds Triangulation_data_structure;
|
||||||
|
|
||||||
typedef typename Base::Cell_iterator Finite_cells_iterator;
|
typedef typename Base::Cell_iterator Finite_cells_iterator;
|
||||||
typedef typename Base::Facet_iterator Finite_facets_iterator;
|
typedef typename Base::Facet_iterator Finite_facets_iterator;
|
||||||
typedef typename Base::Edge_iterator Finite_edges_iterator;
|
typedef typename Base::Edge_iterator Finite_edges_iterator;
|
||||||
typedef typename Base::Vertex_iterator Finite_vertices_iterator;
|
typedef typename Base::Vertex_iterator Finite_vertices_iterator;
|
||||||
|
|
||||||
typedef typename Base::Vertex_handle Vertex_handle;
|
typedef typename Base::Vertex_handle Vertex_handle;
|
||||||
typedef typename Base::Cell_handle Cell_handle;
|
typedef typename Base::Edge Edge;
|
||||||
typedef typename Base::Facet Facet;
|
typedef typename Base::Facet Facet;
|
||||||
typedef typename Base::Edge Edge;
|
typedef typename Base::Cell_handle Cell_handle;
|
||||||
|
|
||||||
typedef typename Base::FT FT;
|
typedef typename Base::FT FT;
|
||||||
|
|
||||||
typedef typename Base::Bare_point Bare_point;
|
typedef typename Base::Bare_point Bare_point;
|
||||||
typedef typename Base::Weighted_point Weighted_point;
|
typedef typename Base::Weighted_point Weighted_point;
|
||||||
typedef typename Base::Periodic_bare_point Periodic_bare_point;
|
typedef typename Base::Periodic_bare_point Periodic_bare_point;
|
||||||
typedef typename Base::Periodic_weighted_point Periodic_weighted_point;
|
typedef typename Base::Periodic_weighted_point Periodic_weighted_point;
|
||||||
|
|
||||||
typedef typename Base::Locate_type Locate_type;
|
typedef typename Base::Locate_type Locate_type;
|
||||||
|
|
||||||
typedef typename Base::Segment Segment;
|
typedef typename Base::Segment Segment;
|
||||||
typedef typename Base::Periodic_segment Periodic_segment;
|
typedef typename Base::Periodic_segment Periodic_segment;
|
||||||
|
|
||||||
typedef typename Base::Tetrahedron Tetrahedron;
|
typedef typename Base::Triangle Triangle;
|
||||||
typedef typename Base::Periodic_tetrahedron Periodic_tetrahedron;
|
typedef typename Base::Periodic_triangle Periodic_triangle;
|
||||||
|
typedef typename Base::Tetrahedron Tetrahedron;
|
||||||
|
typedef typename Base::Periodic_tetrahedron Periodic_tetrahedron;
|
||||||
|
|
||||||
typedef typename Base::Offset Offset;
|
typedef typename Base::Offset Offset;
|
||||||
typedef typename Base::Iso_cuboid Iso_cuboid;
|
typedef typename Base::Iso_cuboid Iso_cuboid;
|
||||||
typedef typename Base::Conflict_tester Conflict_tester;
|
typedef typename Base::Conflict_tester Conflict_tester;
|
||||||
typedef typename Base::Covering_sheets Covering_sheets;
|
typedef typename Base::Covering_sheets Covering_sheets;
|
||||||
|
|
||||||
typedef typename Gt::Ray_3 Ray;
|
typedef typename Gt::Vector_3 Vector_3;
|
||||||
|
typedef typename Gt::Ray_3 Ray;
|
||||||
|
|
||||||
using Base::construct_point;
|
using Base::construct_point;
|
||||||
using Base::construct_weighted_point;
|
using Base::construct_weighted_point;
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ void init_domain(C3T3& c3t3, MD& oracle)
|
||||||
typename Tr::Geom_traits::Construct_point_3 wp2p =
|
typename Tr::Geom_traits::Construct_point_3 wp2p =
|
||||||
tr.geom_traits().construct_point_3_object();
|
tr.geom_traits().construct_point_3_object();
|
||||||
|
|
||||||
// At this point, the triangulation contains the dummy point.
|
// At this point, the triangulation contains the dummy points.
|
||||||
// Mark them all as corners so they are kept throughout the refinement.
|
// Mark them all as corners so they are kept throughout the refinement.
|
||||||
// [ Does that really matter ? @fixme ]
|
// [ Does that really matter ? @fixme ]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -154,8 +154,6 @@ void refine_periodic_3_mesh_3_impl(C3T3& c3t3,
|
||||||
// Perturbation
|
// Perturbation
|
||||||
if ( perturb )
|
if ( perturb )
|
||||||
{
|
{
|
||||||
std::cout << "perturb" << std::endl;
|
|
||||||
|
|
||||||
double perturb_time_limit = refine_time;
|
double perturb_time_limit = refine_time;
|
||||||
|
|
||||||
if ( perturb.is_time_limit_set() )
|
if ( perturb.is_time_limit_set() )
|
||||||
|
|
@ -169,7 +167,6 @@ void refine_periodic_3_mesh_3_impl(C3T3& c3t3,
|
||||||
dump_c3t3(c3t3, mesh_options.dump_after_perturb_prefix);
|
dump_c3t3(c3t3, mesh_options.dump_after_perturb_prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1 // regular stuff is not yet supported by periodic triangulations
|
|
||||||
// Exudation
|
// Exudation
|
||||||
if ( exude )
|
if ( exude )
|
||||||
{
|
{
|
||||||
|
|
@ -184,7 +181,6 @@ void refine_periodic_3_mesh_3_impl(C3T3& c3t3,
|
||||||
|
|
||||||
dump_c3t3(c3t3, mesh_options.dump_after_perturb_prefix);
|
dump_c3t3(c3t3, mesh_options.dump_after_perturb_prefix);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end namespace CGAL
|
} // end namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -62,16 +62,16 @@ template < class Gt,
|
||||||
class Periodic_3_regular_triangulation_3
|
class Periodic_3_regular_triangulation_3
|
||||||
: public Periodic_3_triangulation_3<Gt, Tds>
|
: public Periodic_3_triangulation_3<Gt, Tds>
|
||||||
{
|
{
|
||||||
typedef Periodic_3_regular_triangulation_3<Gt, Tds> Self;
|
typedef Periodic_3_regular_triangulation_3<Gt, Tds> Self;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef Periodic_3_triangulation_3<Gt, Tds> Tr_Base;
|
typedef Periodic_3_triangulation_3<Gt, Tds> Tr_Base;
|
||||||
|
|
||||||
typedef Gt Geometric_traits;
|
typedef Gt Geometric_traits;
|
||||||
typedef Geometric_traits Geom_traits;
|
typedef Geometric_traits Geom_traits;
|
||||||
typedef Tds Triangulation_data_structure;
|
typedef Tds Triangulation_data_structure;
|
||||||
|
|
||||||
typedef typename Gt::FT FT;
|
typedef typename Gt::FT FT;
|
||||||
|
|
||||||
typedef typename Tr_Base::Periodic_segment_3 Periodic_segment_3;
|
typedef typename Tr_Base::Periodic_segment_3 Periodic_segment_3;
|
||||||
typedef typename Tr_Base::Periodic_triangle_3 Periodic_triangle_3;
|
typedef typename Tr_Base::Periodic_triangle_3 Periodic_triangle_3;
|
||||||
|
|
@ -158,6 +158,7 @@ public:
|
||||||
using Tr_Base::facets_end;
|
using Tr_Base::facets_end;
|
||||||
using Tr_Base::cells_begin;
|
using Tr_Base::cells_begin;
|
||||||
using Tr_Base::cells_end;
|
using Tr_Base::cells_end;
|
||||||
|
using Tr_Base::construct_point;
|
||||||
using Tr_Base::construct_periodic_point;
|
using Tr_Base::construct_periodic_point;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -801,6 +802,13 @@ public:
|
||||||
|
|
||||||
Vertex_handle nearest_power_vertex(const Bare_point& p, Cell_handle start) const
|
Vertex_handle nearest_power_vertex(const Bare_point& p, Cell_handle start) const
|
||||||
{
|
{
|
||||||
|
CGAL_triangulation_precondition(p.x() < domain().xmax());
|
||||||
|
CGAL_triangulation_precondition(p.y() < domain().ymax());
|
||||||
|
CGAL_triangulation_precondition(p.z() < domain().zmax());
|
||||||
|
CGAL_triangulation_precondition(p.x() >= domain().xmin());
|
||||||
|
CGAL_triangulation_precondition(p.y() >= domain().ymin());
|
||||||
|
CGAL_triangulation_precondition(p.z() >= domain().zmin());
|
||||||
|
|
||||||
if(number_of_vertices() == 0)
|
if(number_of_vertices() == 0)
|
||||||
return Vertex_handle();
|
return Vertex_handle();
|
||||||
|
|
||||||
|
|
@ -809,9 +817,11 @@ public:
|
||||||
|
|
||||||
typename Gt::Construct_weighted_point_3 p2wp =
|
typename Gt::Construct_weighted_point_3 p2wp =
|
||||||
geom_traits().construct_weighted_point_3_object();
|
geom_traits().construct_weighted_point_3_object();
|
||||||
|
|
||||||
Cell_handle c = locate(p2wp(p), lt, li, lj, start);
|
Cell_handle c = locate(p2wp(p), lt, li, lj, start);
|
||||||
if(lt == Tr_Base::VERTEX)
|
if(lt == Tr_Base::VERTEX)
|
||||||
return c->vertex(li);
|
return c->vertex(li);
|
||||||
|
|
||||||
const Conflict_tester tester(p2wp(p), this);
|
const Conflict_tester tester(p2wp(p), this);
|
||||||
Offset o = combine_offsets(Offset(), get_location_offset(tester, c));
|
Offset o = combine_offsets(Offset(), get_location_offset(tester, c));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -415,9 +415,9 @@ public:
|
||||||
// Offset converters
|
// Offset converters
|
||||||
int off_to_int(const Offset& off) const
|
int off_to_int(const Offset& off) const
|
||||||
{
|
{
|
||||||
CGAL_triangulation_assertion( off.x()==0 || off.x() ==1 );
|
CGAL_triangulation_assertion( off.x() == 0 || off.x() == 1 );
|
||||||
CGAL_triangulation_assertion( off.y()==0 || off.y() ==1 );
|
CGAL_triangulation_assertion( off.y() == 0 || off.y() == 1 );
|
||||||
CGAL_triangulation_assertion( off.z()==0 || off.z() ==1 );
|
CGAL_triangulation_assertion( off.z() == 0 || off.z() == 1 );
|
||||||
int i = ((off.x()&1)<<2) + ((off.y()&1)<<1) + ((off.z()&1));
|
int i = ((off.x()&1)<<2) + ((off.y()&1)<<1) + ((off.z()&1));
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
@ -754,10 +754,9 @@ public:
|
||||||
return cp(pp.first, pp.second);
|
return cp(pp.first, pp.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The following functions return the "real" position in space (unrestrained
|
// The following functions return the "real" position in space (unconstrained
|
||||||
// to the original periodic domain) of the vertices v and c->vertex(idx),
|
// to the original periodic domain) of the vertices v and c->vertex(idx),
|
||||||
// respectively
|
// respectively
|
||||||
|
|
||||||
template <class ConstructPoint>
|
template <class ConstructPoint>
|
||||||
Point point(Vertex_handle v, ConstructPoint cp) const {
|
Point point(Vertex_handle v, ConstructPoint cp) const {
|
||||||
return point(periodic_point(v), cp);
|
return point(periodic_point(v), cp);
|
||||||
|
|
@ -2165,6 +2164,13 @@ exact_periodic_locate
|
||||||
(const Point& p, const Offset& o_p, Offset& lo,
|
(const Point& p, const Offset& o_p, Offset& lo,
|
||||||
Locate_type& lt, int& li, int& lj, Cell_handle start) const
|
Locate_type& lt, int& li, int& lj, Cell_handle start) const
|
||||||
{
|
{
|
||||||
|
CGAL_triangulation_precondition(p.x() < domain().xmax());
|
||||||
|
CGAL_triangulation_precondition(p.y() < domain().ymax());
|
||||||
|
CGAL_triangulation_precondition(p.z() < domain().zmax());
|
||||||
|
CGAL_triangulation_precondition(p.x() >= domain().xmin());
|
||||||
|
CGAL_triangulation_precondition(p.y() >= domain().ymin());
|
||||||
|
CGAL_triangulation_precondition(p.z() >= domain().zmin());
|
||||||
|
|
||||||
int cumm_off = 0;
|
int cumm_off = 0;
|
||||||
Offset off_query = o_p;
|
Offset off_query = o_p;
|
||||||
if(number_of_vertices() == 0) {
|
if(number_of_vertices() == 0) {
|
||||||
|
|
@ -2342,6 +2348,13 @@ inexact_periodic_locate(const Point& p, const Offset& o_p,
|
||||||
Cell_handle start,
|
Cell_handle start,
|
||||||
int n_of_turns) const
|
int n_of_turns) const
|
||||||
{
|
{
|
||||||
|
CGAL_triangulation_precondition(p.x() < domain().xmax());
|
||||||
|
CGAL_triangulation_precondition(p.y() < domain().ymax());
|
||||||
|
CGAL_triangulation_precondition(p.z() < domain().zmax());
|
||||||
|
CGAL_triangulation_precondition(p.x() >= domain().xmin());
|
||||||
|
CGAL_triangulation_precondition(p.y() >= domain().ymin());
|
||||||
|
CGAL_triangulation_precondition(p.z() >= domain().zmin());
|
||||||
|
|
||||||
int cumm_off = 0;
|
int cumm_off = 0;
|
||||||
Offset off_query = o_p;
|
Offset off_query = o_p;
|
||||||
if(number_of_vertices() == 0) {
|
if(number_of_vertices() == 0) {
|
||||||
|
|
@ -4036,7 +4049,9 @@ inline void Periodic_3_triangulation_3<GT, TDS>::get_vertex(
|
||||||
off = combine_offsets(Offset(),int_to_off(ch->offset(i)));
|
off = combine_offsets(Offset(),int_to_off(ch->offset(i)));
|
||||||
vh = ch->vertex(i);
|
vh = ch->vertex(i);
|
||||||
|
|
||||||
if(is_1_cover()) return;
|
if(is_1_cover())
|
||||||
|
return;
|
||||||
|
|
||||||
Vertex_handle vh_i = vh;
|
Vertex_handle vh_i = vh;
|
||||||
get_vertex(vh_i, vh, off);
|
get_vertex(vh_i, vh, off);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue