mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
0028644: Visualization, AIS_MultipleConnectedInteractive - remove unused private class SelectMgr_AssemblyEntityOwner
This commit is contained in:
parent
0bd575a716
commit
003281f4e7
@ -28,108 +28,6 @@
|
|||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(AIS_MultipleConnectedInteractive,AIS_InteractiveObject)
|
IMPLEMENT_STANDARD_RTTIEXT(AIS_MultipleConnectedInteractive,AIS_InteractiveObject)
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
//! SelectMgr_AssemblyEntityOwner replaces original owners in sensitive entities
|
|
||||||
//! copied from reference objects to AIS_MultipleConnectedInteractive in order to
|
|
||||||
//! redirect all selection queries to multiply connected (assembly).
|
|
||||||
class SelectMgr_AssemblyEntityOwner : public SelectMgr_EntityOwner
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Copies another SelectMgr_EntityOwner.
|
|
||||||
SelectMgr_AssemblyEntityOwner (const Handle(SelectMgr_EntityOwner) theOwner,
|
|
||||||
SelectMgr_SelectableObject* theAssembly);
|
|
||||||
|
|
||||||
void SetAssembly (SelectMgr_SelectableObject* theAssembly)
|
|
||||||
{
|
|
||||||
myAssembly = theAssembly;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Selectable() method modified to return myAssembly.
|
|
||||||
virtual Handle(SelectMgr_SelectableObject) Selectable() const Standard_OVERRIDE
|
|
||||||
{
|
|
||||||
return myAssembly;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& PM,const Standard_Integer aMode) const Standard_OVERRIDE;
|
|
||||||
|
|
||||||
virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
|
|
||||||
const Handle(Prs3d_Drawer)& theStyle,
|
|
||||||
const Standard_Integer theMode) Standard_OVERRIDE;
|
|
||||||
|
|
||||||
virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& PM, const Standard_Integer aMode) Standard_OVERRIDE;
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
SelectMgr_SelectableObject* myAssembly;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : SelectMgr_AssemblyEntityOwner
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
SelectMgr_AssemblyEntityOwner::SelectMgr_AssemblyEntityOwner (const Handle(SelectMgr_EntityOwner) theOwner,
|
|
||||||
SelectMgr_SelectableObject* theAssembly)
|
|
||||||
:
|
|
||||||
SelectMgr_EntityOwner (theOwner),
|
|
||||||
myAssembly (theAssembly)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : IsHilighted
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
Standard_Boolean SelectMgr_AssemblyEntityOwner::IsHilighted (const Handle(PrsMgr_PresentationManager)& PM,
|
|
||||||
const Standard_Integer aMode) const
|
|
||||||
{
|
|
||||||
if (HasSelectable())
|
|
||||||
{
|
|
||||||
return PM->IsHighlighted (myAssembly, aMode);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Standard_False;
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : HilightWithColor
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void SelectMgr_AssemblyEntityOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
|
|
||||||
const Handle(Prs3d_Drawer)& theStyle,
|
|
||||||
const Standard_Integer theMode)
|
|
||||||
{
|
|
||||||
if (HasSelectable())
|
|
||||||
{
|
|
||||||
if (IsAutoHilight())
|
|
||||||
{
|
|
||||||
thePM->Color (myAssembly, theStyle, theMode);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
myAssembly->HilightOwnerWithColor (thePM, theStyle, this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : Unhilight
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
void SelectMgr_AssemblyEntityOwner::Unhilight (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
|
|
||||||
const Standard_Integer )
|
|
||||||
{
|
|
||||||
if (HasSelectable())
|
|
||||||
{
|
|
||||||
thePrsMgr->Unhighlight (myAssembly);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : AIS_MultipleConnectedInteractive
|
//function : AIS_MultipleConnectedInteractive
|
||||||
//purpose :
|
//purpose :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user