From afe76db288538da0f97bdc1f57210349878afa99 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Fri, 13 Dec 2024 16:07:24 -0600 Subject: [PATCH] Gui: Rename variable to eliminate macro conflict Windows.h defines 'near' and 'far' macros, and they are actually used in the Inventor codebase (so we can't just undefine them). --- src/Gui/View3DInventor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Gui/View3DInventor.cpp b/src/Gui/View3DInventor.cpp index f518c9e1f2..d56e717435 100644 --- a/src/Gui/View3DInventor.cpp +++ b/src/Gui/View3DInventor.cpp @@ -788,7 +788,7 @@ RayPickInfo View3DInventor::getObjInfoRay(Base::Vector3d* startvec, Base::Vector vdy = dirvec->y; vdz = dirvec->z; // near plane clipping is required to avoid false intersections - float near = 0.1; + float nearClippingPlane = 0.1; RayPickInfo ret = {false, Base::Vector3d(), @@ -798,7 +798,7 @@ RayPickInfo View3DInventor::getObjInfoRay(Base::Vector3d* startvec, Base::Vector std::nullopt, std::nullopt}; SoRayPickAction action(getViewer()->getSoRenderManager()->getViewportRegion()); - action.setRay(SbVec3f(vsx, vsy, vsz), SbVec3f(vdx, vdy, vdz), near); + action.setRay(SbVec3f(vsx, vsy, vsz), SbVec3f(vdx, vdy, vdz), nearClippingPlane); action.apply(getViewer()->getSoRenderManager()->getSceneGraph()); SoPickedPoint* Point = action.getPickedPoint();