mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0027739: Visualization, TKV3d - implement individual acceleration data structure for selection of 2D persistent objects
Low-level selection algorithms has been improved to explicitly support 2D transformation persistent objects. This patch generally touches: 1) SelectMgr_SelectableObjectSet - the lists of objects has been split onto three subsets (regular, 3d-persistent, 2d-persistent). Each subset has individual BVH tree. The algorithms are now have more flexibility to update only those trees that is really required for actual camera state. 2) SelectMgr_ViewerSelector - explicitly supports Eye space selection operations on BVH tree for 2d-persistent subset. Change of camera position does not anymore affect acceleration data structure (BVH tree) of 2d-persistent selectable objects. 3) Other classes from SelectMgr have been fine-tuned to provide appropriate API. Porting notes: This patch touches very low-level selection classes. If the low-level features were used the following modifications may need to be considered for porting: 1) Iteration over objects of SelectMgr_SelectableObjectSet should now be implemented with corresponding Iterator class. 2) SelectMgr_BaseFrustum::ScaleAndTransform and derived classes return Handle(SelectMgr_BaseFrustum) instead of NCollection_Handle<> type. Small correction of test case for issue CR27739
This commit is contained in:
@@ -46,8 +46,11 @@ public:
|
||||
//! There are no default parameters, but in case if:
|
||||
//! - transformation only is needed: @theScaleFactor must be initialized as any negative value;
|
||||
//! - scale only is needed: @theTrsf must be set to gp_Identity.
|
||||
//! Builder is an optional argument that represents corresponding settings for re-constructing transformed
|
||||
//! frustum from scratch. Can be null if reconstruction is not expected furthermore.
|
||||
Standard_EXPORT virtual SelectMgr_SelectingVolumeManager ScaleAndTransform (const Standard_Integer theScaleFactor,
|
||||
const gp_GTrsf& theTrsf);
|
||||
const gp_GTrsf& theTrsf,
|
||||
const Handle(SelectMgr_FrustumBuilder)& theBuilder = NULL) const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer GetActiveSelectionType() const Standard_OVERRIDE;
|
||||
|
||||
@@ -71,7 +74,7 @@ public:
|
||||
//! @return current world view transformation common for all selecting volumes
|
||||
Standard_EXPORT const Graphic3d_Mat4d& WorldViewMatrix() const;
|
||||
|
||||
Standard_EXPORT void WindowSize (Standard_Integer& theWidth, Standard_Integer& theHeight);
|
||||
Standard_EXPORT void WindowSize (Standard_Integer& theWidth, Standard_Integer& theHeight) const;
|
||||
|
||||
//! @return current camera world view projection transformation state common for all selecting volumes
|
||||
Standard_EXPORT const Graphic3d_WorldViewProjState& WorldViewProjState() const;
|
||||
@@ -189,8 +192,8 @@ public:
|
||||
private:
|
||||
enum { Frustum, FrustumSet, VolumeTypesNb }; //!< Defines the amount of available selecting volumes
|
||||
|
||||
NCollection_Handle<SelectMgr_BaseFrustum> mySelectingVolumes[VolumeTypesNb]; //!< Array of selecting volumes
|
||||
Standard_Boolean myToAllowOverlap; //!< Defines if partially overlapped entities will me detected or not
|
||||
Handle(SelectMgr_BaseFrustum) mySelectingVolumes[VolumeTypesNb]; //!< Array of selecting volumes
|
||||
Standard_Boolean myToAllowOverlap; //!< Defines if partially overlapped entities will me detected or not
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
Reference in New Issue
Block a user