1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0027919: Visualization - support multiple transformation persistence groups within single presentation

Added transform persistence property to Graphic3d_Group and Select3D_SensitiveEntity.
SelectMgr_ViewerSelector, Graphic3d_Layer and OpenGl_Structure have been updated
to process per-group transform persistence within picking, ZFit and rendering.

Added zoomable state to Prs3d_ArrowAspect supported by PrsDim_Dimension.

Added gp_GTrsf::SetMat4(), opposite to gp_GTrsf::GetMat4().
This commit is contained in:
nds
2021-07-19 13:31:05 +03:00
committed by bugmaster
parent ad3f20c684
commit 4e993e4d0d
27 changed files with 544 additions and 195 deletions

View File

@@ -15,6 +15,7 @@
#include <SelectMgr_SensitiveEntitySet.hxx>
#include <Graphic3d_TransformPers.hxx>
#include <Select3D_SensitiveEntity.hxx>
#include <SelectMgr_SensitiveEntity.hxx>
@@ -47,6 +48,10 @@ void SelectMgr_SensitiveEntitySet::Append (const Handle(SelectMgr_SensitiveEntit
{
addOwner (theEntity->BaseSensitive()->OwnerId());
}
if (!theEntity->BaseSensitive()->TransformPersistence().IsNull())
{
myHasEntityWithPersistence = Standard_True;
}
MarkDirty();
}
@@ -59,16 +64,21 @@ void SelectMgr_SensitiveEntitySet::Append (const Handle(SelectMgr_Selection)& th
{
for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSelection->Entities()); aSelEntIter.More(); aSelEntIter.Next())
{
if (!aSelEntIter.Value()->BaseSensitive()->IsKind (STANDARD_TYPE(Select3D_SensitiveEntity)))
const Handle(SelectMgr_SensitiveEntity)& aSensEnt = aSelEntIter.Value();
if (!aSensEnt->BaseSensitive()->IsKind (STANDARD_TYPE(Select3D_SensitiveEntity)))
{
aSelEntIter.Value()->ResetSelectionActiveStatus();
aSensEnt->ResetSelectionActiveStatus();
continue;
}
const Standard_Integer anExtent = mySensitives.Extent();
if (mySensitives.Add (aSelEntIter.Value()) > anExtent)
if (mySensitives.Add (aSensEnt) > anExtent)
{
addOwner (aSelEntIter.Value()->BaseSensitive()->OwnerId());
addOwner (aSensEnt->BaseSensitive()->OwnerId());
}
if (!aSensEnt->BaseSensitive()->TransformPersistence().IsNull())
{
myHasEntityWithPersistence = Standard_True;
}
}
MarkDirty();
@@ -107,7 +117,13 @@ void SelectMgr_SensitiveEntitySet::Remove (const Handle(SelectMgr_Selection)& th
//=======================================================================
Select3D_BndBox3d SelectMgr_SensitiveEntitySet::Box (const Standard_Integer theIndex) const
{
return GetSensitiveById (theIndex)->BaseSensitive()->BoundingBox();
const Handle(Select3D_SensitiveEntity)& aSensitive = GetSensitiveById (theIndex)->BaseSensitive();
if (!aSensitive->TransformPersistence().IsNull())
{
return Select3D_BndBox3d();
}
return aSensitive->BoundingBox();
}
//=======================================================================