member functions on Circle_3

This commit is contained in:
Pedro Machado Manhaes de Castro 2008-10-02 16:19:04 +00:00
parent f39a5d6cd4
commit a8647958ae
2 changed files with 27 additions and 0 deletions

View File

@ -130,6 +130,32 @@ public:
return typename R::Construct_bbox_3()(*this); return typename R::Construct_bbox_3()(*this);
} }
FT area_divided_by_pi() const
{
return typename R::Compute_area_divided_by_pi_3()(*this);
}
double approximate_area() const
{
return typename R::Compute_approximate_area_3()(*this);
}
FT squared_length_divided_by_pi_square() const
{
return typename R::Compute_squared_length_divided_by_pi_square_3()(*this);
}
double approximate_squared_length() const
{
return typename R::Compute_approximate_squared_length_3()(*this);
}
typename R::Boolean
has_on(const Point_3 &p) const
{
return rep().has_on(p);
}
}; };
template < typename R > template < typename R >

View File

@ -335,6 +335,7 @@ void _test_has_on_predicate(const K &k) {
assert(theHas_on_3(c_1,p_1_c_1)); assert(theHas_on_3(c_1,p_1_c_1));
assert(theHas_on_3(c_1,p_2_c_1)); assert(theHas_on_3(c_1,p_2_c_1));
assert(!theHas_on_3(c_1,p_3_c_1)); assert(!theHas_on_3(c_1,p_3_c_1));
assert(!c_1.has_on(p_3_c_1));
std::cout << "Testing has_on(Sphere,Circle)..." << std::endl; std::cout << "Testing has_on(Sphere,Circle)..." << std::endl;
assert(theHas_on_3(s_1,c_1)); assert(theHas_on_3(s_1,c_1));