mirror of https://github.com/CGAL/cgal
Remove useless if.
This commit is contained in:
parent
4a6aa7e024
commit
0010df67e6
|
|
@ -885,11 +885,8 @@ CGAL_INLINE_FUNCTION
|
||||||
Vec Camera::pointUnderPixel(const QPoint &pixel, bool &found) const {
|
Vec Camera::pointUnderPixel(const QPoint &pixel, bool &found) const {
|
||||||
float depth = 2.0;
|
float depth = 2.0;
|
||||||
// Qt uses upper corner for its origin while GL uses the lower corner.
|
// Qt uses upper corner for its origin while GL uses the lower corner.
|
||||||
if(parent())
|
|
||||||
{
|
|
||||||
dynamic_cast<QOpenGLFunctions*>(parent())->glReadPixels(pixel.x(), screenHeight() - 1 - pixel.y(), 1, 1,
|
dynamic_cast<QOpenGLFunctions*>(parent())->glReadPixels(pixel.x(), screenHeight() - 1 - pixel.y(), 1, 1,
|
||||||
GL_DEPTH_COMPONENT, GL_FLOAT, &depth);
|
GL_DEPTH_COMPONENT, GL_FLOAT, &depth);
|
||||||
}
|
|
||||||
found = depth < 1.0;
|
found = depth < 1.0;
|
||||||
Vec point(pixel.x(), pixel.y(), depth);
|
Vec point(pixel.x(), pixel.y(), depth);
|
||||||
point = unprojectedCoordinatesOf(point);
|
point = unprojectedCoordinatesOf(point);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue