const Standard_Integer theMode,
const Standard_Integer theNewSensitivity);
+ //! Returns last active View (argument of MoveTo()/Select() methods).
+ Standard_EXPORT Handle(V3d_View) LastActiveView() const;
+
//! Relays mouse position in pixels theXPix and theYPix to the interactive context selectors.
//! This is done by the view theView passing this position to the main viewer and updating it.
//! If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to highlight detected object.
const Handle(V3d_View)& theView,
const Standard_Boolean theToUpdateViewer);
+ //! Returns bounding box of selected objects.
+ Standard_EXPORT Bnd_Box BoundingBoxOfSelection() const;
+
//! Fits the view correspondingly to the bounds of selected objects.
//! Infinite objects are ignored if infinite state of AIS_InteractiveObject is set to true.
Standard_EXPORT void FitSelected (const Handle(V3d_View)& theView,
Standard_EXPORT void SubIntensityOff (const Handle(AIS_InteractiveObject)& theIObj,
const Standard_Boolean theToUpdateViewer);
+ //! Returns selection instance
+ const Handle(AIS_Selection)& Selection() const { return mySelection; }
+
+ //! Sets selection instance to manipulate a container of selected owners
+ //! @param theSelection an instance of the selection
+ void SetSelection (const Handle(AIS_Selection)& theSelection) { mySelection = theSelection; }
+
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
protected: //! @name internal methods
Standard_EXPORT void GetDefModes (const Handle(AIS_InteractiveObject)& anIobj, Standard_Integer& Dmode, Standard_Integer& HiMod, Standard_Integer& SelMode) const;
Standard_EXPORT Standard_Integer PurgeViewer (const Handle(V3d_Viewer)& Vwr);
//! Helper function to unhighlight all entity owners currently highlighted with seleciton color.
- Standard_EXPORT void unhighlightOwners (const Handle(AIS_InteractiveObject)& theObject);
+ Standard_EXPORT void unselectOwners (const Handle(AIS_InteractiveObject)& theObject);
//! Helper function that highlights the owner given with <theStyle> without
//! performing AutoHighlight checks, e.g. is used for dynamic highlight.
//! for AutoHighlight, e.g. is used for selection.
Standard_EXPORT void highlightSelected (const Handle(SelectMgr_EntityOwner)& theOwner);
+ //! Helper function that highlights the owners with check
+ //! for AutoHighlight, e.g. is used for selection.
+ Standard_EXPORT void highlightOwners (const AIS_NListOfEntityOwner& theOwners);
+
//! Helper function that highlights global owner of the object given with <theStyle> with check
//! for AutoHighlight, e.g. is used for selection.
//! If global owner is null, it simply highlights the whole object
Standard_EXPORT void highlightGlobal (const Handle(AIS_InteractiveObject)& theObj,
const Handle(Prs3d_Drawer)& theStyle,
- const Standard_Integer theDispMode) const;
+ const Standard_Integer theDispMode);
//! Helper function that unhighlights all owners that are stored in current AIS_Selection.
//! The function updates global status and selection state of owner and interactive object.
//! switched on in AIS_GlobalStatus will be highlighted with context's sub-intensity color.
Standard_EXPORT void unhighlightSelected (const Standard_Boolean theIsToHilightSubIntensity = Standard_False);
+ //! Helper function that unhighlights the owners with check
+ //! for AutoHighlight, e.g. is used for selection.
+ Standard_EXPORT void unhighlightOwners (const AIS_NListOfEntityOwner& theOwners,
+ const Standard_Boolean theIsToHilightSubIntensity = Standard_False);
+
//! Helper function that unhighlights global selection owner of given interactive.
//! The function does not perform any updates of global or owner status
- Standard_EXPORT void unhighlightGlobal (const Handle(AIS_InteractiveObject)& theObj) const;
+ Standard_EXPORT void unhighlightGlobal (const Handle(AIS_InteractiveObject)& theObj);
//! Helper function that turns on sub-intensity in global status and highlights
//! given objects with sub-intensity color
}
}
+ //! Bind/Unbind status to object and its children
+ //! @param theObj [in] the object to change status
+ //! @param theStatus status, if NULL, unbind object
+ Standard_EXPORT void setObjectStatus (const Handle(AIS_InteractiveObject)& theIObj,
+ const AIS_DisplayStatus theStatus,
+ const Standard_Integer theDispyMode,
+ const Standard_Integer theSelectionMode);
+
protected: //! @name internal fields
AIS_DataMapOfIOStatus myObjects;
Handle(PrsMgr_PresentationManager3d) myMainPM;
Handle(V3d_Viewer) myMainVwr;
Handle(StdSelect_ViewerSelector3d) myMainSel;
+ V3d_View* myLastActiveView;
Handle(SelectMgr_EntityOwner) myLastPicked;
Standard_Boolean myToHilightSelected;
Handle(AIS_Selection) mySelection;