Add output_weighted_point

This commit is contained in:
Clement Jamin 2015-01-12 11:10:33 +01:00
parent bb654aec95
commit 10f7b688eb
1 changed files with 20 additions and 0 deletions

View File

@ -46,6 +46,26 @@ output_point(std::ostream & os, const Traits &traits, const P & p)
}
}
// TODO: test if the stream is binary or text?
template<typename Traits, typename P>
void
output_weighted_point(std::ostream & os, const Traits &traits, const P & p,
bool output_weight = true)
{
typedef typename Traits::Compute_coordinate_d Ccd;
typename Traits::Point_drop_weight_d drop_w =
traits.point_drop_weight_d_object();
typename Traits::Point_weight_d pt_weight = traits.point_weight_d_object();
const Ccd ccd = traits.compute_coordinate_d_object();
const int dim = traits.point_dimension_d_object()(p);
if (dim > 0)
{
output_point(os, traits, p);
if (output_weight)
os << " " << pt_weight(p);
}
}
// TODO: test if the stream is binary or text?
/*template<typename Traits, typename P>
void