vertex function of triangle use Has_qrt

add specialization of Qualified_result_of for Iso_cuboid

(added because I needed to have const ref on triangle points)
This commit is contained in:
Sébastien Loriot 2010-06-22 07:17:59 +00:00
parent 4069742707
commit 2a1e9fe728
2 changed files with 11 additions and 3 deletions

View File

@ -1837,7 +1837,7 @@ namespace CommonKernelFunctors {
}; };
template <typename K> template <typename K>
class Construct_vertex_3 class Construct_vertex_3 : Has_qrt
{ {
typedef typename K::Point_3 Point_3; typedef typename K::Point_3 Point_3;
typedef typename K::Segment_3 Segment_3; typedef typename K::Segment_3 Segment_3;
@ -2712,6 +2712,11 @@ namespace CommonKernelFunctors {
} // namespace CommonKernelFunctors } // namespace CommonKernelFunctors
template <class K>
struct Qualified_result_of<CommonKernelFunctors::Construct_vertex_3<K>,Iso_cuboid_3<K> > :
qrt_or_not<typename CommonKernelFunctors::Construct_vertex_3<K>,false>
{};
} //namespace CGAL } //namespace CGAL
#endif // CGAL_KERNEL_FUNCTION_OBJECTS_H #endif // CGAL_KERNEL_FUNCTION_OBJECTS_H

View File

@ -88,12 +88,15 @@ public:
return R().has_on_3_object()(*this, p); return R().has_on_3_object()(*this, p);
} }
Point_3 vertex(int i) const // TODO : use Qrt
typename Qualified_result_of<typename R::Construct_vertex_3, Triangle_3 >::type
vertex(int i) const
{ {
return R().construct_vertex_3_object()(*this, i); return R().construct_vertex_3_object()(*this, i);
} }
Point_3 operator[](int i) const // TODO : use Qrt typename Qualified_result_of<typename R::Construct_vertex_3, Triangle_3 >::type
operator[](int i) const
{ {
return vertex(i); return vertex(i);
} }