Skip to content
Permalink
Browse files
fix msvc build
  • Loading branch information
jef-n committed Jan 7, 2022
1 parent 01b61dc commit 93aa1fc4de03ccc5c328eacd6de25741859ab89a
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/3d/qgs3dutils.cpp
@@ -645,9 +645,9 @@ QgsRay3D Qgs3DUtils::rayFromScreenPoint( const QPoint &point, const QSize &windo

QVector3D Qgs3DUtils::screenPointToWorldPos( const QPoint &screenPoint, double depth, const QSize &screenSize, Qt3DRender::QCamera *camera )
{
double near = camera->nearPlane();
double far = camera->farPlane();
double distance = ( 2.0 * near * far ) / ( far + near - ( depth * 2 - 1 ) * ( far - near ) );
double dNear = camera->nearPlane();
double dFar = camera->farPlane();
double distance = ( 2.0 * dNear * dFar ) / ( dFar + dNear - ( depth * 2 - 1 ) * ( dFar - dNear ) );

QgsRay3D ray = Qgs3DUtils::rayFromScreenPoint( screenPoint, screenSize, camera );
double dot = QVector3D::dotProduct( ray.direction(), camera->viewVector().normalized() );

0 comments on commit 93aa1fc

Please sign in to comment.