Add Angle_3(Vector_3, Vector_3)

...by similarity with Angle_2.
This commit is contained in:
Laurent Rineau
2014-05-21 12:18:49 +02:00
parent 191b01b13b
commit 6500bd907f
6 changed files with 47 additions and 4 deletions
@@ -86,6 +86,7 @@ namespace HomogeneousKernelFunctors {
class Angle_3
{
typedef typename K::Point_3 Point_3;
typedef typename K::Vector_3 Vector_3;
typedef typename K::Construct_vector_3 Construct_vector_3;
Construct_vector_3 c;
public:
@@ -94,6 +95,11 @@ namespace HomogeneousKernelFunctors {
Angle_3() {}
Angle_3(const Construct_vector_3& c_) : c(c_) {}
result_type
operator()(const Vector_3& u, const Vector_3& v) const
{ return enum_cast<Angle>(CGAL_NTS sign(u * v)); }
// FIXME: scalar product
result_type
operator()(const Point_3& p, const Point_3& q, const Point_3& r) const
{ return enum_cast<Angle>(CGAL_NTS sign(c(q,p) * c(q,r))); }