Skip to content

File algorithm/orientation.h

File List > algorithm > orientation.h

Go to the documentation of this file

// Copyright (c) 2012-2013, IGN France.
// Copyright (c) 2012-2022, Oslandia.
// SPDX-License-Identifier: LGPL-2.0-or-later

#ifndef _SFCGAL_ALGORITHM_ORIENTATION_H_
#define _SFCGAL_ALGORITHM_ORIENTATION_H_

#include "SFCGAL/config.h"

#include "SFCGAL/Geometry.h"
#include "SFCGAL/Kernel.h"

#include <CGAL/Polygon_2.h>
#include <CGAL/Polygon_with_holes_2.h>

namespace SFCGAL {
namespace algorithm {

SFCGAL_API void
makeValidOrientation(CGAL::Polygon_2<Kernel> &polygon);
SFCGAL_API void
makeValidOrientation(CGAL::Polygon_with_holes_2<Kernel> &polygon);
SFCGAL_API void
makeValidOrientation(Polygon &polygon);

SFCGAL_API bool
hasConsistentOrientation3D(const TriangulatedSurface &g);
SFCGAL_API bool
hasConsistentOrientation3D(const PolyhedralSurface &g);

SFCGAL_API void
makeConsistentOrientation3D(TriangulatedSurface &g);

SFCGAL_API bool
isCounterClockWiseOriented(const Polygon &);

SFCGAL_API bool
isCounterClockWiseOriented(const Triangle &);

SFCGAL_API bool
isCounterClockWiseOriented(const LineString &);

} // namespace algorithm
} // namespace SFCGAL

#endif