mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0026719: Visualization - cannot pick zoom persistent object
- trsf matrix scale factor is now taken into account in depth and distance calculation in selection; - fixed trsf matrix application error in frustum cache in SelectMgr_ViewerSelector; - fixed multiple errors in vstate output; - test cases for issue #26719.
This commit is contained in:
@@ -269,27 +269,26 @@ void SelectMgr_ViewerSelector::computeFrustum (const Handle(SelectBasics_Sensiti
|
||||
SelectMgr_FrustumCache& theCachedMgrs,
|
||||
SelectMgr_SelectingVolumeManager& theResMgr)
|
||||
{
|
||||
Standard_Integer aScale = 1;
|
||||
const Standard_Boolean toScale = isToScaleFrustum (theEnt);
|
||||
if (toScale)
|
||||
Standard_Integer aScale = isToScaleFrustum (theEnt) ? sensitivity (theEnt) : 1;
|
||||
const gp_Trsf aTrsfMtr = theEnt->HasInitLocation() ? theEnt->InvInitLocation() * theInvTrsf : theInvTrsf;
|
||||
const Standard_Boolean toScale = aScale != 1;
|
||||
const Standard_Boolean toTransform = aTrsfMtr.Form() != gp_Identity;
|
||||
if (toScale && toTransform)
|
||||
{
|
||||
aScale = sensitivity (theEnt);
|
||||
}
|
||||
if (theEnt->HasInitLocation())
|
||||
{
|
||||
theResMgr =
|
||||
mySelectingVolumeMgr.ScaleAndTransform (aScale, theEnt->InvInitLocation() * theInvTrsf);
|
||||
theResMgr = mySelectingVolumeMgr.ScaleAndTransform (aScale, aTrsfMtr);
|
||||
}
|
||||
else if (toScale)
|
||||
{
|
||||
if (!theCachedMgrs.IsBound (aScale))
|
||||
{
|
||||
theCachedMgrs.Bind (aScale,
|
||||
mySelectingVolumeMgr.ScaleAndTransform(aScale, theInvTrsf));
|
||||
theCachedMgrs.Bind (aScale, mySelectingVolumeMgr.ScaleAndTransform (aScale, gp_Trsf()));
|
||||
}
|
||||
|
||||
theResMgr = theCachedMgrs.Find (aScale);
|
||||
}
|
||||
else if (toTransform)
|
||||
{
|
||||
theResMgr = mySelectingVolumeMgr.ScaleAndTransform (1, aTrsfMtr);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
Reference in New Issue
Block a user