Skip to content

Commit

Permalink
fix msvc build
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jan 7, 2022
1 parent 01b61dc commit 93aa1fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/3d/qgs3dutils.cpp
Expand Up @@ -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() );
Expand Down

0 comments on commit 93aa1fc

Please sign in to comment.