mirror of https://github.com/CGAL/cgal
WIP: Almost fix Skin_surface_3
This commit is contained in:
parent
b949b667ab
commit
7c89697d17
|
|
@ -153,7 +153,7 @@ private:
|
|||
Sign test_anchor(Weighted_point const& wp1, Weighted_point const& wp2,
|
||||
Weighted_point const& wp3) {
|
||||
return enum_cast<Sign>(
|
||||
-reg.geom_traits().power_side_of_bounded_power_sphere_3_object()(wp1, wp2, wp3));
|
||||
- reg.geom_traits().power_side_of_bounded_power_sphere_3_object()(wp1, wp2, wp3));
|
||||
}
|
||||
Sign test_anchor(Weighted_point const& wp1, Weighted_point const& wp2,
|
||||
Weighted_point const& wp3, Weighted_point const& wp4) {
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ Skin_surface_base_3(WP_iterator begin, WP_iterator end, FT shrink_,
|
|||
|
||||
if (grow_balls) {
|
||||
for (; begin != end; begin++) {
|
||||
regular().insert(Weighted_point(*begin, begin->weight()/shrink_factor()));
|
||||
regular().insert(gt.construct_weighted_point_3_object()(gt.construct_point_3_object()(*begin), begin->weight()/shrink_factor()));
|
||||
}
|
||||
} else {
|
||||
regular().insert(begin, end);
|
||||
|
|
@ -371,8 +371,8 @@ intersect(TMC_Cell_handle ch, int i, int j,
|
|||
Bare_point &p) const {
|
||||
Cartesian_converter<FK, Gt> converter;
|
||||
|
||||
Bare_point p1 = converter(ch->vertex(i)->point());
|
||||
Bare_point p2 = converter(ch->vertex(j)->point());
|
||||
Bare_point p1 = gt.construct_point_3_object()(converter(ch->vertex(i)->point()));
|
||||
Bare_point p2 = gt.construct_point_3_object()(converter(ch->vertex(j)->point()));
|
||||
|
||||
return intersect(p1, p2, ch, ch, p);
|
||||
}
|
||||
|
|
@ -765,7 +765,7 @@ get_weighted_circumcenter(const Simplex &s, Gt2 &traits) {
|
|||
case 0:
|
||||
{
|
||||
vh = s;
|
||||
result = converter(vh->point());
|
||||
result = Gt2().construct_point_3_object()(converter(vh->point()));
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@ public:
|
|||
Regular_triangulation_euclidean_traits_3<K> reg_traits;
|
||||
p = reg_traits.construct_weighted_circumcenter_3_object()(wp0,wp1);
|
||||
c = s*(1-s)*reg_traits.compute_squared_radius_smallest_orthogonal_sphere_3_object()(wp0,wp1);
|
||||
Vector t = reg_traits.construct_vector_3_object()(wp1,wp0);
|
||||
Vector t = reg_traits.construct_vector_3_object()(reg_traits.construct_point_3_object()(wp1),
|
||||
reg_traits.construct_point_3_object()(wp0));
|
||||
|
||||
FT den = t*t;
|
||||
Q[0] = (- t.x()*t.x()/den + (1-s));
|
||||
|
|
@ -90,7 +91,9 @@ public:
|
|||
p = reg_traits.construct_weighted_circumcenter_3_object()(wp0,wp1,wp2);
|
||||
c = s*(1-s)*reg_traits.compute_squared_radius_smallest_orthogonal_sphere_3_object()(wp0,wp1,wp2);
|
||||
|
||||
Vector t = K().construct_orthogonal_vector_3_object()(wp0,wp1,wp2);
|
||||
Vector t = K().construct_orthogonal_vector_3_object()(reg_traits.construct_point_3_object()(wp0),
|
||||
reg_traits.construct_point_3_object()(wp1),
|
||||
reg_traits.construct_point_3_object()(wp2));
|
||||
|
||||
FT den = t*t;
|
||||
Q[0] = -(- t.x()*t.x()/den + s);
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ template <class K>
|
|||
class Construct_anchor_point_3 {
|
||||
public:
|
||||
typedef typename K::FT FT;
|
||||
typedef typename K::Bare_point Bare_point;
|
||||
typedef typename K::Point_3 Bare_point;
|
||||
|
||||
Construct_anchor_point_3(const FT &shrink) : s(shrink) {}
|
||||
|
||||
|
|
@ -108,16 +108,17 @@ private:
|
|||
|
||||
template <class K_>
|
||||
class Skin_surface_traits_base_3
|
||||
: public Regular_triangulation_euclidean_traits_3<K_>
|
||||
: public K_
|
||||
// : public Regular_triangulation_euclidean_traits_3<K_>
|
||||
{
|
||||
typedef Regular_triangulation_euclidean_traits_3<K_> Base;
|
||||
// typedef Regular_triangulation_euclidean_traits_3<K_> Base;
|
||||
public:
|
||||
typedef K_ Kernel;
|
||||
typedef Skin_surface_traits_base_3<Kernel> Self;
|
||||
|
||||
typedef typename Kernel::FT FT;
|
||||
typedef typename Kernel::Point_3 Bare_point;
|
||||
typedef typename Base::Weighted_point Weighted_point;
|
||||
typedef typename Kernel::Weighted_point_3 Weighted_point;
|
||||
typedef Weighted_point Weighted_point_3;
|
||||
|
||||
typedef CGAL::Side_of_mixed_cell_3<Self> Side_of_mixed_cell_3;
|
||||
|
|
|
|||
|
|
@ -97,6 +97,8 @@ public:
|
|||
Rt_Facet f;
|
||||
Rt_Cell_handle ch;
|
||||
|
||||
typename Surface_regular_traits::Construct_point_3 wp2p;
|
||||
|
||||
switch (s.dimension()) {
|
||||
case 0: {
|
||||
vh = s;
|
||||
|
|
@ -118,7 +120,8 @@ public:
|
|||
typename Surface_regular_traits::
|
||||
Compute_squared_radius_smallest_orthogonal_sphere_3()(p0,p1),
|
||||
typename Surface_regular_traits::
|
||||
Construct_vector_3()(p1,p0),
|
||||
Construct_vector_3()(wp2p(p1),
|
||||
wp2p(p0)),
|
||||
r2s_converter(shrink),
|
||||
1);
|
||||
break;
|
||||
|
|
@ -137,7 +140,7 @@ public:
|
|||
typename Surface_regular_traits::
|
||||
Compute_squared_radius_smallest_orthogonal_sphere_3()(p0,p1,p2),
|
||||
typename Surface_regular_traits::
|
||||
Construct_orthogonal_vector_3()(p0,p1,p2),
|
||||
Construct_orthogonal_vector_3()(wp2p(p0),wp2p(p1),wp2p(p2)),
|
||||
r2s_converter(1-shrink),
|
||||
-1);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -263,8 +263,10 @@ private:
|
|||
r2t_converter_object;
|
||||
|
||||
Construct_anchor_point_3<
|
||||
Regular_triangulation_euclidean_traits_3<
|
||||
Triangulated_mixed_complex_traits> > construct_anchor_point_3_obj;
|
||||
// Regular_triangulation_euclidean_traits_3<
|
||||
Triangulated_mixed_complex_traits>
|
||||
// >
|
||||
construct_anchor_point_3_obj;
|
||||
|
||||
typename Tmc_traits::Compute_squared_radius_smallest_orthogonal_sphere_3 orthoweight_obj;
|
||||
Compute_anchor_3<Regular> compute_anchor_obj;
|
||||
|
|
@ -1047,7 +1049,7 @@ get_weighted_circumcenter(Rt_Simplex const &s) {
|
|||
switch (s.dimension()) {
|
||||
case 0:
|
||||
vh=s;
|
||||
result = r2t_converter_object(vh->point());
|
||||
result = Tmc_traits().construct_point_3_object()(r2t_converter_object(vh->point()));
|
||||
break;
|
||||
case 1:
|
||||
e=s;
|
||||
|
|
@ -1269,9 +1271,9 @@ orientation(Tmc_Cell_handle ch) {
|
|||
typename EK::Point_3 e_pts[4];
|
||||
|
||||
for (int k=0; k<4; k++) {
|
||||
e_pts[k] =
|
||||
Skin_surface_base_3<Regular_traits>::
|
||||
get_anchor_point(ch->vertex(k)->info(), exact_traits);
|
||||
e_pts[k] =
|
||||
Skin_surface_base_3<Regular_traits>::
|
||||
get_anchor_point(ch->vertex(k)->info(), exact_traits);
|
||||
// Store the more precise point
|
||||
ch->vertex(k)->point() = converter(e_pts[k]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -565,7 +565,7 @@ get_orthocenter(Rt_Simplex const &s) {
|
|||
switch (s.dimension()) {
|
||||
case 0:
|
||||
vh=s;
|
||||
result = r2t_converter_object(vh->point());
|
||||
result = Tmc_traits().construct_point_3_object()(r2t_converter_object(vh->point()));
|
||||
break;
|
||||
case 1:
|
||||
e=s;
|
||||
|
|
|
|||
Loading…
Reference in New Issue