[linearfeature] Maintenance
This commit is contained in:
parent
7c052d1ed3
commit
c04eab3101
2 changed files with 531 additions and 614 deletions
File diff suppressed because it is too large
Load diff
|
@ -81,13 +81,14 @@
|
|||
#define LF_UNIDIR_GREEN (107)
|
||||
#define LF_UNIDIR_GREEN_AMBER (108)
|
||||
|
||||
|
||||
struct Marking {
|
||||
public:
|
||||
unsigned int type;
|
||||
unsigned int start_idx;
|
||||
unsigned int end_idx;
|
||||
};
|
||||
typedef std::vector<Marking*> MarkingList;
|
||||
typedef std::vector<std::shared_ptr<Marking>> MarkingList;
|
||||
|
||||
struct Lighting {
|
||||
public:
|
||||
|
@ -98,16 +99,17 @@ public:
|
|||
// 1 for unidirectional
|
||||
// 2 for bidirectional
|
||||
// 0 for omnidirectional
|
||||
int LightDirection()
|
||||
int LightDirection() const
|
||||
{
|
||||
if (type == 103 || type == 104)
|
||||
return 1;
|
||||
else if (type == 101 || type == 105)
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
typedef std::vector<Lighting*> LightingList;
|
||||
typedef std::vector<std::shared_ptr<Lighting>> LightingList;
|
||||
|
||||
class LinearFeature
|
||||
{
|
||||
|
@ -126,7 +128,7 @@ public:
|
|||
|
||||
~LinearFeature();
|
||||
|
||||
inline std::string GetDescription() { return description; }
|
||||
inline std::string GetDescription() const { return description; }
|
||||
|
||||
void AddNode(std::shared_ptr<BezNode> b)
|
||||
{
|
||||
|
@ -141,10 +143,10 @@ private:
|
|||
double width;
|
||||
|
||||
MarkingList marks;
|
||||
Marking* cur_mark;
|
||||
std::shared_ptr<Marking> cur_mark = nullptr;
|
||||
|
||||
LightingList lights;
|
||||
Lighting* cur_light;
|
||||
std::shared_ptr<Lighting> cur_light = nullptr;
|
||||
|
||||
void ConvertContour(const BezContour& src, bool closed);
|
||||
|
||||
|
|
Loading…
Reference in a new issue