src/linetypes/edge.cpp

changeset 81
62373840e33a
parent 77
028798a72591
child 86
4bec0525ef1b
equal deleted inserted replaced
80:764381756899 81:62373840e33a
54 GetPolygonsContext* context) const 54 GetPolygonsContext* context) const
55 { 55 {
56 Q_UNUSED(context) 56 Q_UNUSED(context)
57 polygons.push_back(gl::edgeLine(this->point_1, this->point_2, this->colorIndex, this->id)); 57 polygons.push_back(gl::edgeLine(this->point_1, this->point_2, this->colorIndex, this->id));
58 } 58 }
59
60 int ldraw::Edge::numPoints() const
61 {
62 return 2;
63 }
64
65 const glm::vec3& ldraw::Edge::getPoint(int index) const
66 {
67 switch (index)
68 {
69 case 0:
70 return this->point_1;
71 case 1:
72 return this->point_2;
73 default:
74 return ldraw::ColoredObject::getPoint(index);
75 }
76 }

mercurial