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

0024623: Visualization - improve selection mechanism

Redesign of selection mechanism:
- implemented 3-level BVH tree for selection;
- selection now calculates in 3D space;
- intersection tests were moved to SelectMgr_BaseFrustum descendants;
- removed .cdl files in Select3D and .cdl related to selection in MeshVS;
- SelectMgr_ViewerSelectors are now shared between local and global contexts;
- transformations of sensitive entities are now stored in SelectMgr_SelectableObject only. Sensitive entities are independent from transformations, it is applied to SelectMgr_SelectingVolumeManager instance only;
- connected and multiple connected interactive objects are now represented by their child objects only for SelectMgr_SelectionManager;
- if interactive object has child objects, they will be stored as separate objects in SelectMgr_SelectionManager now.
- test cases bugs/vis/bug24623_1, bug24623_2, bug24623_3, bug24623_4 to test performance and memory issues.
This commit is contained in:
vpa
2015-04-06 12:31:00 +03:00
committed by bugmaster
parent 7a91ad6e81
commit f751596e46
269 changed files with 12626 additions and 11723 deletions

View File

@@ -234,6 +234,10 @@ is
Transformation(me) returns any Trsf from gp;
---C++: inline
---C++: return const&
InversedTransformation(me) returns any Trsf from gp;
---C++: inline
---C++: return const&
ResetTransformation(me:mutable) is virtual;
---Purpose: resets local transformation to identity.
@@ -330,6 +334,7 @@ fields
myLocalTransformation : Trsf from gp; -- Own transformation of presentable object.
myTransformation : Trsf from gp; -- Combined transformation of presentable object.
myInvTransformation : Trsf from gp; -- Inverted combined transformation of presentable object.
myCombinedParentTransform : Trsf from gp; -- Combined transformation of presentable object excepting local transformation.
myChildren : ListOfPresentableObjects from PrsMgr; -- Child objects in scene hierarchy.

View File

@@ -269,6 +269,7 @@ void PrsMgr_PresentableObject::SetCombinedParentTransform (const gp_Trsf& theTra
void PrsMgr_PresentableObject::UpdateTransformation()
{
myTransformation = myCombinedParentTransform * myLocalTransformation;
myInvTransformation = myTransformation.Inverted();
Handle(Geom_Transformation) aTrsf = new Geom_Transformation (myTransformation);
for (Standard_Integer aPrsIter = 1; aPrsIter <= myPresentations.Length(); ++aPrsIter)

View File

@@ -28,6 +28,11 @@ inline const gp_Trsf& PrsMgr_PresentableObject::Transformation() const
return myTransformation;
}
inline const gp_Trsf& PrsMgr_PresentableObject::InversedTransformation() const
{
return myInvTransformation;
}
inline const PrsMgr_ListOfPresentableObjects& PrsMgr_PresentableObject::Children() const
{
return myChildren;