mirror of https://github.com/CGAL/cgal
Update branch from master after trailing whitespaces and tabs removal
This commit is contained in:
commit
38789af55d
|
|
@ -39,7 +39,7 @@ public:
|
|||
|
||||
typedef typename Algebraic_kernel_d_1::Algebraic_real_1 Algebraic_real_1;
|
||||
|
||||
Bitstream_coefficient_kernel_at_alpha_rep() {}
|
||||
Bitstream_coefficient_kernel_at_alpha_rep() : _m_kernel(nullptr) {}
|
||||
|
||||
Bitstream_coefficient_kernel_at_alpha_rep(Algebraic_kernel_d_1* kernel,
|
||||
Algebraic_real_1 alpha)
|
||||
|
|
@ -136,19 +136,19 @@ public:
|
|||
: public CGAL::cpp98::unary_function<Coefficient,Bigfloat_interval> {
|
||||
|
||||
Convert_to_bfi(Algebraic_kernel_d_1* kernel,
|
||||
Algebraic_real_1 alpha)
|
||||
: _m_kernel(kernel), _m_alpha(alpha) {}
|
||||
Algebraic_real_1 alpha)
|
||||
: _m_kernel(kernel), _m_alpha(alpha) {}
|
||||
|
||||
Bigfloat_interval operator() (Coefficient f) const {
|
||||
typename CGAL::Polynomial_traits_d<Coefficient>
|
||||
::template Rebind<Bigfloat_interval,1>::Other::Type f_bfi;
|
||||
|
||||
typename Algebraic_kernel_d_1::Approximate_relative_1 approx_alpha
|
||||
=_m_kernel->approximate_relative_1_object();
|
||||
typename Algebraic_kernel_d_1::Approximate_relative_1 approx_alpha
|
||||
=_m_kernel->approximate_relative_1_object();
|
||||
|
||||
typedef typename Algebraic_kernel_d_1::Bound Bound;
|
||||
typedef typename Algebraic_kernel_d_1::Bound Bound;
|
||||
|
||||
Bigfloat_interval alpha_bfi, f_alpha_bfi;
|
||||
Bigfloat_interval alpha_bfi, f_alpha_bfi;
|
||||
|
||||
long p = CGAL::get_precision(Bigfloat_interval());
|
||||
|
||||
|
|
@ -156,19 +156,19 @@ public:
|
|||
|
||||
long wbit = 0;
|
||||
|
||||
while(true) {
|
||||
while(true) {
|
||||
CGAL::set_precision(Bigfloat_interval(),prec);
|
||||
|
||||
f_bfi = this->_convert_polynomial_to_bfi(f);
|
||||
|
||||
std::pair<Bound,Bound> alpha_bounds
|
||||
= approx_alpha(_m_alpha,prec);
|
||||
std::pair<Bound,Bound> alpha_bounds
|
||||
= approx_alpha(_m_alpha,prec);
|
||||
|
||||
alpha_bfi = CGAL::hull
|
||||
(CGAL::convert_to_bfi(alpha_bounds.first),
|
||||
CGAL::convert_to_bfi(alpha_bounds.second));
|
||||
alpha_bfi = CGAL::hull
|
||||
(CGAL::convert_to_bfi(alpha_bounds.first),
|
||||
CGAL::convert_to_bfi(alpha_bounds.second));
|
||||
|
||||
f_alpha_bfi = f_bfi.evaluate(alpha_bfi);
|
||||
f_alpha_bfi = f_bfi.evaluate(alpha_bfi);
|
||||
|
||||
if(!CGAL::singleton(f_alpha_bfi)) {
|
||||
long ceil = CGAL::internal::ceil_log2_abs(f_alpha_bfi);
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ int main()
|
|||
int n;
|
||||
is >> n;
|
||||
std::cout << "Reading " << n << " points " << std::endl;
|
||||
Bare_point bp;
|
||||
for( ; n>0 ; n--) {
|
||||
Bare_point bp;
|
||||
is >> bp;
|
||||
Weighted_point p(bp, 0.0001 * random.get_double(0., 0.015625)); // arbitrary weights
|
||||
pts.push_back(p);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ private:
|
|||
void Cone_spanners_ipelet::protected_run(int fn)
|
||||
{
|
||||
std::vector<Point_2> lst;
|
||||
int number_of_cones;
|
||||
int number_of_cones = 0;
|
||||
switch (fn){
|
||||
case 0:
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -312,15 +312,12 @@ class ConicCPA2
|
|||
PT center () const
|
||||
{
|
||||
CGAL_kernel_precondition (type != PARABOLA);
|
||||
// PT p;
|
||||
// replaced previous line by following hack (no idea
|
||||
// why original version doesn't work)
|
||||
typename DA::Point p;
|
||||
FT two = FT(2);
|
||||
FT div = -det();
|
||||
dao.set( p, (two*s()*u() - t()*v()) / div,
|
||||
(two*r()*v() - t()*u()) / div);
|
||||
return p;
|
||||
|
||||
const FT two = FT(2);
|
||||
const FT div = -det();
|
||||
|
||||
return PT((two*s()*u() - t()*v()) / div,
|
||||
(two*r()*v() - t()*u()) / div);
|
||||
}
|
||||
|
||||
Conic_type conic_type () const
|
||||
|
|
|
|||
|
|
@ -229,8 +229,8 @@ template < class FT >
|
|||
CGAL_KERNEL_INLINE
|
||||
void
|
||||
bisector_of_pointsC2(const FT &px, const FT &py,
|
||||
const FT &qx, const FT &qy,
|
||||
FT &a, FT &b, FT& c )
|
||||
const FT &qx, const FT &qy,
|
||||
FT &a, FT &b, FT& c )
|
||||
{
|
||||
a = 2 * (px - qx);
|
||||
b = 2 * (py - qy);
|
||||
|
|
@ -242,8 +242,8 @@ template < class FT >
|
|||
CGAL_KERNEL_INLINE
|
||||
void
|
||||
bisector_of_linesC2(const FT &pa, const FT &pb, const FT &pc,
|
||||
const FT &qa, const FT &qb, const FT &qc,
|
||||
FT &a, FT &b, FT &c)
|
||||
const FT &qa, const FT &qb, const FT &qc,
|
||||
FT &a, FT &b, FT &c)
|
||||
{
|
||||
// We normalize the equations of the 2 lines, and we then add them.
|
||||
FT n1 = CGAL_NTS sqrt(CGAL_NTS square(pa) + CGAL_NTS square(pb));
|
||||
|
|
@ -276,15 +276,12 @@ line_get_pointC2(const FT &a, const FT &b, const FT &c, const FT &i,
|
|||
{
|
||||
if (CGAL_NTS is_zero(b))
|
||||
{
|
||||
// Laurent Rineau, 2018/12/07: I add this CGAL_assume to calm
|
||||
// down a warning from MSVC 2017:
|
||||
// Silence a warning for MSVC 2017
|
||||
// > include\cgal\constructions\kernel_ftc2.h(287) :
|
||||
// > warning C4723: potential divide by 0
|
||||
// The test `!boost::is_integral<FT>::value` is there to avoid
|
||||
// that `a != 0` is tested on anything but integral types, for
|
||||
// performance reasons.
|
||||
CGAL_assume(!boost::is_integral<FT>::value || a != FT(0));
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(suppress:4723)
|
||||
#endif
|
||||
x = -c/a;
|
||||
y = 1 - i * a;
|
||||
}
|
||||
|
|
@ -299,8 +296,8 @@ template < class FT >
|
|||
inline
|
||||
void
|
||||
perpendicular_through_pointC2(const FT &la, const FT &lb,
|
||||
const FT &px, const FT &py,
|
||||
FT &a, FT &b, FT &c)
|
||||
const FT &px, const FT &py,
|
||||
FT &a, FT &b, FT &c)
|
||||
{
|
||||
a = -lb;
|
||||
b = la;
|
||||
|
|
@ -311,8 +308,8 @@ template < class FT >
|
|||
CGAL_KERNEL_MEDIUM_INLINE
|
||||
void
|
||||
line_project_pointC2(const FT &la, const FT &lb, const FT &lc,
|
||||
const FT &px, const FT &py,
|
||||
FT &x, FT &y)
|
||||
const FT &px, const FT &py,
|
||||
FT &x, FT &y)
|
||||
{
|
||||
if (certainly(is_zero(la))) // horizontal line
|
||||
{
|
||||
|
|
|
|||
|
|
@ -79,9 +79,15 @@ int main()
|
|||
Convex_hull_d::Point_const_iterator pit;
|
||||
Convex_hull_d::Vertex_iterator vit;
|
||||
Convex_hull_d::Simplex_iterator sit;
|
||||
for (pit = T1.points_begin(); pit != T1.points_end(); pit++) *pit;
|
||||
for (vit = T1.vertices_begin(); vit != T1.vertices_end(); vit++) *vit;
|
||||
for (sit = T1.simplices_begin(); sit != T1.simplices_end(); sit++) *sit;
|
||||
for (pit = T1.points_begin(); pit != T1.points_end(); pit++) {
|
||||
const Point& p = *pit;
|
||||
CGAL_USE(p);
|
||||
}
|
||||
for (vit = T1.vertices_begin(); vit != T1.vertices_end(); vit++)
|
||||
*vit;
|
||||
for (sit = T1.simplices_begin(); sit != T1.simplices_end(); sit++)
|
||||
*sit;
|
||||
|
||||
T1.is_valid();
|
||||
T1.clear(2);
|
||||
CGAL_TEST(T1.number_of_vertices()==0);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ fct(const P& )
|
|||
{
|
||||
std::map<Descriptor,int> M;
|
||||
Descriptor d;
|
||||
M.find(d);
|
||||
typename std::map<Descriptor,int>::const_iterator it = M.find(d);
|
||||
CGAL_USE(it);
|
||||
|
||||
boost::unordered_map<Descriptor, int> U;
|
||||
U[d] = 12;
|
||||
|
|
@ -56,7 +57,9 @@ void fct2()
|
|||
{ // For dart handle
|
||||
std::map<dh, int> M;
|
||||
dh e;
|
||||
M.find(e);
|
||||
typename std::map<dh, int>::const_iterator it = M.find(e);
|
||||
CGAL_USE(it);
|
||||
|
||||
boost::unordered_map<dh, int> U;
|
||||
U[e] = 12;
|
||||
}
|
||||
|
|
@ -64,7 +67,9 @@ void fct2()
|
|||
{ // For vertex attribute handle
|
||||
std::map<vh, int> M;
|
||||
vh e;
|
||||
M.find(e);
|
||||
typename std::map<vh, int>::const_iterator it = M.find(e);
|
||||
CGAL_USE(it);
|
||||
|
||||
boost::unordered_map<vh, int> U;
|
||||
U[e] = 12;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1373,7 +1373,6 @@ private:
|
|||
|
||||
std::size_t vertex_id(const std::size_t& i) const
|
||||
{
|
||||
CGAL_precondition(i >= 0);
|
||||
CGAL_precondition((infinite_ && i < 3) || i < 4);
|
||||
return vertices_[i];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,9 +174,9 @@ Vertex_handle new_vertex(const Point& p)
|
|||
|
||||
void link_as_target_and_append(Vertex_handle v, Halfedge_handle e)
|
||||
{ CGAL_NEF_TRACEN(" link as target and append "
|
||||
<< e->source()->point() << "->"
|
||||
<< v->point());
|
||||
G.link_as_target_and_append(v,e); }
|
||||
<< e->source()->point() << "->"
|
||||
<< v->point());
|
||||
G.link_as_target_and_append(v,e); }
|
||||
|
||||
Halfedge_handle new_halfedge_pair_at_source(Vertex_handle v)
|
||||
{ CGAL_NEF_TRACEN(" new halfedge pair at source " << v->point());
|
||||
|
|
@ -235,13 +235,13 @@ void starting_segment(Vertex_handle v, IT it) const
|
|||
if(se->source()->point() != v->point()) {
|
||||
se = se->twin();
|
||||
if(se->source()->point() != v->point()) {
|
||||
G.supp_object(v,si._from) = si._o;
|
||||
return;
|
||||
G.supp_object(v,si._from) = si._o;
|
||||
return;
|
||||
}
|
||||
}
|
||||
G.supp_object(v,si._from) = make_object(se->source());
|
||||
CGAL_NEF_TRACEN("starting_segment " << si._from << ":"<<
|
||||
v->point() << " " << se->source()->point());
|
||||
v->point() << " " << se->source()->point());
|
||||
} else if(CGAL::assign(sl, si._o)) {
|
||||
G.supp_object(v,si._from) = si._o;
|
||||
} else
|
||||
|
|
@ -258,15 +258,15 @@ void ending_segment(Vertex_handle v, IT it) const
|
|||
if(se->source()->point() != v->point()) {
|
||||
se = se->twin();
|
||||
if(se->source()->point() != v->point()) {
|
||||
G.supp_object(v,si._from) = si._o;
|
||||
return;
|
||||
G.supp_object(v,si._from) = si._o;
|
||||
return;
|
||||
}
|
||||
}
|
||||
G.supp_object(v,si._from) = make_object(se->source());
|
||||
CGAL_NEF_TRACEN("ending_segment " << si._from << ":"<<
|
||||
v->point() << ":" <<
|
||||
se->source()->point() << "->" <<
|
||||
se->twin()->source()->point());
|
||||
v->point() << ":" <<
|
||||
se->source()->point() << "->" <<
|
||||
se->twin()->source()->point());
|
||||
} else if(CGAL::assign(sl, si._o)) {
|
||||
G.supp_object(v,si._from) = si._o;
|
||||
} else
|
||||
|
|
@ -292,7 +292,7 @@ void assert_equal_marks(Vertex_handle v1, Vertex_handle v2) const
|
|||
CGAL_NEF_TRACEV(G.mark(v1,0));CGAL_NEF_TRACEV(G.mark(v1,1));
|
||||
CGAL_NEF_TRACEV(G.mark(v2,0));CGAL_NEF_TRACEV(G.mark(v2,1));
|
||||
CGAL_assertion(G.mark(v1,0)==G.mark(v2,0)&&
|
||||
G.mark(v1,1)==G.mark(v2,1)); }
|
||||
G.mark(v1,1)==G.mark(v2,1)); }
|
||||
void discard_info(Vertex_handle v) const
|
||||
{ G.discard_info(v); }
|
||||
|
||||
|
|
@ -301,7 +301,7 @@ void assert_equal_marks(Halfedge_handle e1, Halfedge_handle e2) const
|
|||
CGAL_USE(e1);
|
||||
CGAL_USE(e2);
|
||||
CGAL_assertion(G.mark(e1,0)==G.mark(e2,0) &&
|
||||
G.mark(e1,1)==G.mark(e2,1));
|
||||
G.mark(e1,1)==G.mark(e2,1));
|
||||
}
|
||||
|
||||
void discard_info(Halfedge_handle e) const
|
||||
|
|
@ -540,8 +540,13 @@ public:
|
|||
Mark m[2];
|
||||
Object_handle o_supp[2];
|
||||
SHalfedge_handle e_below;
|
||||
|
||||
vertex_info()
|
||||
{ o_supp[0]=o_supp[1]=Object_handle(); }
|
||||
{
|
||||
m[0]=m[1]=Mark();
|
||||
o_supp[0]=o_supp[1]=Object_handle();
|
||||
}
|
||||
|
||||
LEDA_MEMORY(vertex_info)
|
||||
}; // vertex_info
|
||||
|
||||
|
|
@ -708,8 +713,8 @@ public:
|
|||
Sphere_segment segment(SM_const_decorator ,
|
||||
SHalfedge_const_handle e) const
|
||||
{ return K.construct_segment(e->source()->point(),
|
||||
e->target()->point(),
|
||||
e->circle()); }
|
||||
e->target()->point(),
|
||||
e->circle()); }
|
||||
|
||||
Sphere_segment trivial_segment(SM_const_decorator ,
|
||||
SVertex_const_handle v) const
|
||||
|
|
@ -757,12 +762,12 @@ public:
|
|||
and the two halfspheres incident to it.}*/
|
||||
|
||||
void subdivide(const Map* M0, const Map* M1,
|
||||
bool with_trivial_segments = false);
|
||||
bool with_trivial_segments = false);
|
||||
|
||||
template <typename Association>
|
||||
void subdivide(const Map* M0, const Map* M1,
|
||||
Association& A,
|
||||
bool with_trivial_segments = false);
|
||||
Association& A,
|
||||
bool with_trivial_segments = false);
|
||||
/*{\Mop constructs the overlay of the sphere maps |M0| and |M1| in
|
||||
|M|, where all objects (vertices, halfedges, faces) of |M| are
|
||||
\emph{enriched} by the marks of the supporting objects of the two
|
||||
|
|
@ -810,9 +815,9 @@ public:
|
|||
|
||||
template <typename Below_accessor, typename Halfsphere_geometry>
|
||||
void create_face_objects(SHalfedge_iterator e_start, SHalfedge_iterator e_end,
|
||||
SVertex_iterator v_start, SVertex_iterator v_end,
|
||||
const Below_accessor& D,
|
||||
const Halfsphere_geometry& SG);
|
||||
SVertex_iterator v_start, SVertex_iterator v_end,
|
||||
const Below_accessor& D,
|
||||
const Halfsphere_geometry& SG);
|
||||
|
||||
template <typename Below_accessor>
|
||||
void complete_face_support(SVertex_iterator v_start, SVertex_iterator v_end,
|
||||
|
|
@ -842,9 +847,9 @@ create_from_segments(Forward_iterator start, Forward_iterator end)
|
|||
CGAL_forall_iterators(it,L) From_input[it]=true;
|
||||
Seg_list L_pos,L_neg;
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From_input,
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From_input,
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
|
||||
typedef SMO_from_segs<Self,Seg_iterator> SM_output;
|
||||
typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
|
||||
|
|
@ -915,9 +920,9 @@ create_from_circles(Forward_iterator start, Forward_iterator end)
|
|||
CGAL_forall_iterators(it,L) From_input[it]=true;
|
||||
Seg_list L_pos,L_neg;
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From_input,
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From_input,
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
|
||||
typedef SMO_from_segs<Self,Seg_iterator> SM_output;
|
||||
typedef typename Sphere_kernel::Positive_halfsphere_geometry PH_geometry;
|
||||
|
|
@ -1077,15 +1082,15 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if((chsp&48)!=48)
|
||||
if(i.z() > 0) chsp|=16;
|
||||
else if(i.z() < 0) chsp|=32;
|
||||
} else if((chsp&51)!=51 && it->source().y()!=0) {
|
||||
} else if((chsp&51)!=51 && it->source().y()!=0) {
|
||||
Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(0,1,0));
|
||||
CGAL_NEF_TRACEN("intersection " << i);
|
||||
if(!it->has_on_after_intersection(i)) i=i.antipode();
|
||||
if((chsp&3)!=3)
|
||||
if(i.x() > 0) chsp|=1;
|
||||
else if(i.x() < 0) chsp|=2;
|
||||
if((chsp&48)!=48)
|
||||
if(i.z() > 0) chsp|=16;
|
||||
if((chsp&48)!=48)
|
||||
if(i.z() > 0) chsp|=16;
|
||||
else if(i.z() < 0) chsp|=32;
|
||||
} else if((chsp&15)!=15 && it->source().z()!=0) {
|
||||
Sphere_point i = intersection(it->sphere_circle(), Sphere_circle(0,0,1));
|
||||
|
|
@ -1094,7 +1099,7 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if((chsp&3)!=3)
|
||||
if(i.x() > 0) chsp|=1;
|
||||
else if(i.x() < 0) chsp|=2;
|
||||
if((chsp&12)!=12)
|
||||
if((chsp&12)!=12)
|
||||
if(i.y() > 0) chsp|=4;
|
||||
else if(i.y() < 0) chsp|=8;
|
||||
}
|
||||
|
|
@ -1154,22 +1159,22 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
CGAL_forall_iterators(it,L) {
|
||||
if(!compute_halfsphere[0][0])
|
||||
if(it->source().hx()>0 || it->target().hx()>0)
|
||||
compute_halfsphere[0][0] = true;
|
||||
compute_halfsphere[0][0] = true;
|
||||
if(!compute_halfsphere[0][1])
|
||||
if(it->source().hx()<0 || it->target().hx()<0)
|
||||
compute_halfsphere[0][1] = true;
|
||||
compute_halfsphere[0][1] = true;
|
||||
if(!compute_halfsphere[1][0])
|
||||
if(it->source().hy()>0 || it->target().hy()>0)
|
||||
compute_halfsphere[1][0] = true;
|
||||
compute_halfsphere[1][0] = true;
|
||||
if(!compute_halfsphere[1][1])
|
||||
if(it->source().hy()<0 || it->target().hy()<0)
|
||||
compute_halfsphere[1][1] = true;
|
||||
compute_halfsphere[1][1] = true;
|
||||
if(!compute_halfsphere[2][0])
|
||||
if(it->source().hz()>0 || it->target().hz()>0)
|
||||
compute_halfsphere[2][0] = true;
|
||||
compute_halfsphere[2][0] = true;
|
||||
if(!compute_halfsphere[2][1])
|
||||
if(it->source().hz()<0 || it->target().hz()<0)
|
||||
compute_halfsphere[2][1] = true;
|
||||
compute_halfsphere[2][1] = true;
|
||||
}
|
||||
|
||||
CGAL_NEF_TRACEN("compute_halfsphere (after vertices)");
|
||||
|
|
@ -1181,8 +1186,8 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
CGAL_forall_iterators(it,L) {
|
||||
if((it->source().hz()==0 && it->target().hz()==0)
|
||||
|| it->is_long()) {
|
||||
compute_halfsphere[2][0] = true;
|
||||
break;
|
||||
compute_halfsphere[2][0] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1195,8 +1200,8 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if(!compute_halfsphere[2][1]) {
|
||||
CGAL_forall_iterators(it,L) {
|
||||
if(it->is_long() || (it->source().hz()==0 && it->target().hz()==0)) {
|
||||
compute_halfsphere[2][1] = true;
|
||||
break;
|
||||
compute_halfsphere[2][1] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1207,8 +1212,8 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if(!compute_halfsphere[0][0]) {
|
||||
CGAL_forall_iterators(it,L) {
|
||||
if((it->source().hx()==0 && it->target().hx()==0) || it->is_long()) {
|
||||
compute_halfsphere[0][0] = true;
|
||||
break;
|
||||
compute_halfsphere[0][0] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1221,8 +1226,8 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if(!compute_halfsphere[0][1]) {
|
||||
CGAL_forall_iterators(it,L) {
|
||||
if((it->source().hx()==0 && it->target().hx()==0) || it->is_long()) {
|
||||
compute_halfsphere[0][1] = true;
|
||||
break;
|
||||
compute_halfsphere[0][1] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1234,8 +1239,8 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if(!compute_halfsphere[1][0]) {
|
||||
CGAL_forall_iterators(it,L) {
|
||||
if((it->source().hy()==0 && it->target().hy()==0) || it->is_long()) {
|
||||
compute_halfsphere[1][0] = true;
|
||||
break;
|
||||
compute_halfsphere[1][0] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1248,8 +1253,8 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const {
|
|||
if(!compute_halfsphere[1][1]) {
|
||||
CGAL_forall_iterators(it,L) {
|
||||
if((it->source().hy()==0 && it->target().hy()==0) || it->is_long()) {
|
||||
compute_halfsphere[1][1] = true;
|
||||
break;
|
||||
compute_halfsphere[1][1] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1275,7 +1280,7 @@ create(const Sphere_circle& c)
|
|||
template <typename Map>
|
||||
void SM_overlayer<Map>::
|
||||
subdivide(const Map* M0, const Map* M1,
|
||||
bool with_trivial_segments) {
|
||||
bool with_trivial_segments) {
|
||||
PI[0] = SM_const_decorator(M0);
|
||||
PI[1] = SM_const_decorator(M1);
|
||||
bool compute_halfsphere[3][2];
|
||||
|
|
@ -1296,20 +1301,20 @@ subdivide(const Map* M0, const Map* M1,
|
|||
CGAL_forall_sedges(e,PI[i]) {
|
||||
if ( e->source() == e->target() ) {
|
||||
if(with_trivial_segments) {
|
||||
CGAL_NEF_TRACEN("trivial segment " << e->source()->point());
|
||||
CGAL_NEF_TRACEN("trivial segment " << e->source()->point());
|
||||
v = e->source();
|
||||
L.push_back(trivial_segment(PI[i],v));
|
||||
From[--L.end()] = Seg_info(v,i);
|
||||
} else {
|
||||
CGAL_NEF_TRACEN("once around " << e->source()->point());
|
||||
CGAL_NEF_TRACEN("once around " << e->source()->point());
|
||||
Seg_pair p = two_segments(PI[i],e);
|
||||
L.push_back(p.first);
|
||||
L.push_back(p.second);
|
||||
From[--L.end()] = From[--(--L.end())] = Seg_info(e,i);
|
||||
}
|
||||
} else {
|
||||
CGAL_NEF_TRACEN("normal segment " << e->source()->point()
|
||||
<< "->" << e->twin()->source()->point());
|
||||
CGAL_NEF_TRACEN("normal segment " << e->source()->point()
|
||||
<< "->" << e->twin()->source()->point());
|
||||
L.push_back(segment(PI[i],e));
|
||||
From[--L.end()] = Seg_info(e,i);
|
||||
}
|
||||
|
|
@ -1345,39 +1350,39 @@ subdivide(const Map* M0, const Map* M1,
|
|||
switch(cs) {
|
||||
case 1:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][1]);
|
||||
Sphere_circle(1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][1]);
|
||||
break;
|
||||
case 0:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(-1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][0]);
|
||||
Sphere_circle(-1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][0]);
|
||||
break;
|
||||
case 3:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(0,1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][1]);
|
||||
Sphere_circle(0,1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][1]);
|
||||
break;
|
||||
case 2:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(0,-1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][0]);
|
||||
Sphere_circle(0,-1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][0]);
|
||||
break;
|
||||
case 5:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][1]);
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][1]);
|
||||
break;
|
||||
case 4:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][0]);
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][0]);
|
||||
break;
|
||||
case -1:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
break;
|
||||
default: CGAL_error_msg( "wrong value");
|
||||
}
|
||||
|
|
@ -1409,7 +1414,7 @@ subdivide(const Map* M0, const Map* M1,
|
|||
if(compute_halfsphere[cs][0]) {
|
||||
PH_geometry phg(cs);
|
||||
Positive_halfsphere_sweep SP(
|
||||
Input_range(L_pos.begin(),L_pos.end()),O,phg);
|
||||
Input_range(L_pos.begin(),L_pos.end()),O,phg);
|
||||
SP.sweep();
|
||||
v=--this->svertices_end(); e=--this->shalfedges_end();
|
||||
#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
|
||||
|
|
@ -1446,7 +1451,7 @@ subdivide(const Map* M0, const Map* M1,
|
|||
PH_geometry(cs));
|
||||
if(compute_halfsphere[cs][1])
|
||||
create_face_objects(e, this->shalfedges_end(), v, this->svertices_end(), O,
|
||||
NH_geometry(cs));
|
||||
NH_geometry(cs));
|
||||
|
||||
CGAL_forall_sedges(e,*this) {
|
||||
e->circle() = Sphere_circle(e->source()->point(), e->twin()->source()->point());
|
||||
|
|
@ -1467,8 +1472,8 @@ subdivide(const Map* M0, const Map* M1,
|
|||
CGAL_NEF_TRACEN("mohs[3]=" << mohs[3]);
|
||||
|
||||
CGAL_NEF_TRACEN("compute_halfsphrere\n cs = " << cs <<
|
||||
"\n [cs][0] = " << compute_halfsphere[cs][0] <<
|
||||
"\n [cs][1] = " << compute_halfsphere[cs][1]);
|
||||
"\n [cs][0] = " << compute_halfsphere[cs][0] <<
|
||||
"\n [cs][1] = " << compute_halfsphere[cs][1]);
|
||||
/*
|
||||
SVertex_iterator svii;
|
||||
CGAL_forall_svertices(svii, *this) {
|
||||
|
|
@ -1490,10 +1495,10 @@ subdivide(const Map* M0, const Map* M1,
|
|||
*/
|
||||
if(compute_halfsphere[cs][0])
|
||||
complete_face_support(this->svertices_begin(), v, O, mohs, 0,
|
||||
compute_halfsphere[cs][1]);
|
||||
compute_halfsphere[cs][1]);
|
||||
if(compute_halfsphere[cs][1])
|
||||
complete_face_support(v, this->svertices_end(), O, mohs, 1,
|
||||
compute_halfsphere[cs][0]);
|
||||
compute_halfsphere[cs][0]);
|
||||
|
||||
complete_sface_marks();
|
||||
|
||||
|
|
@ -1528,8 +1533,8 @@ template <typename Map>
|
|||
template <typename Association>
|
||||
void SM_overlayer<Map>::
|
||||
subdivide(const Map* M0, const Map* M1,
|
||||
Association& A,
|
||||
bool with_trivial_segments)
|
||||
Association& A,
|
||||
bool with_trivial_segments)
|
||||
{
|
||||
PI[0] = SM_const_decorator(M0);
|
||||
PI[1] = SM_const_decorator(M1);
|
||||
|
|
@ -1552,19 +1557,19 @@ subdivide(const Map* M0, const Map* M1,
|
|||
CGAL_forall_sedges(e,PI[i]) {
|
||||
if ( e->source() == e->target() ) {
|
||||
if(with_trivial_segments) {
|
||||
CGAL_NEF_TRACEN("trivial segment " << e->source()->point());
|
||||
CGAL_NEF_TRACEN("trivial segment " << e->source()->point());
|
||||
v = e->source();
|
||||
L.push_back(trivial_segment(PI[i],v));
|
||||
From[--L.end()] = Seg_info(v,i);
|
||||
} else {
|
||||
CGAL_NEF_TRACEN("once around " << e->source()->point());
|
||||
CGAL_NEF_TRACEN("once around " << e->source()->point());
|
||||
Seg_pair p = two_segments(PI[i],e);
|
||||
L.push_back(p.first);
|
||||
L.push_back(p.second);
|
||||
From[--L.end()] = From[--(--L.end())] = Seg_info(e,i);
|
||||
}
|
||||
} else {
|
||||
CGAL_NEF_TRACEN("normal segment " << e->source()->point());
|
||||
CGAL_NEF_TRACEN("normal segment " << e->source()->point());
|
||||
L.push_back(segment(PI[i],e));
|
||||
From[--L.end()] = Seg_info(e,i);
|
||||
}
|
||||
|
|
@ -1602,39 +1607,39 @@ subdivide(const Map* M0, const Map* M1,
|
|||
switch(cs) {
|
||||
case 1:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][1]);
|
||||
Sphere_circle(1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][1]);
|
||||
break;
|
||||
case 0:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(-1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][0]);
|
||||
Sphere_circle(-1,0,0), Sphere_circle(0,0,-1),
|
||||
compute_halfsphere[0][0]);
|
||||
break;
|
||||
case 3:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(0,1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][1]);
|
||||
Sphere_circle(0,1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][1]);
|
||||
break;
|
||||
case 2:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(0,-1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][0]);
|
||||
Sphere_circle(0,-1,0), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[1][0]);
|
||||
break;
|
||||
case 5:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][1]);
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][1]);
|
||||
break;
|
||||
case 4:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][0]);
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0),
|
||||
compute_halfsphere[2][0]);
|
||||
break;
|
||||
case -1:
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_pos, From,
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,1), Sphere_circle(1,0,0), true);
|
||||
partition_to_halfsphere(L.begin(), L.end(), L_neg, From,
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
Sphere_circle(0,0,-1), Sphere_circle(1,0,0), true);
|
||||
break;
|
||||
default: CGAL_error_msg( "wrong value");
|
||||
}
|
||||
|
|
@ -1673,20 +1678,20 @@ subdivide(const Map* M0, const Map* M1,
|
|||
for(Seg_iterator it=L_pos.begin(); it!=L_pos.end();++it) {
|
||||
CGAL_NEF_TRACEN("pos " << *it);
|
||||
if(phg.compare_xy(it->target(),it->source())<0) {
|
||||
Object_handle o = From[it]._o;
|
||||
if(CGAL::assign(se, o)) {
|
||||
if(it->sphere_circle() == se->circle())
|
||||
From[it] = Seg_info(se->twin(), From[it]._from);
|
||||
} else if(CGAL::assign(sl, o)) {
|
||||
if(it->sphere_circle() == sl->circle())
|
||||
From[it] = Seg_info(sl->twin(), From[it]._from);
|
||||
}
|
||||
Object_handle o = From[it]._o;
|
||||
if(CGAL::assign(se, o)) {
|
||||
if(it->sphere_circle() == se->circle())
|
||||
From[it] = Seg_info(se->twin(), From[it]._from);
|
||||
} else if(CGAL::assign(sl, o)) {
|
||||
if(it->sphere_circle() == sl->circle())
|
||||
From[it] = Seg_info(sl->twin(), From[it]._from);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
Positive_halfsphere_sweep SP(
|
||||
Input_range(L_pos.begin(),L_pos.end()),O,phg);
|
||||
Input_range(L_pos.begin(),L_pos.end()),O,phg);
|
||||
SP.sweep();
|
||||
v=--this->svertices_end(); e=--this->shalfedges_end();
|
||||
#ifdef CGAL_NEF3_TIMER_SPHERE_SWEEPS
|
||||
|
|
@ -1703,14 +1708,14 @@ subdivide(const Map* M0, const Map* M1,
|
|||
for(Seg_iterator it=L_neg.begin(); it!=L_neg.end();++it) {
|
||||
CGAL_NEF_TRACEN("neg " << *it);
|
||||
if(nhg.compare_xy(it->target(),it->source())<0) {
|
||||
Object_handle o = From[it]._o;
|
||||
if(CGAL::assign(se, o)) {
|
||||
if(it->sphere_circle() == se->circle())
|
||||
From[it] = Seg_info(se->twin(), From[it]._from);
|
||||
} else if(CGAL::assign(sl, o)) {
|
||||
if(it->sphere_circle() == sl->circle())
|
||||
From[it] = Seg_info(sl->twin(), From[it]._from);
|
||||
}
|
||||
Object_handle o = From[it]._o;
|
||||
if(CGAL::assign(se, o)) {
|
||||
if(it->sphere_circle() == se->circle())
|
||||
From[it] = Seg_info(se->twin(), From[it]._from);
|
||||
} else if(CGAL::assign(sl, o)) {
|
||||
if(it->sphere_circle() == sl->circle())
|
||||
From[it] = Seg_info(sl->twin(), From[it]._from);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
@ -1742,7 +1747,7 @@ subdivide(const Map* M0, const Map* M1,
|
|||
PH_geometry(cs));
|
||||
if(compute_halfsphere[cs][1])
|
||||
create_face_objects(e, this->shalfedges_end(), v, this->svertices_end(), O,
|
||||
NH_geometry(cs));
|
||||
NH_geometry(cs));
|
||||
|
||||
CGAL_forall_sedges(e,*this) {
|
||||
e->circle() = Sphere_circle(e->source()->point(), e->twin()->source()->point());
|
||||
|
|
@ -1763,8 +1768,8 @@ subdivide(const Map* M0, const Map* M1,
|
|||
CGAL_NEF_TRACEN("mohs[3]=" << mohs[3]);
|
||||
|
||||
CGAL_NEF_TRACEN("compute_halfsphrere\n cs = " << cs <<
|
||||
"\n [cs][0] = " << compute_halfsphere[cs][0] <<
|
||||
"\n [cs][1] = " << compute_halfsphere[cs][1]);
|
||||
"\n [cs][0] = " << compute_halfsphere[cs][0] <<
|
||||
"\n [cs][1] = " << compute_halfsphere[cs][1]);
|
||||
/*
|
||||
SVertex_iterator svii;
|
||||
CGAL_forall_svertices(svii, *this) {
|
||||
|
|
@ -1786,10 +1791,10 @@ subdivide(const Map* M0, const Map* M1,
|
|||
*/
|
||||
if(compute_halfsphere[cs][0])
|
||||
complete_face_support(this->svertices_begin(), v, O, mohs, 0,
|
||||
compute_halfsphere[cs][1]);
|
||||
compute_halfsphere[cs][1]);
|
||||
if(compute_halfsphere[cs][1])
|
||||
complete_face_support(v, this->svertices_end(), O, mohs, 1,
|
||||
compute_halfsphere[cs][0]);
|
||||
compute_halfsphere[cs][0]);
|
||||
|
||||
complete_sface_marks();
|
||||
|
||||
|
|
@ -1840,40 +1845,40 @@ transfer_data(Association& A) {
|
|||
Object_handle o0 = supp_object(sv,0), o1 = supp_object(sv,1);
|
||||
if(o0.empty()) {
|
||||
if(CGAL::assign(sv1, o1))
|
||||
A.handle_support(sv, sv1);
|
||||
A.handle_support(sv, sv1);
|
||||
else
|
||||
continue;
|
||||
continue;
|
||||
} else if(CGAL::assign(se0, o0)) {
|
||||
if(o1.empty())
|
||||
continue;
|
||||
continue;
|
||||
else if(assign(se1, o1))
|
||||
A.handle_support(sv, se0, se1);
|
||||
A.handle_support(sv, se0, se1);
|
||||
else if(CGAL::assign(sv1, o1))
|
||||
A.handle_support(sv, se0, sv1);
|
||||
A.handle_support(sv, se0, sv1);
|
||||
else if(CGAL::assign(sl1, o1))
|
||||
A.handle_support(sv, se0, sl1);
|
||||
A.handle_support(sv, se0, sl1);
|
||||
else
|
||||
CGAL_error_msg( "wrong handle");
|
||||
CGAL_error_msg( "wrong handle");
|
||||
} else if(CGAL::assign(sv0, o0)) {
|
||||
if(o1.empty())
|
||||
A.handle_support(sv, sv0);
|
||||
A.handle_support(sv, sv0);
|
||||
else if(CGAL::assign(se1, o1))
|
||||
A.handle_support(sv, sv0, se1);
|
||||
A.handle_support(sv, sv0, se1);
|
||||
else if(CGAL::assign(sv1, o1))
|
||||
A.handle_support(sv, sv0, sv1);
|
||||
A.handle_support(sv, sv0, sv1);
|
||||
else if(CGAL::assign(sl1, o1))
|
||||
A.handle_support(sv, sv0, sl1);
|
||||
A.handle_support(sv, sv0, sl1);
|
||||
else
|
||||
CGAL_error_msg( "wrong handle");
|
||||
CGAL_error_msg( "wrong handle");
|
||||
} else if(CGAL::assign(sl0, o0)) {
|
||||
if(o1.empty())
|
||||
continue;
|
||||
continue;
|
||||
else if(CGAL::assign(sv1, o1))
|
||||
A.handle_support(sv, sl0, sv1);
|
||||
A.handle_support(sv, sl0, sv1);
|
||||
else if(CGAL::assign(se1, o1))
|
||||
A.handle_support(sv, sl0, se1);
|
||||
A.handle_support(sv, sl0, se1);
|
||||
else if(CGAL::assign(sl1, o1))
|
||||
A.handle_support(sv, sl0, sl1);
|
||||
A.handle_support(sv, sl0, sl1);
|
||||
} else
|
||||
CGAL_error_msg( "wrong handle");
|
||||
}
|
||||
|
|
@ -1883,29 +1888,29 @@ transfer_data(Association& A) {
|
|||
Object_handle o0 = supp_object(se,0), o1 = supp_object(se,1);
|
||||
if(o0.empty()) {
|
||||
if(assign(se1, o1))
|
||||
A.handle_support(se, se1);
|
||||
A.handle_support(se, se1);
|
||||
else if(assign(sl1, o1))
|
||||
A.handle_support(se, sl1);
|
||||
A.handle_support(se, sl1);
|
||||
else
|
||||
continue; // CGAL_error_msg( "wrong handle");
|
||||
continue; // CGAL_error_msg( "wrong handle");
|
||||
} else if(assign(se0, o0)) {
|
||||
if(o1.empty())
|
||||
A.handle_support(se, se0);
|
||||
A.handle_support(se, se0);
|
||||
else if(assign(se1, o1))
|
||||
A.handle_support(se, se0, se1);
|
||||
A.handle_support(se, se0, se1);
|
||||
else if(assign(sl1, o1))
|
||||
A.handle_support(se, se0, sl1);
|
||||
A.handle_support(se, se0, sl1);
|
||||
else
|
||||
CGAL_error_msg( "wrong handle");
|
||||
CGAL_error_msg( "wrong handle");
|
||||
} else if(assign(sl0, o0)) {
|
||||
if(o1.empty())
|
||||
A.handle_support(se, sl0);
|
||||
A.handle_support(se, sl0);
|
||||
else if(assign(se1, o1))
|
||||
A.handle_support(se, sl0, se1);
|
||||
A.handle_support(se, sl0, se1);
|
||||
else if(assign(sl1, o1))
|
||||
A.handle_support(se, sl0, sl1);
|
||||
A.handle_support(se, sl0, sl1);
|
||||
else
|
||||
CGAL_error_msg( "wrong handle");
|
||||
CGAL_error_msg( "wrong handle");
|
||||
} else
|
||||
CGAL_error_msg( "wrong handle");
|
||||
}
|
||||
|
|
@ -1937,9 +1942,9 @@ template <typename Map>
|
|||
template <typename Iterator, typename T>
|
||||
void SM_overlayer<Map>::
|
||||
partition_to_halfsphere(Iterator start, Iterator beyond, Seg_list& L,
|
||||
CGAL::Unique_hash_map<Iterator,T>& M,
|
||||
Sphere_circle xycircle, Sphere_circle yzcircle,
|
||||
bool include_equator) const
|
||||
CGAL::Unique_hash_map<Iterator,T>& M,
|
||||
Sphere_circle xycircle, Sphere_circle yzcircle,
|
||||
bool include_equator) const
|
||||
{ CGAL_NEF_TRACEN("partition_to_halfsphere ");
|
||||
// CGAL_assertion(pos!=0);
|
||||
Sphere_segment s1,s2;
|
||||
|
|
@ -1949,12 +1954,12 @@ partition_to_halfsphere(Iterator start, Iterator beyond, Seg_list& L,
|
|||
int i = start->intersection(xycircle,s1,s2);
|
||||
CGAL_NEF_TRACEN("segment " << start->source() << " " << start->target());
|
||||
if (i>1) {
|
||||
L.push_back(s2); M[--L.end()] = M[start];
|
||||
CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target());
|
||||
L.push_back(s2); M[--L.end()] = M[start];
|
||||
CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target());
|
||||
}
|
||||
if (i>0) {
|
||||
L.push_back(s1); M[--L.end()] = M[start];
|
||||
CGAL_NEF_TRACEN(">0 " << s1.source() << " " << s1.target());
|
||||
L.push_back(s1); M[--L.end()] = M[start];
|
||||
CGAL_NEF_TRACEN(">0 " << s1.source() << " " << s1.target());
|
||||
}
|
||||
++start;
|
||||
}
|
||||
|
|
@ -1982,28 +1987,28 @@ partition_to_halfsphere(Iterator start, Iterator beyond, Seg_list& L,
|
|||
bool added=false;
|
||||
int n1 = it->intersection(yzcircle,s1,s2);
|
||||
if (n1 > 1 && !s2.is_degenerate()) {
|
||||
M[ L.insert(it,s2) ] = M[it];
|
||||
added=true;
|
||||
CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target());
|
||||
M[ L.insert(it,s2) ] = M[it];
|
||||
added=true;
|
||||
CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target());
|
||||
}
|
||||
if (n1 > 0 && !s1.is_degenerate()) {
|
||||
M[ L.insert(it,s1) ] = M[it];
|
||||
added = true;
|
||||
CGAL_NEF_TRACEN(">1 " << s1.source() << " " << s1.target());
|
||||
M[ L.insert(it,s1) ] = M[it];
|
||||
added = true;
|
||||
CGAL_NEF_TRACEN(">1 " << s1.source() << " " << s1.target());
|
||||
}
|
||||
int n2 = it->intersection(yzcircle.opposite(),s1,s2);
|
||||
if (n2 > 1 && !s2.is_degenerate()) {
|
||||
M[ L.insert(it,s2) ] = M[it];
|
||||
added=true;
|
||||
CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target());
|
||||
M[ L.insert(it,s2) ] = M[it];
|
||||
added=true;
|
||||
CGAL_NEF_TRACEN(">1 " << s2.source() << " " << s2.target());
|
||||
}
|
||||
if (n2 > 0 && !s1.is_degenerate()) {
|
||||
M[ L.insert(it,s1) ] = M[it];
|
||||
added=true;
|
||||
CGAL_NEF_TRACEN(">1 " << s1.source() << " " << s1.target());
|
||||
M[ L.insert(it,s1) ] = M[it];
|
||||
added=true;
|
||||
CGAL_NEF_TRACEN(">1 " << s1.source() << " " << s1.target());
|
||||
}
|
||||
if(added) {
|
||||
itl = it; --it; M[itl] = T(); L.erase(itl);
|
||||
itl = it; --it; M[itl] = T(); L.erase(itl);
|
||||
}
|
||||
// at least one item was appended
|
||||
}
|
||||
|
|
@ -2057,16 +2062,16 @@ create_face_objects(SHalfedge_iterator e_start, SHalfedge_iterator e_end,
|
|||
CGAL_NEF_TRACEN("");
|
||||
CGAL_NEF_TRACEN(" face cycle numbering "<<i);
|
||||
CGAL_For_all(hfc,hend) {
|
||||
SFaceCycle[hfc]=i; // assign face cycle number
|
||||
if (hfc->twin()->source() == e_min->twin()->source()) {
|
||||
Sphere_point p1 = hfc->source()->point(),
|
||||
p2 = hfc->twin()->source()->point(),
|
||||
p3 = hfc->snext()->twin()->source()->point();
|
||||
if ( SG.orientation(p1,p2,p3) <= 0 )
|
||||
e_min = hfc;
|
||||
} else if ( SG.compare_xy(hfc->twin()->source()->point(), e_min->twin()->source()->point()) < 0 )
|
||||
e_min = hfc;
|
||||
CGAL_NEF_TRACEN(PH(hfc));
|
||||
SFaceCycle[hfc]=i; // assign face cycle number
|
||||
if (hfc->twin()->source() == e_min->twin()->source()) {
|
||||
Sphere_point p1 = hfc->source()->point(),
|
||||
p2 = hfc->twin()->source()->point(),
|
||||
p3 = hfc->snext()->twin()->source()->point();
|
||||
if ( SG.orientation(p1,p2,p3) <= 0 )
|
||||
e_min = hfc;
|
||||
} else if ( SG.compare_xy(hfc->twin()->source()->point(), e_min->twin()->source()->point()) < 0 )
|
||||
e_min = hfc;
|
||||
CGAL_NEF_TRACEN(PH(hfc));
|
||||
} CGAL_NEF_TRACEN("");
|
||||
MinimalSHalfedge.push_back(e_min);
|
||||
++i;
|
||||
|
|
@ -2076,12 +2081,12 @@ create_face_objects(SHalfedge_iterator e_start, SHalfedge_iterator e_end,
|
|||
SHalfedge_handle e = MinimalSHalfedge[j];
|
||||
CGAL_NEF_TRACEN(" face cycle "<<j<<" minimal halfedge "<<PH(e));
|
||||
Sphere_point p1 = e->source()->point(),
|
||||
p2 = e->twin()->source()->point(),
|
||||
p3 = e->snext()->twin()->source()->point();
|
||||
p2 = e->twin()->source()->point(),
|
||||
p3 = e->snext()->twin()->source()->point();
|
||||
if ( SG.orientation(p1,p2,p3) > 0 ) { // left_turn => outer face cycle
|
||||
SFace_handle f = this->new_sface();
|
||||
link_as_face_cycle(e,f);
|
||||
CGAL_NEF_TRACEN(" creating new face object "<<&*f<<" bd "<<&*e);
|
||||
SFace_handle f = this->new_sface();
|
||||
link_as_face_cycle(e,f);
|
||||
CGAL_NEF_TRACEN(" creating new face object "<<&*f<<" bd "<<&*e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2091,7 +2096,7 @@ create_face_objects(SHalfedge_iterator e_start, SHalfedge_iterator e_end,
|
|||
CGAL_NEF_TRACEN("linking hole "<<PH(e));
|
||||
SFace_handle f = determine_face(e,MinimalSHalfedge,SFaceCycle,D);
|
||||
if(f != SFace_handle())
|
||||
link_as_face_cycle(e,f);
|
||||
link_as_face_cycle(e,f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2117,52 +2122,52 @@ complete_face_support(SVertex_iterator v_start, SVertex_iterator v_end,
|
|||
SHalfedge_handle e_below = halfedge_below(v);
|
||||
if ( v == v_start ) {
|
||||
for (int i=0; i<2; ++i){
|
||||
m_buffer[i] = mohs[offset+2*i];
|
||||
m_buffer[i] = mohs[offset+2*i];
|
||||
}
|
||||
} else if ( e_below != SHalfedge_handle() ) {
|
||||
for (int i=0; i<2; ++i) {
|
||||
CGAL_NEF_TRACEN("edge below "<< PH(e_below) << " " << mark(e_below,i));
|
||||
m_buffer[i] = incident_mark(e_below,i);
|
||||
CGAL_NEF_TRACEN("edge below "<< PH(e_below) << " " << mark(e_below,i));
|
||||
m_buffer[i] = incident_mark(e_below,i);
|
||||
}
|
||||
} else { // e_below does not exist
|
||||
// CGAL_assertion( v->point().hz() == 0 &&
|
||||
// ( offset == 0 ? (v->point().hx() >= 0) : (v->point().hx()<=0)) );
|
||||
// ( offset == 0 ? (v->point().hx() >= 0) : (v->point().hx()<=0)) );
|
||||
if(!is_isolated(v)) {
|
||||
if(!both) {
|
||||
for (int i=0; i<2; ++i)
|
||||
m_buffer[i] = mohs[offset+2*i];
|
||||
CGAL_NEF_TRACEN("no edge below ");
|
||||
} else {
|
||||
for (int i=0; i<2; ++i)
|
||||
m_buffer[i] = incident_mark(first_out_edge(v)->sprev(),i);
|
||||
}
|
||||
if(!both) {
|
||||
for (int i=0; i<2; ++i)
|
||||
m_buffer[i] = mohs[offset+2*i];
|
||||
CGAL_NEF_TRACEN("no edge below ");
|
||||
} else {
|
||||
for (int i=0; i<2; ++i)
|
||||
m_buffer[i] = incident_mark(first_out_edge(v)->sprev(),i);
|
||||
}
|
||||
}
|
||||
} CGAL_NEF_TRACEN(" faces right-below "<<m_buffer[0]<<" "<<m_buffer[1]);
|
||||
|
||||
for (int i=0; i<2; ++i) {
|
||||
Object_handle o = supp_object(v,i);
|
||||
if ( o.empty() ) {
|
||||
CGAL_NEF_TRACEN("no vertex support");
|
||||
mark(v,i) = m_buffer[i]; continue;
|
||||
CGAL_NEF_TRACEN("no vertex support");
|
||||
mark(v,i) = m_buffer[i]; continue;
|
||||
}
|
||||
SVertex_const_handle vs;
|
||||
SHalfedge_const_handle es;
|
||||
SHalfloop_const_handle ls;
|
||||
if ( CGAL::assign(vs,o) ) {
|
||||
CGAL_NEF_TRACEN("support by svertex");
|
||||
mark(v,i) = vs->mark(); continue;
|
||||
CGAL_NEF_TRACEN("support by svertex");
|
||||
mark(v,i) = vs->mark(); continue;
|
||||
}
|
||||
if ( CGAL::assign(es,supp_object(v,i)) ) {
|
||||
CGAL_NEF_TRACEN("support by sedge");
|
||||
CGAL_NEF_TRACEN("support by sedge");
|
||||
if ( es->source()->point() == v->point() )
|
||||
{ mark(v,i) = es->source()->mark(); continue; }
|
||||
{ mark(v,i) = es->source()->mark(); continue; }
|
||||
if ( es->target()->point() == v->point() )
|
||||
{ mark(v,i) = es->target()->mark(); continue; }
|
||||
{ mark(v,i) = es->target()->mark(); continue; }
|
||||
mark(v,i) = es->mark(); continue;
|
||||
}
|
||||
if ( CGAL::assign(ls,o) ) {
|
||||
mark(v,i) = ls->mark();
|
||||
CGAL_NEF_TRACEN("loop " << ls->circle()); continue; }
|
||||
mark(v,i) = ls->mark();
|
||||
CGAL_NEF_TRACEN("loop " << ls->circle()); continue; }
|
||||
CGAL_error_msg("wrong handle");
|
||||
} CGAL_NEF_TRACEN(" vertex marks "<<mark(v,0)<<" "<<mark(v,1));
|
||||
|
||||
|
|
@ -2176,7 +2181,7 @@ complete_face_support(SVertex_iterator v_start, SVertex_iterator v_end,
|
|||
SHalfedge_const_handle ei;
|
||||
if ( CGAL::assign(ei,supp_object(e,i)) ) {
|
||||
if (!equal_not_opposite(ei->circle(),e->circle()))
|
||||
ei = ei->twin();
|
||||
ei = ei->twin();
|
||||
CGAL_assertion( ei->circle() == e->circle() );
|
||||
CGAL_NEF_TRACEN(" supporting edge "<<i<<" "<<PH(ei));
|
||||
incident_mark(e->twin(),i) =
|
||||
|
|
@ -2187,18 +2192,18 @@ complete_face_support(SVertex_iterator v_start, SVertex_iterator v_end,
|
|||
}
|
||||
SHalfloop_const_handle li;
|
||||
if ( CGAL::assign(li,supp_object(e,i)) ) {
|
||||
if (!equal_not_opposite(li->circle(),e->circle()))
|
||||
li = li->twin();
|
||||
CGAL_assertion( li->circle() == e->circle() );
|
||||
CGAL_NEF_TRACEN(" supporting loop "<<i<<" "<<PH(li));
|
||||
incident_mark(e->twin(),i) =
|
||||
li->twin()->incident_sface()->mark();
|
||||
mark(e,i) = mark(e->twin(),i) = li->mark();
|
||||
incident_mark(e,i) = m_buffer[i] =
|
||||
li->incident_sface()->mark();
|
||||
if (!equal_not_opposite(li->circle(),e->circle()))
|
||||
li = li->twin();
|
||||
CGAL_assertion( li->circle() == e->circle() );
|
||||
CGAL_NEF_TRACEN(" supporting loop "<<i<<" "<<PH(li));
|
||||
incident_mark(e->twin(),i) =
|
||||
li->twin()->incident_sface()->mark();
|
||||
mark(e,i) = mark(e->twin(),i) = li->mark();
|
||||
incident_mark(e,i) = m_buffer[i] =
|
||||
li->incident_sface()->mark();
|
||||
}
|
||||
} else { CGAL_NEF_TRACEN(" support from face below "<<i);
|
||||
incident_mark(e->twin(),i) = mark(e,i) = mark(e->twin(),i) =
|
||||
incident_mark(e->twin(),i) = mark(e,i) = mark(e->twin(),i) =
|
||||
incident_mark(e,i) = m_buffer[i];
|
||||
}
|
||||
} CGAL_NEF_TRACEN(" face marks "<<m_buffer[0]<<" "<<m_buffer[1]);
|
||||
|
|
@ -2329,27 +2334,27 @@ void SM_overlayer<Map>::simplify()
|
|||
en = e; ++en; if ( en==e->twin() ) ++en;
|
||||
CGAL_NEF_TRACEN("can simplify ? " << PH(e));
|
||||
CGAL_NEF_TRACEN(e->mark() << " " <<
|
||||
e->incident_sface()->mark() << " " <<
|
||||
e->twin()->incident_sface()->mark());
|
||||
e->incident_sface()->mark() << " " <<
|
||||
e->twin()->incident_sface()->mark());
|
||||
if (( e->mark() == e->incident_sface()->mark() &&
|
||||
e->mark() == e->twin()->incident_sface()->mark())){
|
||||
e->mark() == e->twin()->incident_sface()->mark())){
|
||||
CGAL_NEF_TRACEN("deleting "<<PH(e));
|
||||
if ( !UF.same_set(Pitem[e->incident_sface()],
|
||||
Pitem[e->twin()->incident_sface()]) ) {
|
||||
Pitem[e->twin()->incident_sface()]) ) {
|
||||
|
||||
UF.unify_sets( Pitem[e->incident_sface()],
|
||||
Pitem[e->twin()->incident_sface()] );
|
||||
CGAL_NEF_TRACEN("unioning disjoint faces");
|
||||
UF.unify_sets( Pitem[e->incident_sface()],
|
||||
Pitem[e->twin()->incident_sface()] );
|
||||
CGAL_NEF_TRACEN("unioning disjoint faces");
|
||||
}
|
||||
|
||||
CGAL_NEF_TRACEN("is_closed_at_source " << is_closed_at_source(e) <<
|
||||
" " << is_closed_at_source(e->twin()));
|
||||
" " << is_closed_at_source(e->twin()));
|
||||
|
||||
if ( is_closed_at_source(e) )
|
||||
Vitem[e->source()] = Pitem[e->incident_sface()];
|
||||
Vitem[e->source()] = Pitem[e->incident_sface()];
|
||||
|
||||
if ( is_closed_at_source(e->twin()))
|
||||
Vitem[e->target()] = Pitem[e->incident_sface()];
|
||||
Vitem[e->target()] = Pitem[e->incident_sface()];
|
||||
|
||||
delete_edge_pair(e);
|
||||
}
|
||||
|
|
@ -2370,13 +2375,13 @@ void SM_overlayer<Map>::simplify()
|
|||
if ( is_isolated(v) ) {
|
||||
|
||||
if(Vitem[v] != nullptr) {
|
||||
set_face(v,*(UF.find(Vitem[v])));
|
||||
CGAL_NEF_TRACEN("incident face of " << PH(v) << " set to " << &*(v->incident_sface()));
|
||||
set_face(v,*(UF.find(Vitem[v])));
|
||||
CGAL_NEF_TRACEN("incident face of " << PH(v) << " set to " << &*(v->incident_sface()));
|
||||
}
|
||||
else {
|
||||
set_face(v, *(UF.find(Pitem[v->incident_sface()])));
|
||||
CGAL_NEF_TRACEN("isolated svertex " << PH(v) <<
|
||||
" already has incident face " << &*(v->incident_sface()));
|
||||
set_face(v, *(UF.find(Pitem[v->incident_sface()])));
|
||||
CGAL_NEF_TRACEN("isolated svertex " << PH(v) <<
|
||||
" already has incident face " << &*(v->incident_sface()));
|
||||
}
|
||||
|
||||
if ( v->mark() == v->incident_sface()->mark() ) {
|
||||
|
|
|
|||
|
|
@ -91,12 +91,14 @@ void test_lazy_exact_nt() {
|
|||
assert( cast ( (i*i+i) / i-i ) == LR(1));
|
||||
assert( cast ( (i*i+r) / i-i ) == LR(1));
|
||||
assert( cast ( (i*r+r) / i-i ) == LI(1));
|
||||
}{ // see also Coercion_traits_test.C
|
||||
}
|
||||
|
||||
{ // see also Coercion_traits_test.C
|
||||
#ifdef CGAL_USE_LEDA
|
||||
#ifdef CGAL_USE_CORE
|
||||
typedef CGAL::Lazy_exact_nt<leda_integer > T1;
|
||||
typedef CGAL::Lazy_exact_nt<CORE::Expr > T2;
|
||||
typedef CGAL::Coercion_traits<T1,T2> CT;
|
||||
CGAL_assertion_code(typedef CGAL::Lazy_exact_nt<leda_integer> T1;)
|
||||
CGAL_assertion_code(typedef CGAL::Lazy_exact_nt<CORE::Expr> T2;)
|
||||
CGAL_assertion_code(typedef CGAL::Coercion_traits<T1, T2> CT;)
|
||||
CGAL_static_assertion((boost::is_same< typename CT::Are_implicit_interoperable,CGAL::Tag_false>::value));
|
||||
CGAL_static_assertion((boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_false>::value));
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -147,10 +147,8 @@ update_new_point(
|
|||
typedef typename rich_grid_internal::Rich_point<Kernel> Rich_point;
|
||||
|
||||
CGAL_assertion_code( unsigned int size = static_cast<unsigned int>(rich_point_set.size()) );
|
||||
CGAL_point_set_processing_precondition(father_index >= 0 &&
|
||||
father_index < size);
|
||||
CGAL_point_set_processing_precondition(mother_index >= 0 &&
|
||||
mother_index < size);
|
||||
CGAL_point_set_processing_precondition(father_index < size);
|
||||
CGAL_point_set_processing_precondition(mother_index < size);
|
||||
|
||||
// 1, get neighbor information from the two "parent points"
|
||||
Rich_point& new_v = rich_point_set[new_point_index];
|
||||
|
|
|
|||
|
|
@ -207,9 +207,6 @@ MainWindow::MainWindow()
|
|||
|
||||
this->addRecentFiles(this->menuFile, this->actionQuit);
|
||||
connect(this, SIGNAL(openRecentFile(QString)), this, SLOT(open(QString)));
|
||||
|
||||
// QObject::connect(thresholdSlider, SIGNAL(valueChanged(int)), this, SLOT(set_Threshold(int)));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -279,14 +279,6 @@
|
|||
<include location="../icons/Triangulation_2.qrc" />
|
||||
<include location="../icons/Input.qrc" />
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>thresholdSlider</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>setThreshold(int)</slot>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>setThreshold(int)</slot>
|
||||
</slots>
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ Polynomial<NT> modular_gcd_utcf_algorithm_M(
|
|||
MScalar mg_;
|
||||
MPoly mF1,mF2,mG_;
|
||||
|
||||
typename CRT::Scalar_type p,q,pq,s,t;
|
||||
typename CRT::Scalar_type p(0),q(0),pq,s,t;
|
||||
Poly Gs,H1s,H2s, Gs_old; // s =^ star
|
||||
#ifdef CGAL_MODULAR_GCD_TIMER
|
||||
timer_init.stop();
|
||||
|
|
@ -123,7 +123,7 @@ Polynomial<NT> modular_gcd_utcf_algorithm_M(
|
|||
do{
|
||||
int current_prime = -1;
|
||||
prime_index++;
|
||||
if(prime_index >= 2000){
|
||||
if(prime_index >= 2000){
|
||||
std::cerr<<"primes in the array exhausted"<<std::endl;
|
||||
current_prime = internal::get_next_lower_prime(current_prime);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ namespace CGAL {
|
|||
FT get_z(const Point_3& p){ return m_traits.compute_z_3_object()(p); }
|
||||
FT get_coord(const Point_3& p, unsigned int d)
|
||||
{
|
||||
CGAL_assertion(d >= 0 && d < 3);
|
||||
CGAL_assertion(d < 3);
|
||||
switch (d)
|
||||
{
|
||||
case 0: return get_x(p);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*********************************************************************
|
||||
* 25 - 02 - 97
|
||||
* gestion des fichiers image ELF
|
||||
* 25 - 02 - 97
|
||||
* gestion des fichiers image ELF
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
|
|
@ -14,6 +14,20 @@
|
|||
|
||||
namespace CGAL {
|
||||
namespace Total {
|
||||
namespace internal {
|
||||
|
||||
//To avoid "fopen may be unsafe" on Visual.
|
||||
bool open_file(FILE **fin, const char* filename)
|
||||
{
|
||||
#if defined(BOOST_MSVC)
|
||||
return (fopen_s(fin, filename, "rw") == 0);
|
||||
#else
|
||||
*fin = fopen(filename, "rw");
|
||||
return (fin != NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
||||
void permuteLong(char *a)
|
||||
{
|
||||
|
|
@ -54,7 +68,7 @@ for(i=0;i<nb;i++) permuteShort( (char *) &a[i]);
|
|||
|
||||
void permuteFloat(char *a )
|
||||
{
|
||||
char tmp;
|
||||
char tmp;
|
||||
|
||||
#ifdef CGAL_LITTLE_ENDIAN
|
||||
tmp=a[0]; a[0]=a[3]; a[3]=tmp;
|
||||
|
|
@ -65,7 +79,7 @@ tmp=a[1]; a[1]=a[2]; a[2]=tmp;
|
|||
|
||||
void permuteFloatTab(float *a, int nb)
|
||||
{
|
||||
int i;
|
||||
int i;
|
||||
|
||||
#ifdef CGAL_LITTLE_ENDIAN
|
||||
for(i=0;i<nb;i++) permuteFloat((char *) &a[i]);
|
||||
|
|
@ -75,7 +89,7 @@ for(i=0;i<nb;i++) permuteFloat((char *) &a[i]);
|
|||
|
||||
void permuteDouble(char *a )
|
||||
{
|
||||
char tmp;
|
||||
char tmp;
|
||||
|
||||
#ifdef CGAL_LITTLE_ENDIAN
|
||||
tmp=a[0]; a[0]=a[3]; a[3]=tmp;
|
||||
|
|
@ -86,7 +100,7 @@ tmp=a[1]; a[1]=a[2]; a[2]=tmp;
|
|||
|
||||
void permuteDoubleTab(double *a, int nb)
|
||||
{
|
||||
int i;
|
||||
int i;
|
||||
|
||||
#ifdef CGAL_LITTLE_ENDIAN
|
||||
for(i=0;i<nb;i++) permuteDouble((char *) &a[i]);
|
||||
|
|
@ -99,7 +113,7 @@ int lire_longueur_trace(const char * nomfich, long * long_trace)
|
|||
FILE *fin;
|
||||
int flag=0;
|
||||
|
||||
if ( (fin=fopen(nomfich,"rw"))!=NULL )
|
||||
if ( internal::open_file(&fin, nomfich) )
|
||||
{
|
||||
fseek(fin,4,0);
|
||||
if (fread(long_trace,4,1,fin) != 1) {
|
||||
|
|
@ -118,7 +132,7 @@ int lire_nb_trace(const char * nomfich, long * nb_trace)
|
|||
FILE *fin;
|
||||
int flag=0;
|
||||
|
||||
if ( (fin=fopen(nomfich,"rw"))!=NULL )
|
||||
if ( internal::open_file(&fin, nomfich) )
|
||||
{
|
||||
fseek(fin,8,0);
|
||||
if (fread(nb_trace,4,1,fin) != 1) {
|
||||
|
|
@ -137,7 +151,7 @@ int lire_nb_plan(const char * nomfich, long * nb_plan)
|
|||
FILE *fin;
|
||||
int flag=0;
|
||||
|
||||
if ( (fin=fopen(nomfich,"rw"))!=NULL )
|
||||
if ( internal::open_file(&fin, nomfich) )
|
||||
{
|
||||
fseek(fin,12,0);
|
||||
if (fread(nb_plan,4,1,fin) != 1) {
|
||||
|
|
@ -157,7 +171,7 @@ int lire_nb_octet(const char * nomfich, long * nb_octet)
|
|||
FILE *fin;
|
||||
int flag=0;
|
||||
|
||||
if ( (fin=fopen(nomfich,"rw"))!=NULL )
|
||||
if ( internal::open_file(&fin, nomfich) )
|
||||
{
|
||||
fseek(fin,36,0);
|
||||
if (fread(nb_octet,4,1,fin) != 1) {
|
||||
|
|
@ -177,7 +191,7 @@ int lire_longueur_entete(const char * nomfich, long * long_entete)
|
|||
FILE *fin;
|
||||
int flag=0;
|
||||
|
||||
if ( (fin=fopen(nomfich,"rw"))!=NULL )
|
||||
if ( internal::open_file(&fin, nomfich) )
|
||||
{
|
||||
fseek(fin,72,0);
|
||||
if (fread(long_entete,4,1,fin) != 1) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue