// Copyright (c) 2005-2008 Max-Planck-Institute Saarbruecken (Germany). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // // $URL: https://github.com/CGAL/cgal/blob/v5.1/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/PointMark.h $ // $Id: PointMark.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Peter Hachenberger #ifndef CGAL_MS3_POINTMARK_H #define CGAL_MS3_POINTMARK_H #include namespace CGAL { template class PointMark { typedef typename K::Point_3 Point_3; typedef PointMark Self; Point_3 p; bool b; public: PointMark() : p(0,0,0), b(true) {} PointMark(const Self& pm) { p = pm.p; b = pm.b; } PointMark(const Point_3& p_, bool b_) : p(p_), b(b_) {} Self& operator=(const Self& pm) { p = pm.p; b = pm.b; return *this; } Self& operator+=(const Self& pm) { p = p + (pm.p - CGAL::ORIGIN); b = b && pm.b; return *this; } Point_3 point() const { return p; } bool boolean() const { return b; } void set_boolean(bool b_) { b = b_; } }; template std::ostream& operator<<(std::ostream& out, const PointMark& pm) { out << pm.point() << "/" << pm.boolean(); return out; } template bool operator==(const PointMark& pm1, const PointMark& pm2) { return pm1.point() == pm2.point() && pm1.boolean() == pm2.boolean(); } template const PointMark operator+(const PointMark& pm1, const PointMark& pm2) { PointMark ret(pm1); ret += pm2; return ret; } } //namespace CGAL #endif