src/gl/partrenderer.cpp

changeset 71
198d25fe4e21
parent 70
f21b800b02a4
child 73
97df974b5ed5
equal deleted inserted replaced
70:f21b800b02a4 71:198d25fe4e21
307 this->projectionMatrix, 307 this->projectionMatrix,
308 this->viewportVector); 308 this->viewportVector);
309 return toQPointF(glm::vec2{projected.x, this->height() - projected.y}); 309 return toQPointF(glm::vec2{projected.x, this->height() - projected.y});
310 } 310 }
311 311
312 geom::Line PartRenderer::cameraLine(const QPoint& point) const 312 geom::Line<3> PartRenderer::cameraLine(const QPoint& point) const
313 { 313 {
314 const glm::vec3 p1 = this->unproject({point.x(), point.y(), 0}); 314 const glm::vec3 p1 = this->unproject({point.x(), point.y(), 0});
315 const glm::vec3 p2 = this->unproject({point.x(), point.y(), 1}); 315 const glm::vec3 p2 = this->unproject({point.x(), point.y(), 1});
316 return geom::lineFromPoints(p1, p2); 316 return geom::lineFromPoints(p1, p2);
317 } 317 }

mercurial