mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0026641: Visualization, TKOpenGl - handle correctly transformation persistence within perspective projection.
Add a new method AIS_InteractiveContext::SetTransformPersistence, which sets transform persistence to object and selection. Add a new method SelectMgr_SelectionManager::UpdateSelection, which re-adds selectable object in BVHs in all viewer selectors. Add a new method SelectMgr_ViewerSelector::MoveSelectableObject, which moves object from set of not transform persistence objects to set of transform persistence objects (or vice versa). Add a new method Graphic3d_TransformUtils::Convert, which converts gp_Trsf to Graphic3d_Mat4. Remove the method PrsMgr_PresentableObject::SetTransformPersistence(flag, point).
This commit is contained in:
@@ -322,6 +322,7 @@ void SelectMgr_ViewerSelector::traverseObject (const Handle(SelectMgr_Selectable
|
||||
{
|
||||
const Graphic3d_Mat4d& aProjection = mySelectingVolumeMgr.ProjectionMatrix();
|
||||
const Graphic3d_Mat4d& aWorldView = mySelectingVolumeMgr.WorldViewMatrix();
|
||||
|
||||
Standard_Integer aViewportWidth;
|
||||
Standard_Integer aViewportHeight;
|
||||
mySelectingVolumeMgr.WindowSize (aViewportWidth, aViewportHeight);
|
||||
@@ -810,6 +811,27 @@ void SelectMgr_ViewerSelector::AddSelectionToObject (const Handle(SelectMgr_Sele
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : MoveSelectableObject
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void SelectMgr_ViewerSelector::MoveSelectableObject (const Handle(SelectMgr_SelectableObject)& theObject)
|
||||
{
|
||||
if (!mySelectableObjects.Remove (theObject))
|
||||
{
|
||||
mySelectableObjectsTrsfPers.Remove (theObject);
|
||||
}
|
||||
|
||||
if (!theObject->TransformPersistence().Flags)
|
||||
{
|
||||
mySelectableObjects.Append (theObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
mySelectableObjectsTrsfPers.Append (theObject);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : RemoveSelectableObject
|
||||
// purpose : Removes selectable object from map of selectable ones
|
||||
|
Reference in New Issue
Block a user