1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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

@@ -134,12 +134,8 @@ public:
//! Updates outdated BVH trees and remembers the last state of the
//! camera view-projection matrices and viewport (window) dimensions.
Standard_EXPORT void UpdateBVH (const Handle(Graphic3d_Camera)& theCamera,
const Graphic3d_Mat4d& theProjectionMat,
const Graphic3d_Mat4d& theWorldViewMat,
const Graphic3d_WorldViewProjState& theViewState,
const Standard_Integer theViewportWidth,
const Standard_Integer theViewportHeight);
Standard_EXPORT void UpdateBVH (const Handle(Graphic3d_Camera)& theCam,
const Graphic3d_Vec2i& theWinSize);
//! Marks every BVH subset for update.
Standard_EXPORT void MarkDirty();
@@ -190,6 +186,15 @@ private:
{
if (theObject->TransformPersistence().IsNull())
{
const PrsMgr_Presentations& aPresentations = theObject->Presentations();
for (PrsMgr_Presentations::Iterator aPrsIter (aPresentations); aPrsIter.More(); aPrsIter.Next())
{
const Handle(PrsMgr_Presentation)& aPrs3d = aPrsIter.ChangeValue();
if (aPrs3d->CStructure()->HasGroupTransformPersistence())
{
return SelectMgr_SelectableObjectSet::BVHSubset_3dPersistent;
}
}
return SelectMgr_SelectableObjectSet::BVHSubset_3d;
}
else if (theObject->TransformPersistence()->Mode() == Graphic3d_TMF_2d)
@@ -221,9 +226,8 @@ private:
opencascade::handle<BVH_Tree<Standard_Real, 3> > myBVH[BVHSubsetNb]; //!< BVH tree computed for each subset
Handle(Select3D_BVHBuilder3d) myBuilder[BVHSubsetNb]; //!< Builder allocated for each subset
Standard_Boolean myIsDirty[BVHSubsetNb]; //!< Dirty flag for each subset
Graphic3d_WorldViewProjState myLastViewState; //!< Last view-projection state used for construction of BVH
Standard_Integer myLastWidth; //!< Last viewport's (window's) width used for construction of BVH
Standard_Integer myLastHeight; //!< Last viewport's (window's) height used for construction of BVH
Graphic3d_WorldViewProjState myLastViewState; //!< Last view-projection state used for construction of BVH
Graphic3d_Vec2i myLastWinSize; //!< Last viewport's (window's) width used for construction of BVH
friend class Iterator;
};