src/gl/partrenderer.cpp

changeset 60
0f221121849b
parent 59
60650929dc82
child 61
4585d8d7a7ec
equal deleted inserted replaced
59:60650929dc82 60:0f221121849b
319 const glm::vec3 projected = glm::project( 319 const glm::vec3 projected = glm::project(
320 point, 320 point,
321 this->viewMatrix * glm::mat4_cast(this->modelQuaternion), 321 this->viewMatrix * glm::mat4_cast(this->modelQuaternion),
322 this->projectionMatrix, 322 this->projectionMatrix,
323 this->viewportVector); 323 this->viewportVector);
324 return {projected.x, this->height() - projected.y}; 324 return toQPointF(glm::vec2{projected.x, this->height() - projected.y});
325 } 325 }
326 326
327 /** 327 /**
328 * @brief Unprojects the specified window coordinates to model coordinates 328 * @brief Unprojects the specified window coordinates to model coordinates
329 * @param win Window coordinates to project. Z-coordinate indicates depth 329 * @param win Window coordinates to project. Z-coordinate indicates depth

mercurial