/* * BoundaryLineSet.hpp * * Created on: Jul 29, 2010 * Author: heber */ #ifndef BOUNDARYLINESET_HPP_ #define BOUNDARYLINESET_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "BoundaryMaps.hpp" #include #include class BoundaryLineSet; class BoundaryPointSet; class BoundaryTriangleSet; class BoundaryLineSet { public: BoundaryLineSet(); BoundaryLineSet(BoundaryPointSet * const Point[2], const int number); BoundaryLineSet(BoundaryPointSet * const Point1, BoundaryPointSet * const Point2, const int number); ~BoundaryLineSet(); void AddTriangle(BoundaryTriangleSet * const triangle); bool IsConnectedTo(const BoundaryLineSet * const line) const; bool ContainsBoundaryPoint(const BoundaryPointSet * const point) const; bool CheckConvexityCriterion() const; double CalculateConvexity() const; class BoundaryPointSet *GetOtherEndpoint(const BoundaryPointSet * const point) const; class BoundaryTriangleSet *GetOtherTriangle(const BoundaryTriangleSet * const triangle) const; class BoundaryPointSet *endpoints[2]; TriangleMap triangles; int Nr; bool skipped; }; std::ostream & operator << (std::ostream &ost, const BoundaryLineSet &a); template void SetEndpointsOrdered(T endpoints[2], T endpoint1, T endpoint2) { if (endpoint1->Nr < endpoint2->Nr) { endpoints[0] = endpoint1; endpoints[1] = endpoint2; } else { endpoints[0] = endpoint2; endpoints[1] = endpoint1; } }; #endif /* BOUNDARYLINESET_HPP_ */