1 #include "edge.h" |
1 #include "edge.h" |
2 |
2 |
3 linetypes::Edge::Edge( |
3 linetypes::Edge::Edge( |
4 const Vertex& point_1, |
4 const Point3D& point_1, |
5 const Vertex& point_2, |
5 const Point3D& point_2, |
6 const Color color_index) : |
6 const Color color_index) : |
7 ColoredObject{color_index}, |
7 ColoredObject{color_index}, |
8 point_1{point_1}, |
8 point_1{point_1}, |
9 point_2{point_2} {} |
9 point_2{point_2} {} |
10 |
10 |
11 linetypes::Edge::Edge(const QVector<Vertex>& vertices, const Color color) : |
11 linetypes::Edge::Edge(const QVector<Point3D>& vertices, const Color color) : |
12 ColoredObject{color}, |
12 ColoredObject{color}, |
13 point_1{vertices[0]}, |
13 point_1{vertices[0]}, |
14 point_2{vertices[1]} |
14 point_2{vertices[1]} |
15 { |
15 { |
16 } |
16 } |
32 -> SetPropertyResult |
32 -> SetPropertyResult |
33 { |
33 { |
34 switch (property) |
34 switch (property) |
35 { |
35 { |
36 case Property::Point1: |
36 case Property::Point1: |
37 point_1 = value.value<Vertex>(); |
37 point_1 = value.value<Point3D>(); |
38 return SetPropertyResult::Success; |
38 return SetPropertyResult::Success; |
39 case Property::Point2: |
39 case Property::Point2: |
40 point_2 = value.value<Vertex>(); |
40 point_2 = value.value<Point3D>(); |
41 return SetPropertyResult::Success; |
41 return SetPropertyResult::Success; |
42 default: |
42 default: |
43 return BaseClass::setProperty(property, value); |
43 return BaseClass::setProperty(property, value); |
44 } |
44 } |
45 } |
45 } |