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:
@@ -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());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user