Skip to content

File isValid.h

File List > algorithm > isValid.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_ISVALID_H_
#define _SFCGAL_ALGORITHM_ISVALID_H_

#include "SFCGAL/Geometry.h"
#include "SFCGAL/Validity.h"
#include "SFCGAL/algorithm/force2D.h"
#include "SFCGAL/algorithm/force3D.h"

namespace SFCGAL {

void SFCGAL_API
SFCGAL_ASSERT_GEOMETRY_VALIDITY(const Geometry &g);
void SFCGAL_API
SFCGAL_ASSERT_GEOMETRY_VALIDITY_2D(const Geometry &g);
void SFCGAL_API
SFCGAL_ASSERT_GEOMETRY_VALIDITY_3D(const Geometry &g);
void SFCGAL_API
SFCGAL_ASSERT_GEOMETRY_VALIDITY_ON_PLANE(const Geometry &g);

namespace algorithm {

SFCGAL_API const Validity
isValid(const Geometry &g, const double &toleranceAbs = 1e-9);

SFCGAL_API void
propagateValidityFlag(Geometry &g, bool valid);

struct NoValidityCheck {};

} // namespace algorithm
} // namespace SFCGAL

#endif