src/linetypes/conditionaledge.cpp

changeset 18
918b6c0f8b5b
parent 14
20d2ed3af73d
child 33
4c41bfe2ec6e
equal deleted inserted replaced
17:a5111f4e6412 18:918b6c0f8b5b
1 #include "conditionaledge.h" 1 #include "conditionaledge.h"
2 2
3 linetypes::ConditionalEdge::ConditionalEdge( 3 linetypes::ConditionalEdge::ConditionalEdge(
4 const Vertex& point_1, 4 const Point3D& point_1,
5 const Vertex& point_2, 5 const Point3D& point_2,
6 const Vertex& controlPoint_1, 6 const Point3D& controlPoint_1,
7 const Vertex& controlPoint_2, 7 const Point3D& controlPoint_2,
8 const Color color_index) : 8 const Color color_index) :
9 Edge{point_1, point_2, color_index}, 9 Edge{point_1, point_2, color_index},
10 controlPoint_1{controlPoint_1}, 10 controlPoint_1{controlPoint_1},
11 controlPoint_2{controlPoint_2} 11 controlPoint_2{controlPoint_2}
12 { 12 {
13 } 13 }
14 14
15 linetypes::ConditionalEdge::ConditionalEdge(const QVector<Vertex>& vertices, const Color color) : 15 linetypes::ConditionalEdge::ConditionalEdge(const QVector<Point3D>& vertices, const Color color) :
16 Edge{vertices[0], vertices[1], color}, 16 Edge{vertices[0], vertices[1], color},
17 controlPoint_1{vertices[2]}, 17 controlPoint_1{vertices[2]},
18 controlPoint_2{vertices[3]} 18 controlPoint_2{vertices[3]}
19 { 19 {
20 } 20 }
38 -> SetPropertyResult 38 -> SetPropertyResult
39 { 39 {
40 switch (property) 40 switch (property)
41 { 41 {
42 case Property::ControlPoint1: 42 case Property::ControlPoint1:
43 controlPoint_1 = value.value<Vertex>(); 43 controlPoint_1 = value.value<Point3D>();
44 case Property::ControlPoint2: 44 case Property::ControlPoint2:
45 controlPoint_2 = value.value<Vertex>(); 45 controlPoint_2 = value.value<Point3D>();
46 default: 46 default:
47 return Edge::setProperty(property, value); 47 return Edge::setProperty(property, value);
48 } 48 }
49 } 49 }
50 50

mercurial