namespace geode

namespace geode {

// namespaces

namespace geode::detail;

// typedefs

typedef ModuleLicenseChecker<SimplexRemesh> SimplexRemeshLicenseChecker;

// classes

class BRepGridMetric;
class BRepMetricConstraints;

template <index_t dimension>
class ConstantMetric;

template <index_t dimension>
class CustomGridMetric;

template <index_t dimension>
class GridMetric;

template <index_t dimension>
class Metric;

class SectionMetricConstraints;

// global variables

static constexpr char SimplexRemesh[] = "SimplexRemesh";

// global functions

OPENGEODE_LIBRARY(geode_simplexremesh_brep_api, SimplexRemeshBRep);
FORWARD_DECLARATION_DIMENSION_CLASS(Metric);
ALIAS_3D(Metric);
FORWARD_DECLARATION_DIMENSION_CLASS(Block);
ALIAS_3D(Block);

std::tuple<BRep, ModelCopyMapping> geode_simplexremesh_brep_api local_remesh(
    BRep& brep,
    const Metric3D& metric,
    std::vector<std::reference_wrapper<const Block3D>> blocks
    );

void geode_simplexremesh_brep_api mesh(BRep& brep, const Metric3D& metric);

std::tuple<BRep, ModelCopyMapping> geode_simplexremesh_brep_api remesh(
    BRep& brep,
    const Metric3D& metric
    );

FORWARD_DECLARATION_DIMENSION_CLASS(RegularGrid);
ALIAS_3D(RegularGrid);
FORWARD_DECLARATION_DIMENSION_CLASS(Corner);
FORWARD_DECLARATION_DIMENSION_CLASS(Line);
FORWARD_DECLARATION_DIMENSION_CLASS(Surface);
ALIAS_3D(Corner);
ALIAS_3D(Line);
ALIAS_3D(Surface);
OPENGEODE_LIBRARY(geode_simplexremesh_metric_api, SimplexRemeshMetric);
ALIAS_2D_AND_3D(ConstantMetric);
ALIAS_2D_AND_3D(CustomGridMetric);
FORWARD_DECLARATION_DIMENSION_CLASS(EdgedCurve);
FORWARD_DECLARATION_DIMENSION_CLASS(PointSet);
FORWARD_DECLARATION_DIMENSION_CLASS(Segment);
FORWARD_DECLARATION_DIMENSION_CLASS(Triangle);
FORWARD_DECLARATION_DIMENSION_CLASS(TriangulatedSurface);
ALIAS_2D_AND_3D(GridMetric);
FORWARD_DECLARATION_DIMENSION_CLASS(Point);
ALIAS_2D_AND_3D(Metric);
ALIAS_2D(Corner);
ALIAS_2D(Line);
ALIAS_2D(Metric);
ALIAS_2D(Surface);
OPENGEODE_LIBRARY(geode_simplexremesh_section_api, SimplexRemeshSection);

std::tuple<Section, ModelCopyMapping> geode_simplexremesh_section_api remesh(
    Section& section,
    const Metric2D& metric
    );

} // namespace geode