DartConstraint.h 1.01 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef OERSTED_DARTCONSTRAINT_H
#define OERSTED_DARTCONSTRAINT_H

#include <cstddef>
#include <memory>

#include "Sketch.hpp"

#include "BoundaryConstraint.h"

class DartConstraint {
public:
    DartConstraint(double s0, double s1, std::shared_ptr<BoundaryConstraint> bc, size_t self) : S0{s0}, S1{s1}, Constraint{bc}, Self{self}, ForwardDart{SIZE_MAX}, ReverseDart{SIZE_MAX} {};
    std::shared_ptr<BoundaryConstraint> boundary_constraint() const { return Constraint; };

    std::shared_ptr<Curve const> constraint_curve() const { return Constraint->curve(); };

    size_t self() const { return Self; };

    size_t forward_dart() const { return ForwardDart; };

    size_t reverse_dart() const { return ReverseDart; };

    void forward_dart(size_t d) { ForwardDart = d; };

    void reverse_dart(size_t d) { ReverseDart = d; };

    double S0;
    double S1;

    size_t Self;

    size_t ForwardDart;
    size_t ReverseDart;

protected:
    std::shared_ptr<BoundaryConstraint> Constraint;
};

#endif //OERSTED_DARTCONSTRAINT_H