BoundaryConstraint.h 1.09 KB
Newer Older
1
2
3
4
5
6
7
8
#ifndef OERSTED_BOUNDARYCONSTRAINT_H
#define OERSTED_BOUNDARYCONSTRAINT_H

#include <cstddef>
#include <vector>

#include "Sketch.hpp"

9
10
11
12
#include "InsertionQueuer.h"

class DartConstraint;

13
14
15
16
class BoundaryConstraint {
public:
    BoundaryConstraint(std::shared_ptr<Curve const> cc) : ConstraintCurve(cc) {};

17
    void add_dart_constraint(size_t d) { DartConstraints.push_back(d); }; // TODO: Enforce uniqueness (std::set?)
18
19
20

    std::shared_ptr<Curve const> curve() const { return ConstraintCurve; };

21
22
23
24
25
26
27
28
29
30
    bool uniform_discretizaiton() const { return UniformDiscretization; };

    void uniform_discretization(bool flag) { UniformDiscretization = flag; };

    void add_to_queue(std::vector<std::unique_ptr<InsertionQueuer>> &queue, std::vector<DartConstraint> &constraints, size_t dart);

    size_t size_dart_constraints() const {return DartConstraints.size(); };

    size_t dart(size_t i) const {return DartConstraints[i]; };

31
protected:
32
    std::vector<size_t> DartConstraints;
33
    std::shared_ptr<Curve const> ConstraintCurve;
34
35

    bool UniformDiscretization{false};
36
37
38
39
};


#endif //OERSTED_BOUNDARYCONSTRAINT_H