// revision : 2.8 // revision_date : 28 Oct 1999 // author(s) : Hervé Brönnimann #ifndef CGAL_TETRAHEDRON_D_H #define CGAL_TETRAHEDRON_D_H #ifndef CGAL_REP_CLASS_DEFINED #error no representation class defined #endif // CGAL_REP_CLASS_DEFINED #ifdef CGAL_HOMOGENEOUS_H #include #endif // CGAL_HOMOGENEOUS_H #ifdef CGAL_CARTESIAN_H #include #endif // CGAL_CARTESIAN_H #include CGAL_BEGIN_NAMESPACE template class Tetrahedron_d : public _R::Tetrahedron_d_base { public: typedef _R R; typedef typename R::RT RT; typedef typename R::FT FT; typedef typename R::Tetrahedron_d_base RTetrahedron_d; Tetrahedron_d() : RTetrahedron_d() {} Tetrahedron_d(const CGAL::Tetrahedron_d& t) : RTetrahedron_d(t) {} Tetrahedron_d(const RTetrahedron_d& t) : RTetrahedron_d(t) {} Tetrahedron_d(const CGAL::Point_d& p, const CGAL::Point_d& q, const CGAL::Point_d& r, const CGAL::Point_d& s) : RTetrahedron_d(p,q,r,s) {} CGAL::Tetrahedron_d& operator=(const CGAL::Tetrahedron_d& t) { RTetrahedron_d::operator=(t); return *this; } CGAL::Point_d vertex(int i) const { return RTetrahedron_d::vertex(i); } CGAL::Point_d operator[](int i) const { return vertex(i); } bool operator==(const CGAL::Tetrahedron_d& t) const { return RTetrahedron_d::operator==(t); } bool operator!=(const CGAL::Tetrahedron_d& t) const { return !(*this == t); } int id() const /* XXX */ { return (int)PTR ; } /* Bbox_d bbox() const { return vertex(0).bbox() + vertex(1).bbox() + vertex(2).bbox() + vertex(3).bbox(); } CGAL::Tetrahedron_d transform(const CGAL::Aff_transformation_d& t) const { return CGAL::Tetrahedron_d(RTetrahedron_d::transform(t)); } */ Orientation orientation() const { return RTetrahedron_d::orientation(); } Oriented_side oriented_side(const CGAL::Point_d& p) const { return RTetrahedron_d::oriented_side(p); } bool has_on_positive_side(const CGAL::Point_d& p) const { return oriented_side(p) == ON_POSITIVE_SIDE; } bool has_on_negative_side(const CGAL::Point_d& p) const { return oriented_side(p) == ON_NEGATIVE_SIDE; } Bounded_side bounded_side(const CGAL::Point_d& p) const { return RTetrahedron_d::bounded_side(p); } bool has_on_boundary(const CGAL::Point_d& p) const { return bounded_side(p) == ON_BOUNDARY; } bool has_on_bounded_side(const CGAL::Point_d& p) const { return bounded_side(p) == ON_BOUNDED_SIDE; } bool has_on_unbounded_side(const CGAL::Point_d& p) const { return bounded_side(p) == ON_UNBOUNDED_SIDE; } bool is_degenerate() const { return RTetrahedron_d::is_degenerate(); } }; #ifndef NO_OSTREAM_INSERT_TETRAHEDRON_D template < class R > std::ostream& operator<<(std::ostream& os, const Tetrahedron_d& t) { typedef typename R::Tetrahedron_d_base RTetrahedron_d; return os << (const RTetrahedron_d& )t; } #endif // NO_OSTREAM_INSERT_TETRAHEDRON_D #ifndef NO_ISTREAM_EXTRACT_TETRAHEDRON_D template < class R > std::istream& operator>>(std::istream& is, Tetrahedron_d& t) { typedef typename R::Tetrahedron_d_base RTetrahedron_d; return is >> (RTetrahedron_d& )t; } #endif // NO_ISTREAM_EXTRACT_TETRAHEDRON_D CGAL_END_NAMESPACE #endif // CGAL_TETRAHEDRON_D_H