1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +03:00

0031548: Visualization, SelectBasics_PickResult - include surface normal into picking details

SelectMgr_SortCriterion::Normal, SelectBasics_PickResult::SurfaceNormal() - added new property.
SelectMgr_RectangularFrustum::Overlaps() for triangle sets new normal property.
gp_GTrsf::GetMat4() - added conversion into NCollection_Mat4 similar to gp_Trsf::GetMat4().
This commit is contained in:
kgv
2020-05-05 01:23:41 +03:00
committed by bugmaster
parent 23fe70ec52
commit 2615c2d705
6 changed files with 85 additions and 22 deletions

View File

@@ -669,6 +669,7 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1,
const gp_XYZ aDiff = myNearPickedPnt.XYZ() - thePnt1.XYZ();
thePickResult.SetDepth (aTriangleNormal.Dot (aDiff) * myScale);
thePickResult.SetPickedPoint (thePnt1);
thePickResult.SetSurfaceNormal (aTriangleNormal);
return !theClipRange.IsClipped (thePickResult.Depth());
}
@@ -687,6 +688,7 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1,
{
thePickResult.SetDepth (myNearPickedPnt.Distance (aPtOnPlane) * myScale);
thePickResult.SetPickedPoint (aPtOnPlane);
thePickResult.SetSurfaceNormal (aTriangleNormal);
return !theClipRange.IsClipped (thePickResult.Depth());
}