Standard_EXPORT virtual Standard_Boolean HasSelection (const Standard_Integer theMode) const;
//! Begins the iteration scanning for sensitive primitives.
- void Init();
-
+ void Init()
+ {
+ mycurrent = 1;
+ }
+
//! Continues the iteration scanning for sensitive primitives.
- Standard_Boolean More() const;
-
+ Standard_Boolean More() const
+ {
+ return mycurrent <= myselections.Length();
+ }
+
//! Continues the iteration scanning for sensitive primitives.
- void Next();
-
+ void Next()
+ {
+ mycurrent++;
+ }
+
//! Returns the current selection in this framework.
- const Handle(SelectMgr_Selection)& CurrentSelection() const;
-
+ const Handle(SelectMgr_Selection)& CurrentSelection() const
+ {
+ return myselections (mycurrent);
+ }
+
Standard_EXPORT void ResetTransformation() Standard_OVERRIDE;
//! Recomputes the location of the selection aSelection.
//! Sets update status FULL to selections of the object. Must be used as the only method of UpdateSelection
//! from outer classes to prevent BVH structures from being outdated.
- Standard_EXPORT void UpdateSelection (const Standard_Integer theMode = -1);
-
+ void UpdateSelection (const Standard_Integer theMode = -1)
+ {
+ updateSelection (theMode);
+ }
+
//! Returns bounding box of selectable object
//! by storing its minimum and maximum 3d coordinates
//! to output parameters
Standard_EXPORT virtual void SetAttributes (const Handle(Prs3d_Drawer)& theDrawer);
//! Returns the attributes settings.
- const Handle(Prs3d_Drawer)& Attributes() const;
-
+ const Handle(Prs3d_Drawer)& Attributes() const
+ {
+ return myDrawer;
+ }
+
//! Clears settings provided by the drawing tool theDrawer.
Standard_EXPORT virtual void UnsetAttributes();
Standard_EXPORT virtual void SetHilightAttributes (const Handle(Prs3d_Drawer)& theDrawer);
//! Returns the hilight attributes settings.
- const Handle(Prs3d_Drawer)& HilightAttributes() const;
-
+ const Handle(Prs3d_Drawer)& HilightAttributes() const
+ {
+ return myHilightDrawer;
+ }
+
//! Clears settings provided by the hilight drawing tool theDrawer.
Standard_EXPORT virtual void UnsetHilightAttributes();
Standard_EXPORT Bnd_Box BndBoxOfSelected (Handle(SelectMgr_IndexedMapOfOwner)& theOwners);
//! Returns the mode for selection of object as a whole
- inline Standard_Integer GlobalSelectionMode() const;
+ Standard_Integer GlobalSelectionMode() const
+ {
+ return myGlobalSelMode;
+ }
//! Returns the owner of mode for selection of object as a whole
Standard_EXPORT virtual Handle(SelectMgr_EntityOwner) GlobalSelOwner() const;
protected:
-
Standard_EXPORT SelectMgr_SelectableObject(const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d = PrsMgr_TOP_AllView);
- inline void setGlobalSelMode (const Standard_Integer theMode);
+ void setGlobalSelMode (const Standard_Integer theMode)
+ {
+ myGlobalSelMode = theMode > 0 ? theMode : 0;
+ }
+
+ Standard_EXPORT virtual void updateSelection (const Standard_Integer theMode);
+
+protected:
SelectMgr_SequenceOfSelection myselections;
Handle(Prs3d_Drawer) myDrawer;
Handle(Prs3d_Drawer) myHilightDrawer;
Handle(SelectMgr_EntityOwner) myAssemblyOwner;
-
+ Standard_Boolean myAutoHilight;
private:
-
Standard_Integer mycurrent;
- Standard_Boolean myAutoHilight;
Handle(Prs3d_Presentation) mySelectionPrs;
Handle(Prs3d_Presentation) myHilightPrs;
Standard_Integer myGlobalSelMode;
-
-
};
-
-#include <SelectMgr_SelectableObject.lxx>
-
-
-
-
-
#endif // _SelectMgr_SelectableObject_HeaderFile
+++ /dev/null
-// Copyright (c) 1998-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-inline void SelectMgr_SelectableObject::Init()
-{mycurrent=1;}
-
-inline Standard_Boolean SelectMgr_SelectableObject::More() const
-{return (mycurrent<=myselections.Length());}
-
-inline void SelectMgr_SelectableObject::Next()
-{mycurrent++;}
-
-inline const Handle(SelectMgr_Selection)& SelectMgr_SelectableObject::
-CurrentSelection() const
-{return myselections(mycurrent);}
-
-inline const Handle(Prs3d_Drawer)& SelectMgr_SelectableObject::
-Attributes() const
-{return myDrawer;}
-
-inline const Handle(Prs3d_Drawer)& SelectMgr_SelectableObject::
-HilightAttributes() const
-{return myHilightDrawer;}
-
-//=======================================================================
-//function : GlobalSelectionMode
-//purpose :
-//=======================================================================
-inline Standard_Integer SelectMgr_SelectableObject::GlobalSelectionMode() const
-{
- return myGlobalSelMode;
-}
-
-//=======================================================================
-//function : setGlobalSelMode
-//purpose :
-//=======================================================================
-inline void SelectMgr_SelectableObject::setGlobalSelMode (const Standard_Integer theMode)
-{
- myGlobalSelMode = theMode > 0 ? theMode : 0;
-}