381 * @return vector |
381 * @return vector |
382 */ |
382 */ |
383 glm::vec3 Canvas::cameraVector() const |
383 glm::vec3 Canvas::cameraVector() const |
384 { |
384 { |
385 // Find out where the grid is projected on the screen |
385 // Find out where the grid is projected on the screen |
386 const QPoint gridOrigin2d = pointFToPoint(this->modelToScreenCoordinates(this->gridPlane.anchor)); |
386 const QPointF gridOrigin2d = this->modelToScreenCoordinates(this->gridPlane.anchor); |
387 // Find out which direction the camera is looking at the grid origin in 3d |
387 // Find out which direction the camera is looking at the grid origin in 3d |
388 return glm::normalize(this->cameraLine(gridOrigin2d).direction); |
388 return glm::normalize(this->cameraLine(gridOrigin2d).direction); |
389 } |
389 } |
390 |
390 |
391 /** |
391 /** |