mirror of https://github.com/CGAL/cgal
use traits member
This commit is contained in:
parent
9651c066b1
commit
1dfd16ea01
|
|
@ -154,26 +154,25 @@ public:
|
||||||
template <class RandomAccessIterator>
|
template <class RandomAccessIterator>
|
||||||
void operator() (RandomAccessIterator begin, RandomAccessIterator end) const
|
void operator() (RandomAccessIterator begin, RandomAccessIterator end) const
|
||||||
{
|
{
|
||||||
K k;
|
double xmin=to_double(_k.compute_x_3_object()(*begin)),
|
||||||
double xmin=to_double(k.compute_x_3_object()(*begin)),
|
ymin=to_double(_k.compute_y_3_object()(*begin)),
|
||||||
ymin=to_double(k.compute_y_3_object()(*begin)),
|
zmin=to_double(_k.compute_z_3_object()(*begin)),
|
||||||
zmin=to_double(k.compute_z_3_object()(*begin)),
|
|
||||||
xmax=xmin,
|
xmax=xmin,
|
||||||
ymax=ymin,
|
ymax=ymin,
|
||||||
zmax=zmin;
|
zmax=zmin;
|
||||||
for(RandomAccessIterator it=begin+1; it<end; ++it){
|
for(RandomAccessIterator it=begin+1; it<end; ++it){
|
||||||
if ( to_double(k.compute_x_3_object()(*it)) < xmin)
|
if ( to_double(_k.compute_x_3_object()(*it)) < xmin)
|
||||||
xmin = to_double(k.compute_x_3_object()(*it));
|
xmin = to_double(_k.compute_x_3_object()(*it));
|
||||||
if ( to_double(k.compute_y_3_object()(*it)) < ymin)
|
if ( to_double(_k.compute_y_3_object()(*it)) < ymin)
|
||||||
ymin = to_double(k.compute_y_3_object()(*it));
|
ymin = to_double(_k.compute_y_3_object()(*it));
|
||||||
if ( to_double(k.compute_z_3_object()(*it)) < zmin)
|
if ( to_double(_k.compute_z_3_object()(*it)) < zmin)
|
||||||
zmin = to_double(k.compute_z_3_object()(*it));
|
zmin = to_double(_k.compute_z_3_object()(*it));
|
||||||
if ( to_double(k.compute_x_3_object()(*it)) > xmax)
|
if ( to_double(_k.compute_x_3_object()(*it)) > xmax)
|
||||||
xmax = to_double(k.compute_x_3_object()(*it));
|
xmax = to_double(_k.compute_x_3_object()(*it));
|
||||||
if ( to_double(k.compute_y_3_object()(*it)) > ymax)
|
if ( to_double(_k.compute_y_3_object()(*it)) > ymax)
|
||||||
ymax = to_double(k.compute_y_3_object()(*it));
|
ymax = to_double(_k.compute_y_3_object()(*it));
|
||||||
if ( to_double(k.compute_z_3_object()(*it)) > zmax)
|
if ( to_double(_k.compute_z_3_object()(*it)) > zmax)
|
||||||
zmax = to_double(k.compute_z_3_object()(*it));
|
zmax = to_double(_k.compute_z_3_object()(*it));
|
||||||
}
|
}
|
||||||
|
|
||||||
sort <0, false, false, false> (begin, end, xmin,ymin,zmin,xmax,ymax,zmax);
|
sort <0, false, false, false> (begin, end, xmin,ymin,zmin,xmax,ymax,zmax);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue