mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0026462: Visualization - selection does not adapt to line width change
- added interface for changing sensitivity of a particular selection through both interactive and local context; - added corresponding methods for changing sensitivity to SelectMgr_SelectionManager, SelectMgr_Selection and SelectBasics_SensitiveEntity; - option -setSensitivity was implemented in vaspects Draw command; - test case for issue #26462
This commit is contained in:
@@ -45,3 +45,15 @@ const Handle(SelectBasics_EntityOwner)& SelectBasics_SensitiveEntity::OwnerId()
|
||||
{
|
||||
return myOwnerId;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : SetSensitivityFactor
|
||||
// purpose : Allows to manage sensitivity of a particular entity
|
||||
//=======================================================================
|
||||
void SelectBasics_SensitiveEntity::SetSensitivityFactor (const Standard_Integer theNewSens)
|
||||
{
|
||||
Standard_ASSERT_RAISE (theNewSens > 0,
|
||||
"Error! Selection sensitivity have positive value.");
|
||||
|
||||
mySFactor = theNewSens;
|
||||
}
|
||||
|
@@ -58,6 +58,9 @@ public:
|
||||
//! a specific entity in selection algorithms
|
||||
//! useful for small sized entities.
|
||||
Standard_EXPORT Standard_Integer SensitivityFactor() const;
|
||||
|
||||
//! Allows to manage sensitivity of a particular sensitive entity
|
||||
Standard_EXPORT void SetSensitivityFactor (const Standard_Integer theNewSens);
|
||||
|
||||
//! Returns the number of sub-entities or elements in
|
||||
//! sensitive entity. Is used to determine if entity is
|
||||
@@ -88,9 +91,6 @@ protected:
|
||||
|
||||
Standard_EXPORT SelectBasics_SensitiveEntity (const Handle(SelectBasics_EntityOwner)& theOwnerId);
|
||||
|
||||
//! Allows to manage the sensitivity of the entity
|
||||
void SetSensitivityFactor (const Standard_Integer theSensFactor);
|
||||
|
||||
Handle(SelectBasics_EntityOwner) myOwnerId;
|
||||
|
||||
|
||||
|
@@ -12,15 +12,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
//=======================================================================
|
||||
// function : SetSensitivityFactor
|
||||
// purpose : Allows to manage the sensitivity of the entity
|
||||
//=======================================================================
|
||||
inline void SelectBasics_SensitiveEntity::SetSensitivityFactor (const Standard_Integer theSensFactor)
|
||||
{
|
||||
mySFactor = theSensFactor;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : SensitivityFactor
|
||||
// purpose : Gets sensitivity factor for the entity
|
||||
|
Reference in New Issue
Block a user