-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasefunctionsystem.h
More file actions
43 lines (34 loc) · 963 Bytes
/
Copy pathbasefunctionsystem.h
File metadata and controls
43 lines (34 loc) · 963 Bytes
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
41
42
43
#ifndef BASEFUNCTIONSYSTEM_H
#define BASEFUNCTIONSYSTEM_H
#include "matrix3.h"
#include "treeskeleton.h"
class BaseFunctionSystem
{
public:
BaseFunctionSystem() = default;
virtual ~BaseFunctionSystem() = default;
virtual segment_arr_t transform(std::shared_ptr<TreeSegment> segment) const = 0;
};
class HondaFunctionSystem : public BaseFunctionSystem
{
public:
HondaFunctionSystem(double kw, double kh);
~HondaFunctionSystem() = default;
segment_arr_t transform(std::shared_ptr<TreeSegment> segment) const override;
private:
float get_alpha() const;
double _kw;
double _kh;
};
class TernaryFunctionSystem : public BaseFunctionSystem
{
public:
TernaryFunctionSystem(double kw, double kh);
~TernaryFunctionSystem() = default;
segment_arr_t transform(std::shared_ptr<TreeSegment> segment) const override;
private:
float get_alpha() const;
double _kw;
double _kh;
};
#endif // BASEFUNCTIONSYSTEM_H