Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
AIS_InteractiveContext Class Reference

The Interactive Context allows you to manage graphic behavior and selection of Interactive Objects in one or more viewers. Class methods make this highly transparent. It is essential to remember that an Interactive Object which is already known by the Interactive Context must be modified using Context methods. You can only directly call the methods available for an Interactive Object if it has not been loaded into an Interactive Context. More...

#include <AIS_InteractiveContext.hxx>

Inheritance diagram for AIS_InteractiveContext:
Inheritance graph
[legend]

Public Member Functions

object display management

Constructs the interactive context object defined by the principal viewer MainViewer.

 AIS_InteractiveContext (const occ::handle< V3d_Viewer > &MainViewer)
 Destructor.
 
 ~AIS_InteractiveContext () override
 Destructor.
 
PrsMgr_DisplayStatus DisplayStatus (const occ::handle< AIS_InteractiveObject > &anIobj) const
 Returns the display status of the entity anIobj. This will be one of the following:
 
void Status (const occ::handle< AIS_InteractiveObject > &anObj, TCollection_ExtendedString &astatus) const
 Returns the status of the Interactive Context for the view of the Interactive Object.
 
bool IsDisplayed (const occ::handle< AIS_InteractiveObject > &anIobj) const
 Returns true if Object is displayed in the interactive context.
 
bool IsDisplayed (const occ::handle< AIS_InteractiveObject > &aniobj, const int aMode) const
 Destructor.
 
void SetAutoActivateSelection (const bool theIsAuto)
 Enable or disable automatic activation of default selection mode while displaying the object.
 
bool GetAutoActivateSelection () const
 Manages displaying the new object should also automatically activate default selection mode; TRUE by default.
 
void Display (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Displays the object in this Context using default Display Mode. This will be the object's default display mode, if there is one. Otherwise, it will be the context mode. The Interactive Object's default selection mode is activated if GetAutoActivateSelection() is TRUE. In general, this is 0.
 
void Display (const occ::handle< AIS_InteractiveObject > &theIObj, const int theDispMode, const int theSelectionMode, const bool theToUpdateViewer, const PrsMgr_DisplayStatus theDispStatus=PrsMgr_DisplayStatus_None)
 Sets status, display mode and selection mode for specified Object If theSelectionMode equals -1, theIObj will not be activated: it will be displayed but will not be selectable.
 
void Load (const occ::handle< AIS_InteractiveObject > &theObj, const int theSelectionMode=-1)
 Allows you to load the Interactive Object with a given selection mode, and/or with the desired decomposition option, whether the object is visualized or not. The loaded objects will be selectable but displayable in highlighting only when detected by the Selector.
 
void Erase (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Hides the object. The object's presentations are simply flagged as invisible and therefore excluded from redrawing. To show hidden objects, use Display().
 
void EraseAll (const bool theToUpdateViewer)
 Hides all objects. The object's presentations are simply flagged as invisible and therefore excluded from redrawing. To show all hidden objects, use DisplayAll().
 
void DisplayAll (const bool theToUpdateViewer)
 Displays all hidden objects.
 
void EraseSelected (const bool theToUpdateViewer)
 Hides selected objects. The object's presentations are simply flagged as invisible and therefore excluded from redrawing. To show hidden objects, use Display().
 
void DisplaySelected (const bool theToUpdateViewer)
 Displays current objects.
 
void ClearPrs (const occ::handle< AIS_InteractiveObject > &theIObj, const int theMode, const bool theToUpdateViewer)
 Empties the graphic presentation of the mode indexed by aMode. Warning! Removes theIObj. theIObj is still active if it was previously activated.
 
void Remove (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Removes Object from every viewer.
 
void RemoveAll (const bool theToUpdateViewer)
 Removes all the objects from Context.
 
void Redisplay (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer, const bool theAllModes=false)
 Recomputes the seen parts presentation of the Object. If theAllModes equals true, all presentations are present in the object even if unseen.
 
void Redisplay (const AIS_KindOfInteractive theTypeOfObject, const int theSignature, const bool theToUpdateViewer)
 Recomputes the Prs/Selection of displayed objects of a given type and a given signature. if signature = -1 doesn't take signature criterion.
 
void RecomputePrsOnly (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer, const bool theAllModes=false)
 Recomputes the displayed presentations, flags the others. Doesn't update presentations.
 
void RecomputeSelectionOnly (const occ::handle< AIS_InteractiveObject > &anIObj)
 Recomputes the active selections, flags the others. Doesn't update presentations.
 
void Update (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theUpdateViewer)
 Updates displayed interactive object by checking and recomputing its flagged as "to be recomputed" presentation and selection structures. This method does not force any recomputation on its own. The method recomputes selections even if they are loaded without activation in particular selector.
 
highlighting management

Returns default highlight style settings (could be overridden by PrsMgr_PresentableObject).

Tip: although highlighting style is defined by Prs3d_Drawer, only a small set of properties derived from it's base class Graphic3d_PresentationAttributes will be actually used in most cases.

Default highlight style for all types is Aspect_TOHM_COLOR. Other defaults:

  • Prs3d_TypeOfHighlight_Dynamic
    • Color: Quantity_NOC_CYAN1;
    • Layer: Graphic3d_ZLayerId_Top, object highlighting is drawn on top of main scene within Immediate Layers, so that V3d_View::RedrawImmediate() will be enough to see update;
  • Prs3d_TypeOfHighlight_LocalDynamic
    • Color: Quantity_NOC_CYAN1;
    • Layer: Graphic3d_ZLayerId_Topmost, object parts highlighting is drawn on top of main scene within Immediate Layers with depth cleared (even overlapped geometry will be revealed);
  • Prs3d_TypeOfHighlight_Selected
    • Color: Quantity_NOC_GRAY80;
    • Layer: Graphic3d_ZLayerId_UNKNOWN, object highlighting is drawn on top of main scene within the same layer as object itself (e.g. Graphic3d_ZLayerId_Default by default) and increased priority.
Parameters
[in]theStyleTypehighlight style to modify
Returns
drawer associated to specified highlight type
See also
MoveTo() using Prs3d_TypeOfHighlight_Dynamic and Prs3d_TypeOfHighlight_LocalDynamic types
SelectDetected() using Prs3d_TypeOfHighlight_Selected and Prs3d_TypeOfHighlight_LocalSelected types
PrsMgr_PresentableObject::DynamicHilightAttributes() overriding Prs3d_TypeOfHighlight_Dynamic and Prs3d_TypeOfHighlight_LocalDynamic defaults on object level
PrsMgr_PresentableObject::HilightAttributes() overriding Prs3d_TypeOfHighlight_Selected and Prs3d_TypeOfHighlight_LocalSelected defaults on object level
const occ::handle< Prs3d_Drawer > & HighlightStyle (const Prs3d_TypeOfHighlight theStyleType) const
 Setup highlight style settings. Tip: it is better modifying existing style returned by method HighlightStyle() instead of creating a new Prs3d_Drawer to avoid unexpected results due misconfiguration.
 
void SetHighlightStyle (const Prs3d_TypeOfHighlight theStyleType, const occ::handle< Prs3d_Drawer > &theStyle)
 Setup highlight style settings. Tip: it is better modifying existing style returned by method HighlightStyle() instead of creating a new Prs3d_Drawer to avoid unexpected results due misconfiguration.
 
const occ::handle< Prs3d_Drawer > & HighlightStyle () const
 Returns current dynamic highlight style settings corresponding to Prs3d_TypeOfHighlight_Dynamic. This is just a short-cut to HighlightStyle(Prs3d_TypeOfHighlight_Dynamic).
 
void SetHighlightStyle (const occ::handle< Prs3d_Drawer > &theStyle)
 Setup the style of dynamic highlighting corresponding to Prs3d_TypeOfHighlight_Selected. This is just a short-cut to SetHighlightStyle(Prs3d_TypeOfHighlight_Dynamic,theStyle).
 
const occ::handle< Prs3d_Drawer > & SelectionStyle () const
 Returns current selection style settings corresponding to Prs3d_TypeOfHighlight_Selected. This is just a short-cut to HighlightStyle(Prs3d_TypeOfHighlight_Selected).
 
void SetSelectionStyle (const occ::handle< Prs3d_Drawer > &theStyle)
 Setup the style of selection highlighting. This is just a short-cut to SetHighlightStyle(Prs3d_TypeOfHighlight_Selected,theStyle).
 
bool HighlightStyle (const occ::handle< AIS_InteractiveObject > &theObj, occ::handle< Prs3d_Drawer > &theStyle) const
 Returns highlight style of the object if it is marked as highlighted via global status.
 
bool HighlightStyle (const occ::handle< SelectMgr_EntityOwner > &theOwner, occ::handle< Prs3d_Drawer > &theStyle) const
 Returns highlight style of the owner if it is selected.
 
bool IsHilighted (const occ::handle< AIS_InteractiveObject > &theObj) const
 Returns true if the object is marked as highlighted via its global status.
 
bool IsHilighted (const occ::handle< SelectMgr_EntityOwner > &theOwner) const
 Returns true if the owner is marked as selected.
 
void HilightWithColor (const occ::handle< AIS_InteractiveObject > &theObj, const occ::handle< Prs3d_Drawer > &theStyle, const bool theToUpdateViewer)
 Changes the color of all the lines of the object in view.
 
void Unhilight (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Removes highlighting from the Object.
 
object presence management (View affinity, Layer, Priority)

Returns the display priority of the Object.

Graphic3d_DisplayPriority DisplayPriority (const occ::handle< AIS_InteractiveObject > &theIObj) const
 Sets the display priority of the seen parts presentation of the Object.
 
void SetDisplayPriority (const occ::handle< AIS_InteractiveObject > &theIObj, const Graphic3d_DisplayPriority thePriority)
 Sets the display priority of the seen parts presentation of the Object.
 
instead of integer number to SetDisplayPriority ()") void SetDisplayPriority( const occ
 
Graphic3d_ZLayerId GetZLayer (const occ::handle< AIS_InteractiveObject > &theIObj) const
 Get Z layer id set for displayed interactive object.
 
void SetZLayer (const occ::handle< AIS_InteractiveObject > &theIObj, const Graphic3d_ZLayerId theLayerId)
 Set Z layer id for interactive object. The Z layers can be used to display temporarily presentations of some object in front of the other objects in the scene. The ids for Z layers are generated by V3d_Viewer.
 
void SetViewAffinity (const occ::handle< AIS_InteractiveObject > &theIObj, const occ::handle< V3d_View > &theView, const bool theIsVisible)
 Setup object visibility in specified view. Has no effect if object is not displayed in this context.
 
Display Mode management

Returns the Display Mode setting to be used by default.

int DisplayMode () const
 Sets the display mode of seen Interactive Objects (which have no overridden Display Mode).
 
void SetDisplayMode (const int theMode, const bool theToUpdateViewer)
 Sets the display mode of seen Interactive Objects (which have no overridden Display Mode).
 
void SetDisplayMode (const occ::handle< AIS_InteractiveObject > &theIObj, const int theMode, const bool theToUpdateViewer)
 Sets the display mode of seen Interactive Objects. theMode provides the display mode index of the entity theIObj.
 
void UnsetDisplayMode (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Unsets the display mode of seen Interactive Objects.
 
object local transformation management

Puts the location on the initial graphic representation and the selection for the Object.

void SetLocation (const occ::handle< AIS_InteractiveObject > &theObject, const TopLoc_Location &theLocation)
 Puts the Object back into its initial position.
 
void ResetLocation (const occ::handle< AIS_InteractiveObject > &theObject)
 Puts the Object back into its initial position.
 
bool HasLocation (const occ::handle< AIS_InteractiveObject > &theObject) const
 Returns true if the Object has a location.
 
TopLoc_Location Location (const occ::handle< AIS_InteractiveObject > &theObject) const
 Returns the location of the Object.
 
void SetTransformPersistence (const occ::handle< AIS_InteractiveObject > &theObject, const occ::handle< Graphic3d_TransformPers > &theTrsfPers)
 Sets transform persistence.
 
mouse picking logic (detection and dynamic highlighting of entities under cursor)

Setup pixel tolerance for MoveTo() operation.

See also
MoveTo().
void SetPixelTolerance (const int thePrecision=2)
 Returns the pixel tolerance, default is 2. Pixel Tolerance extends sensitivity within MoveTo() operation (picking by point) and can be adjusted by application based on user input precision (e.g. screen pixel density, input device precision, etc.).
 
int PixelTolerance () const
 Returns the pixel tolerance, default is 2. Pixel Tolerance extends sensitivity within MoveTo() operation (picking by point) and can be adjusted by application based on user input precision (e.g. screen pixel density, input device precision, etc.).
 
void SetSelectionSensitivity (const occ::handle< AIS_InteractiveObject > &theObject, const int theMode, const int theNewSensitivity)
 Allows to manage sensitivity of a particular selection of interactive object theObject and changes previous sensitivity value of all sensitive entities in selection with theMode to the given theNewSensitivity.
 
occ::handle< V3d_ViewLastActiveView () const
 Returns last active View (argument of MoveTo()/Select() methods).
 
AIS_StatusOfDetection MoveTo (const int theXPix, const int theYPix, const occ::handle< V3d_View > &theView, const bool theToRedrawOnUpdate)
 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.
 
AIS_StatusOfDetection MoveTo (const gp_Ax1 &theAxis, const occ::handle< V3d_View > &theView, const bool theToRedrawOnUpdate)
 Relays axis theAxis to the interactive context selectors. This is done by the view theView passing this axis to the main viewer and updating it. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to highlight detected object.
 
bool ClearDetected (bool theToRedrawImmediate=false)
 Clears the list of entities detected by MoveTo() and resets dynamic highlighting.
 
bool HasDetected () const
 Returns true if there is a mouse-detected entity in context.
 
const occ::handle< SelectMgr_EntityOwner > & DetectedOwner () const
 Returns the owner of the detected sensitive primitive which is currently dynamically highlighted. WARNING! This method is irrelevant to InitDetected()/MoreDetected()/NextDetected().
 
occ::handle< AIS_InteractiveObjectDetectedInteractive () const
 Returns the interactive objects last detected in context. In general this is just a wrapper for occ::down_cast<AIS_InteractiveObject>(DetectedOwner()->Selectable()).
 
Local Context is deprecated local selection should be used without Local Context bool HasDetectedShape () const
 Returns true if there is a detected shape in local context.
 
Local Context is deprecated local selection should be used without Local Context const TopoDS_ShapeDetectedShape () const
 Returns the shape detected in local context.
 
bool HasNextDetected () const
 returns True if other entities were detected in the last mouse detection
 
int HilightNextDetected (const occ::handle< V3d_View > &theView, const bool theToRedrawImmediate=true)
 If more than 1 object is detected by the selector, only the "best" owner is hilighted at the mouse position. This Method allows the user to hilight one after another the other detected entities. If The method select is called, the selected entity will be the hilighted one! WARNING: Loop Method. When all the detected entities have been hilighted, the next call will hilight the first one again.
 
int HilightPreviousDetected (const occ::handle< V3d_View > &theView, const bool theToRedrawImmediate=true)
 Same as previous methods in reverse direction.
 
iteration through detected entities

Initialization for iteration through mouse-detected objects in interactive context or in local context if it is opened.

See also
DetectedCurrentOwner(), MoreDetected(), NextDetected().
void InitDetected ()
 Return TRUE if there is more mouse-detected objects after the current one during iteration through mouse-detected interactive objects.
 
bool MoreDetected () const
 Return TRUE if there is more mouse-detected objects after the current one during iteration through mouse-detected interactive objects.
 
void NextDetected ()
 Gets next current object during iteration through mouse-detected interactive objects.
 
occ::handle< SelectMgr_EntityOwnerDetectedCurrentOwner () const
 Returns the owner from detected list pointed by current iterator position. WARNING! This method is irrelevant to DetectedOwner() which returns last picked Owner regardless of iterator position!
 
Selection management

Adds object in the selection.

AIS_StatusOfPick AddSelect (const occ::handle< SelectMgr_EntityOwner > &theObject)
 Adds object in the selection.
 
AIS_StatusOfPick AddSelect (const occ::handle< AIS_InteractiveObject > &theObject)
 Adds object in the selection.
 
AIS_StatusOfPick SelectRectangle (const NCollection_Vec2< int > &thePntMin, const NCollection_Vec2< int > &thePntMax, const occ::handle< V3d_View > &theView, const AIS_SelectionScheme theSelScheme=AIS_SelectionScheme_Replace)
 Selects objects within the bounding rectangle. Viewer should be explicitly redrawn after selection.
 
AIS_StatusOfPick SelectPolygon (const NCollection_Array1< gp_Pnt2d > &thePolyline, const occ::handle< V3d_View > &theView, const AIS_SelectionScheme theSelScheme=AIS_SelectionScheme_Replace)
 Select everything found in the polygon defined by bounding polyline. Viewer should be explicitly redrawn after selection.
 
AIS_StatusOfPick SelectPoint (const NCollection_Vec2< int > &thePnt, const occ::handle< V3d_View > &theView, const AIS_SelectionScheme theSelScheme=AIS_SelectionScheme_Replace)
 Selects the topmost object picked by the point in the view, Viewer should be explicitly redrawn after selection.
 
AIS_StatusOfPick SelectDetected (const AIS_SelectionScheme theSelScheme=AIS_SelectionScheme_Replace)
 Select and hilights the previous detected via AIS_InteractiveContext::MoveTo() method; unhilights the previous picked. Viewer should be explicitly redrawn after selection.
 
Bnd_Box BoundingBoxOfSelection (const occ::handle< V3d_View > &theView) const
 Returns bounding box of selected objects.
 
Bnd_Box BoundingBoxOfSelection () const
 
AIS_StatusOfPick Select (const NCollection_Array1< occ::handle< SelectMgr_EntityOwner > > &theOwners, const AIS_SelectionScheme theSelScheme)
 Sets list of owner selected/deselected using specified selection scheme.
 
void FitSelected (const occ::handle< V3d_View > &theView, const double theMargin, const bool theToUpdate)
 Fits the view correspondingly to the bounds of selected objects. Infinite objects are ignored if infinite state of AIS_InteractiveObject is set to true.
 
void FitSelected (const occ::handle< V3d_View > &theView)
 Fits the view correspondingly to the bounds of selected objects. Infinite objects are ignored if infinite state of AIS_InteractiveObject is set to true.
 
bool ToHilightSelected () const
 Return value specified whether selected object must be hilighted when mouse cursor is moved above it.
 
void SetToHilightSelected (const bool toHilight)
 Specify whether selected object must be hilighted when mouse cursor is moved above it (in MoveTo method). By default this value is false and selected object is not hilighted in this case.
 
bool AutomaticHilight () const
 Returns true if the automatic highlight mode is active; TRUE by default.
 
void SetAutomaticHilight (bool theStatus)
 Sets the highlighting status of detected and selected entities. This function allows you to disconnect the automatic mode.
 
void SetSelected (const occ::handle< SelectMgr_EntityOwner > &theOwners, const bool theToUpdateViewer)
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check.
 
void SetSelected (const occ::handle< AIS_InteractiveObject > &theObject, const bool theToUpdateViewer)
 Puts the interactive object aniObj in the list of selected objects. Performs selection filters check.
 
void AddOrRemoveSelected (const occ::handle< AIS_InteractiveObject > &theObject, const bool theToUpdateViewer)
 Allows to highlight or unhighlight the owner given depending on its selection status.
 
bool SetSelectedState (const occ::handle< SelectMgr_EntityOwner > &theOwner, const bool theIsSelected)
 Updates Selected state of specified owner without calling HilightSelected(). Has no effect if Selected state is not changed, and redirects to AddOrRemoveSelected() otherwise.
 
void HilightSelected (const bool theToUpdateViewer)
 Highlights selected objects.
 
void UnhilightSelected (const bool theToUpdateViewer)
 Removes highlighting from selected objects.
 
void UpdateSelected (bool theToUpdateViewer)
 Updates the list of selected objects: i.e. highlights the newly selected ones and unhighlights previously selected objects.
 
void ClearSelected (const bool theToUpdateViewer)
 Empties previous selected objects in order to get the selected objects detected by the selector using UpdateSelected.
 
void AddOrRemoveSelected (const occ::handle< SelectMgr_EntityOwner > &theOwner, const bool theToUpdateViewer)
 Allows to highlight or unhighlight the owner given depending on its selection status.
 
bool IsSelected (const occ::handle< SelectMgr_EntityOwner > &theOwner) const
 Returns true is the owner given is selected.
 
bool IsSelected (const occ::handle< AIS_InteractiveObject > &theObj) const
 Returns true is the object given is selected.
 
occ::handle< AIS_InteractiveObjectFirstSelectedObject () const
 Returns the first selected object in the list of current selected.
 
int NbSelected ()
 Count a number of selected entities using InitSelected()+MoreSelected()+NextSelected() iterator.
 
void InitSelected ()
 Initializes a scan of the selected objects.
 
bool MoreSelected () const
 Returns true if there is another object found by the scan of the list of selected objects.
 
void NextSelected ()
 Continues the scan to the next object in the list of selected objects.
 
occ::handle< SelectMgr_EntityOwnerSelectedOwner () const
 Returns the owner of the selected entity.
 
occ::handle< AIS_InteractiveObjectSelectedInteractive () const
 Return Handle(AIS_InteractiveObject)::DownCast (SelectedOwner()->Selectable()).
 
bool HasSelectedShape () const
 Returns TRUE if the interactive context has a shape selected.
 
TopoDS_Shape SelectedShape () const
 Returns the selected shape. Basically it is just a shape returned stored by StdSelect_BRepOwner with graphic transformation being applied:
 
bool HasApplicative () const
 Returns SelectedInteractive()->HasOwner().
 
occ::handle< Standard_TransientApplicative () const
 Returns SelectedInteractive()->GetOwner().
 
immediate mode rendering
Deprecated method Graphic3d_ZLayerId with IsImmediate flag should be used instead bool BeginImmediateDraw ()
 
Deprecated method Graphic3d_ZLayerId with IsImmediate flag should be used instead bool ImmediateAdd (const occ::handle< AIS_InteractiveObject > &theObj, const int theMode=0)
 
Deprecated method Graphic3d_ZLayerId with IsImmediate flag should be used instead bool EndImmediateDraw (const occ::handle< V3d_View > &theView)
 
Deprecated method Graphic3d_ZLayerId with IsImmediate flag should be used instead bool EndImmediateDraw ()
 
Deprecated method Graphic3d_ZLayerId with IsImmediate flag should be used instead bool IsImmediateModeOn () const
 
void RedrawImmediate (const occ::handle< V3d_Viewer > &theViewer)
 Redraws immediate structures in all views of the viewer given taking into account its visibility.
 
management of active Selection Modes

Activates or deactivates the selection mode for specified object. Has no effect if selection mode was already active/deactivated.

Parameters
theObjobject to activate/deactivate selection mode
theModeselection mode to activate/deactivate; deactivation of -1 selection mode will effectively deactivate all selection modes; activation of -1 selection mode with AIS_SelectionModesConcurrency_Single will deactivate all selection modes, and will has no effect otherwise
theToActivateactivation/deactivation flag
theConcurrencyspecifies how to handle already activated selection modes; default value (AIS_SelectionModesConcurrency_Multiple) means active selection modes should be left as is, AIS_SelectionModesConcurrency_Single can be used if only one selection mode is expected to be active and AIS_SelectionModesConcurrency_GlobalOrLocal can be used if either AIS_InteractiveObject::GlobalSelectionMode() or any combination of Local selection modes is acceptable; this value is considered only if theToActivate set to TRUE
theIsForcewhen set to TRUE, the display status will be ignored while activating selection mode
void SetSelectionModeActive (const occ::handle< AIS_InteractiveObject > &theObj, const int theMode, const bool theToActivate, const AIS_SelectionModesConcurrency theConcurrency=AIS_SelectionModesConcurrency_Multiple, const bool theIsForce=false)
 Activates the selection mode aMode whose index is given, for the given interactive entity anIobj.
 
void Activate (const occ::handle< AIS_InteractiveObject > &theObj, const int theMode=0, const bool theIsForce=false)
 Activates the selection mode aMode whose index is given, for the given interactive entity anIobj.
 
void Activate (const int theMode, const bool theIsForce=false)
 Activates the given selection mode for the all displayed objects.
 
void Deactivate (const occ::handle< AIS_InteractiveObject > &theObj)
 Deactivates all the activated selection modes of an object.
 
void Deactivate (const occ::handle< AIS_InteractiveObject > &theObj, const int theMode)
 Deactivates all the activated selection modes of the interactive object anIobj with a given selection mode aMode.
 
void Deactivate (const int theMode)
 Deactivates the given selection mode for all displayed objects.
 
void Deactivate ()
 Deactivates all the activated selection mode at all displayed objects.
 
void ActivatedModes (const occ::handle< AIS_InteractiveObject > &anIobj, NCollection_List< int > &theList) const
 Returns the list of activated selection modes.
 
void EntityOwners (occ::handle< NCollection_Shared< NCollection_IndexedMap< occ::handle< SelectMgr_EntityOwner > > > > &theOwners, const occ::handle< AIS_InteractiveObject > &theIObj, const int theMode=-1) const
 Returns a collection containing all entity owners created for the interactive object in specified selection mode (in all active modes if the Mode == -1)
 
Selection Filters management
Returns
the context selection filter type.
SelectMgr_FilterType FilterType () const
 Sets the context selection filter type. SelectMgr_TypeFilter_OR selection filter is used by default.
 
void SetFilterType (const SelectMgr_FilterType theFilterType)
 Sets the context selection filter type. SelectMgr_TypeFilter_OR selection filter is used by default.
 
const NCollection_List< occ::handle< SelectMgr_Filter > > & Filters () const
 Returns the list of filters active in a local context.
 
const occ::handle< SelectMgr_AndOrFilter > & GlobalFilter () const
 
void AddFilter (const occ::handle< SelectMgr_Filter > &theFilter)
 Allows you to add the filter.
 
void RemoveFilter (const occ::handle< SelectMgr_Filter > &theFilter)
 Removes a filter from context.
 
void RemoveFilters ()
 Remove all filters from context.
 
SelectMgr_PickingStrategy PickingStrategy () const
 Return picking strategy; SelectMgr_PickingStrategy_FirstAcceptable by default.
 
void SetPickingStrategy (const SelectMgr_PickingStrategy theStrategy)
 Setup picking strategy - which entities detected by picking line will be accepted, considering Selection Filters. By default (SelectMgr_PickingStrategy_FirstAcceptable), Selection Filters reduce the list of entities so that the context accepts topmost in remaining.
 
common properties

Returns the default attribute manager. This contains all the color and line attributes which can be used by interactive objects which do not have their own attributes.

const occ::handle< Prs3d_Drawer > & DefaultDrawer () const
 Sets the default attribute manager; should be set at context creation time. Warning - this setter doesn't update links to the default drawer of already displayed objects!
 
void SetDefaultDrawer (const occ::handle< Prs3d_Drawer > &theDrawer)
 Sets the default attribute manager; should be set at context creation time. Warning - this setter doesn't update links to the default drawer of already displayed objects!
 
const occ::handle< V3d_Viewer > & CurrentViewer () const
 Returns the current viewer.
 
const occ::handle< SelectMgr_SelectionManager > & SelectionManager () const
 Sets the default attribute manager; should be set at context creation time. Warning - this setter doesn't update links to the default drawer of already displayed objects!
 
const occ::handle< PrsMgr_PresentationManager > & MainPrsMgr () const
 Sets the default attribute manager; should be set at context creation time. Warning - this setter doesn't update links to the default drawer of already displayed objects!
 
const occ::handle< StdSelect_ViewerSelector3d > & MainSelector () const
 Sets the default attribute manager; should be set at context creation time. Warning - this setter doesn't update links to the default drawer of already displayed objects!
 
void UpdateCurrentViewer ()
 Updates the current viewer.
 
void DisplayedObjects (NCollection_List< occ::handle< AIS_InteractiveObject > > &aListOfIO) const
 Returns the list of displayed objects of a particular Type WhichKind and Signature WhichSignature. By Default, WhichSignature equals -1. This means that there is a check on type only.
 
void DisplayedObjects (const AIS_KindOfInteractive theWhichKind, const int theWhichSignature, NCollection_List< occ::handle< AIS_InteractiveObject > > &theListOfIO) const
 gives the list of displayed objects of a particular Type and signature. by Default, <WhichSignature> = -1 means control only on <WhichKind>.
 
void ErasedObjects (NCollection_List< occ::handle< AIS_InteractiveObject > > &theListOfIO) const
 Returns the list theListOfIO of erased objects (hidden objects) particular Type WhichKind and Signature WhichSignature. By Default, WhichSignature equals 1. This means that there is a check on type only.
 
void ErasedObjects (const AIS_KindOfInteractive theWhichKind, const int theWhichSignature, NCollection_List< occ::handle< AIS_InteractiveObject > > &theListOfIO) const
 gives the list of erased objects (hidden objects) Type and signature by Default, <WhichSignature> = -1 means control only on <WhichKind>.
 
void ObjectsByDisplayStatus (const PrsMgr_DisplayStatus theStatus, NCollection_List< occ::handle< AIS_InteractiveObject > > &theListOfIO) const
 Returns the list theListOfIO of objects with indicated display status particular Type WhichKind and Signature WhichSignature. By Default, WhichSignature equals 1. This means that there is a check on type only.
 
void ObjectsByDisplayStatus (const AIS_KindOfInteractive WhichKind, const int WhichSignature, const PrsMgr_DisplayStatus theStatus, NCollection_List< occ::handle< AIS_InteractiveObject > > &theListOfIO) const
 gives the list of objects with indicated display status Type and signature by Default, <WhichSignature> = -1 means control only on <WhichKind>.
 
void ObjectsInside (NCollection_List< occ::handle< AIS_InteractiveObject > > &aListOfIO, const AIS_KindOfInteractive WhichKind=AIS_KindOfInteractive_None, const int WhichSignature=-1) const
 fills <aListOfIO> with objects of a particular Type and Signature with no consideration of display status. by Default, <WhichSignature> = -1 means control only on <WhichKind>. if <WhichKind> = AIS_KindOfInteractive_None and <WhichSignature> = -1, all the objects are put into the list.
 
NCollection_DataMap< occ::handle< AIS_InteractiveObject >, occ::handle< AIS_GlobalStatus > >::Iterator ObjectIterator () const
 Create iterator through all objects registered in context.
 
void RebuildSelectionStructs ()
 Rebuilds 1st level of BVH selection forcibly.
 
void Disconnect (const occ::handle< AIS_InteractiveObject > &theAssembly, const occ::handle< AIS_InteractiveObject > &theObjToDisconnect=nullptr)
 Disconnects theObjToDisconnect from theAssembly and removes dependent selection structures.
 
void ObjectsForView (NCollection_List< occ::handle< AIS_InteractiveObject > > &theListOfIO, const occ::handle< V3d_View > &theView, const bool theIsVisibleInView, const PrsMgr_DisplayStatus theStatus=PrsMgr_DisplayStatus_None) const
 Query objects visible or hidden in specified view due to affinity mask.
 
virtual gp_Pnt GravityPoint (const occ::handle< V3d_View > &theView) const
 Return rotation gravity point.
 
debug visualization

Visualization of sensitives - for debugging purposes!

void DisplayActiveSensitive (const occ::handle< V3d_View > &aView)
 Clear visualization of sensitives.
 
void ClearActiveSensitive (const occ::handle< V3d_View > &aView)
 Clear visualization of sensitives.
 
void DisplayActiveSensitive (const occ::handle< AIS_InteractiveObject > &anObject, const occ::handle< V3d_View > &aView)
 Visualization of sensitives - for debugging purposes!
 
common object display attributes

Sets the graphic attributes of the interactive object, such as visualization mode, color, and material.

void SetLocalAttributes (const occ::handle< AIS_InteractiveObject > &theIObj, const occ::handle< Prs3d_Drawer > &theDrawer, const bool theToUpdateViewer)
 Removes the settings for local attributes of the Object and returns to defaults.
 
void UnsetLocalAttributes (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Removes the settings for local attributes of the Object and returns to defaults.
 
void SetCurrentFacingModel (const occ::handle< AIS_InteractiveObject > &aniobj, const Aspect_TypeOfFacingModel aModel=Aspect_TOFM_BOTH_SIDE)
 change the current facing model apply on polygons for SetColor(), SetTransparency(), SetMaterial() methods default facing model is Aspect_TOFM_TWO_SIDE. This mean that attributes is applying both on the front and back face.
 
bool HasColor (const occ::handle< AIS_InteractiveObject > &aniobj) const
 Returns true if a view of the Interactive Object has color.
 
void Color (const occ::handle< AIS_InteractiveObject > &aniobj, Quantity_Color &acolor) const
 Returns the color of the Object in the interactive context.
 
void SetColor (const occ::handle< AIS_InteractiveObject > &theIObj, const Quantity_Color &theColor, const bool theToUpdateViewer)
 Sets the color of the selected entity.
 
void UnsetColor (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Removes the color selection for the selected entity.
 
virtual double Width (const occ::handle< AIS_InteractiveObject > &aniobj) const
 Returns the width of the Interactive Object in the interactive context.
 
virtual void SetWidth (const occ::handle< AIS_InteractiveObject > &theIObj, const double theValue, const bool theToUpdateViewer)
 Sets the width of the Object.
 
virtual void UnsetWidth (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Removes the width setting of the Object.
 
void SetMaterial (const occ::handle< AIS_InteractiveObject > &theIObj, const Graphic3d_MaterialAspect &theMaterial, const bool theToUpdateViewer)
 Provides the type of material setting for the view of the Object.
 
void UnsetMaterial (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Removes the type of material setting for viewing the Object.
 
void SetTransparency (const occ::handle< AIS_InteractiveObject > &theIObj, const double theValue, const bool theToUpdateViewer)
 Provides the transparency settings for viewing the Object. The transparency value aValue may be between 0.0, opaque, and 1.0, fully transparent.
 
void UnsetTransparency (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Removes the transparency settings for viewing the Object.
 
void SetPolygonOffsets (const occ::handle< AIS_InteractiveObject > &theIObj, const int theMode, const float theFactor, const float theUnits, const bool theToUpdateViewer)
 Sets up polygon offsets for the given AIS_InteractiveObject. It simply calls AIS_InteractiveObject::SetPolygonOffsets().
 
bool HasPolygonOffsets (const occ::handle< AIS_InteractiveObject > &anObj) const
 Simply calls AIS_InteractiveObject::HasPolygonOffsets().
 
void PolygonOffsets (const occ::handle< AIS_InteractiveObject > &anObj, int &aMode, float &aFactor, float &aUnits) const
 Retrieves current polygon offsets settings for Object.
 
trihedron display attributes

Sets the size aSize of the trihedron. Is used to change the default value 100 mm for display of trihedra. Use of this function in one of your own interactive objects requires a call to the Compute function of the new class. This will recalculate the presentation for every trihedron displayed.

void SetTrihedronSize (const double theSize, const bool theToUpdateViewer)
 returns the current value of trihedron size.
 
double TrihedronSize () const
 returns the current value of trihedron size.
 
plane display attributes

Sets the plane size defined by the length in the X direction XSize and that in the Y direction YSize.

void SetPlaneSize (const double theSizeX, const double theSizeY, const bool theToUpdateViewer)
 Sets the plane size aSize.
 
void SetPlaneSize (const double theSize, const bool theToUpdateViewer)
 Sets the plane size aSize.
 
bool PlaneSize (double &XSize, double &YSize) const
 Returns true if the length in the X direction XSize is the same as that in the Y direction YSize.
 
tessellation deviation properties for automatic triangulation

Sets the deviation coefficient theCoefficient. Drawings of curves or patches are made with respect to a maximal chordal deviation. A Deviation coefficient is used in the shading display mode. The shape is seen decomposed into triangles. These are used to calculate reflection of light from the surface of the object. The triangles are formed from chords of the curves in the shape. The deviation coefficient theCoefficient gives the highest value of the angle with which a chord can deviate from a tangent to a curve. If this limit is reached, a new triangle is begun. This deviation is absolute and is set through the method: SetMaximalChordialDeviation. The default value is 0.001. In drawing shapes, however, you are allowed to ask for a relative deviation. This deviation will be: SizeOfObject * DeviationCoefficient.

void SetDeviationCoefficient (const occ::handle< AIS_InteractiveObject > &theIObj, const double theCoefficient, const bool theToUpdateViewer)
 Calls the AIS_Shape SetAngleAndDeviation to set both Angle and Deviation coefficients.
 
void SetDeviationAngle (const occ::handle< AIS_InteractiveObject > &theIObj, const double theAngle, const bool theToUpdateViewer)
 Calls the AIS_Shape SetAngleAndDeviation to set both Angle and Deviation coefficients.
 
void SetAngleAndDeviation (const occ::handle< AIS_InteractiveObject > &theIObj, const double theAngle, const bool theToUpdateViewer)
 Calls the AIS_Shape SetAngleAndDeviation to set both Angle and Deviation coefficients.
 
void SetDeviationCoefficient (const double theCoefficient)
 Sets the deviation coefficient theCoefficient. Drawings of curves or patches are made with respect to a maximal chordal deviation. A Deviation coefficient is used in the shading display mode. The shape is seen decomposed into triangles. These are used to calculate reflection of light from the surface of the object. The triangles are formed from chords of the curves in the shape. The deviation coefficient theCoefficient gives the highest value of the angle with which a chord can deviate from a tangent to a curve. If this limit is reached, a new triangle is begun. This deviation is absolute and is set through the method: SetMaximalChordialDeviation. The default value is 0.001. In drawing shapes, however, you are allowed to ask for a relative deviation. This deviation will be: SizeOfObject * DeviationCoefficient.
 
double DeviationCoefficient () const
 Returns the deviation coefficient. Drawings of curves or patches are made with respect to a maximal chordal deviation. A Deviation coefficient is used in the shading display mode. The shape is seen decomposed into triangles. These are used to calculate reflection of light from the surface of the object. The triangles are formed from chords of the curves in the shape. The deviation coefficient gives the highest value of the angle with which a chord can deviate from a tangent to a curve. If this limit is reached, a new triangle is begun. This deviation is absolute and is set through Prs3d_Drawer::SetMaximalChordialDeviation. The default value is 0.001. In drawing shapes, however, you are allowed to ask for a relative deviation. This deviation will be: SizeOfObject * DeviationCoefficient.
 
void SetDeviationAngle (const double theAngle)
 default 20 degrees
 
double DeviationAngle () const
 Calls the AIS_Shape SetAngleAndDeviation to set both Angle and Deviation coefficients.
 
HLR (Hidden Line Removal) display attributes

Initializes hidden line aspect in the default drawing tool, or Drawer. The default values are: Color: Quantity_NOC_YELLOW Type of line: Aspect_TOL_DASH Width: 1.

const occ::handle< Prs3d_LineAspect > & HiddenLineAspect () const
 Sets the hidden line aspect anAspect. Aspect defines display attributes for hidden lines in HLR projections.
 
void SetHiddenLineAspect (const occ::handle< Prs3d_LineAspect > &theAspect) const
 Sets the hidden line aspect anAspect. Aspect defines display attributes for hidden lines in HLR projections.
 
bool DrawHiddenLine () const
 returns true if the hidden lines are to be drawn. By default the hidden lines are not drawn.
 
void EnableDrawHiddenLine () const
 Sets the hidden line aspect anAspect. Aspect defines display attributes for hidden lines in HLR projections.
 
void DisableDrawHiddenLine () const
 Sets the hidden line aspect anAspect. Aspect defines display attributes for hidden lines in HLR projections.
 
iso-line display attributes

Sets the number of U and V isoparameters displayed.

void SetIsoNumber (const int NbIsos, const AIS_TypeOfIso WhichIsos=AIS_TOI_Both)
 Returns the number of U and V isoparameters displayed.
 
int IsoNumber (const AIS_TypeOfIso WhichIsos=AIS_TOI_Both)
 Returns the number of U and V isoparameters displayed.
 
void IsoOnPlane (const bool theToSwitchOn)
 Returns True if drawing isoparameters on planes is enabled.
 
bool IsoOnPlane () const
 Returns True if drawing isoparameters on planes is enabled. if <forUIsos> = False,.
 
void IsoOnTriangulation (const bool theIsEnabled, const occ::handle< AIS_InteractiveObject > &theObject)
 Enables or disables on-triangulation build for isolines for a particular object. In case if on-triangulation builder is disabled, default on-plane builder will compute isolines for the object given.
 
void IsoOnTriangulation (const bool theToSwitchOn)
 Enables or disables on-triangulation build for isolines for default drawer. In case if on-triangulation builder is disabled, default on-plane builder will compute isolines for the object given.
 
bool IsoOnTriangulation () const
 Returns true if drawing isolines on triangulation algorithm is enabled.
 
obsolete methods
theToAllowDecomposition void Display (const occ::handle< AIS_InteractiveObject > &theIObj, const int theDispMode, const int theSelectionMode, const bool theToUpdateViewer, const bool theToAllowDecomposition, const PrsMgr_DisplayStatus theDispStatus=PrsMgr_DisplayStatus_None)
 
theToAllowDecomposition void Load (const occ::handle< AIS_InteractiveObject > &theObj, int theSelectionMode, bool)
 
void Hilight (const occ::handle< AIS_InteractiveObject > &theObj, const bool theIsToUpdateViewer)
 Updates the display in the viewer to take dynamic detection into account. On dynamic detection by the mouse cursor, sensitive primitives are highlighted. The highlight color of entities detected by mouse movement is white by default.
 
Deprecated method presentation attributes should be assigned directly to object void SetSelectedAspect (const occ::handle< Prs3d_BasicAspect > &theAspect, const bool theToUpdateViewer)
 Sets the graphic basic aspect to the current presentation of ALL selected objects.
 
AIS_SelectionScheme_Replace should be called instead AIS_StatusOfPick Select (const int theXPMin, const int theYPMin, const int theXPMax, const int theYPMax, const occ::handle< V3d_View > &theView, const bool theToUpdateViewer)
 Selects everything found in the bounding rectangle defined by the pixel minima and maxima, XPMin, YPMin, XPMax, and YPMax in the view. The objects detected are passed to the main viewer, which is then updated.
 
AIS_SelectionScheme_Replace should be called instead AIS_StatusOfPick Select (const NCollection_Array1< gp_Pnt2d > &thePolyline, const occ::handle< V3d_View > &theView, const bool theToUpdateViewer)
 polyline selection; clears the previous picked list
 
AIS_SelectionScheme_Replace should be called instead AIS_StatusOfPick Select (const bool theToUpdateViewer)
 Stores and hilights the previous detected; Unhilights the previous picked.
 
should be called instead AIS_StatusOfPick ShiftSelect (const bool theToUpdateViewer)
 Adds the last detected to the list of previous picked. If the last detected was already declared as picked, removes it from the Picked List.
 
should be called instead AIS_StatusOfPick ShiftSelect (const NCollection_Array1< gp_Pnt2d > &thePolyline, const occ::handle< V3d_View > &theView, const bool theToUpdateViewer)
 Adds the last detected to the list of previous picked. If the last detected was already declared as picked, removes it from the Picked List.
 
AIS_SelectionScheme_XOR should be called instead AIS_StatusOfPick ShiftSelect (const int theXPMin, const int theYPMin, const int theXPMax, const int theYPMax, const occ::handle< V3d_View > &theView, const bool theToUpdateViewer)
 Rectangle of selection; adds new detected entities into the picked list, removes the detected entities that were already stored.
 
Context void SetCurrentObject (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Updates the view of the current object in open context. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.
 
Context void AddOrRemoveCurrentObject (const occ::handle< AIS_InteractiveObject > &theObj, const bool theIsToUpdateViewer)
 Allows to add or remove the object given to the list of current and highlight/unhighlight it correspondingly. Is valid for global context only; for local context use method AddOrRemoveSelected. Since this method makes sense only for neutral point selection of a whole object, if 0 selection of the object is empty this method simply does nothing.
 
Context void UpdateCurrent ()
 Updates the list of current objects, i.e. hilights new current objects, removes hilighting from former current objects. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.
 
Local Context is deprecated local selection should be used without Local Context bool IsCurrent (const occ::handle< AIS_InteractiveObject > &theObject) const
 Returns true if there is a non-null interactive object in Neutral Point. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.
 
Context void InitCurrent ()
 Initializes a scan of the current selected objects in Neutral Point. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.
 
Local Context is deprecated local selection should be used without Local Context bool MoreCurrent () const
 Returns true if there is another object found by the scan of the list of current objects. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.
 
Context void NextCurrent ()
 Continues the scan to the next object in the list of current objects. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.
 
Local Context is deprecated local selection should be used without Local Context occ::handle< AIS_InteractiveObjectCurrent () const
 Returns the current interactive object. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.
 
Local Context is deprecated local selection should be used without Local Context int NbCurrents ()
 
Context void HilightCurrents (const bool theToUpdateViewer)
 Highlights current objects. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.
 
Context void UnhilightCurrents (const bool theToUpdateViewer)
 Removes highlighting from current objects. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.
 
Context void ClearCurrents (const bool theToUpdateViewer)
 Empties previous current objects in order to get the current objects detected by the selector using UpdateCurrent. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.
 
Local Context is deprecated DetectedCurrentOwner () should be called instead") 1 const TopoDS_Shape & DetectedCurrentShape() const
 
sub-intensity management (deprecated)

Sub-intensity allows temporary highlighting of particular objects with specified color in a manner of selection highlight, but without actual selection (e.g., global status and owner's selection state will not be updated). The method returns the color of such highlighting. By default, it is Quantity_NOC_GRAY40.

Returns
current mouse-detected interactive object or null object, if there is no currently detected interactives
See also
DetectedCurrentOwner(), InitDetected(), MoreDetected(), NextDetected().
Deprecated
(
const Quantity_ColorSubIntensityColor () const
 Sub-intensity allows temporary highlighting of particular objects with specified color in a manner of selection highlight, but without actual selection (e.g., global status and owner's selection state will not be updated). The method sets up the color for such highlighting. By default, this is Quantity_NOC_GRAY40.
 
void SetSubIntensityColor (const Quantity_Color &theColor)
 Sub-intensity allows temporary highlighting of particular objects with specified color in a manner of selection highlight, but without actual selection (e.g., global status and owner's selection state will not be updated). The method sets up the color for such highlighting. By default, this is Quantity_NOC_GRAY40.
 
void SubIntensityOn (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Highlights, and removes highlights from, the displayed object which is displayed at Neutral Point with subintensity color. Available only for active local context. There is no effect if there is no local context. If a local context is open, the presentation of the Interactive Object activates the selection mode.
 
void SubIntensityOff (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Removes the subintensity option for the entity. If a local context is open, the presentation of the Interactive Object activates the selection mode.
 
const occ::handle< AIS_Selection > & Selection () const
 Returns selection instance.
 
void SetSelection (const occ::handle< AIS_Selection > &theSelection)
 Sets selection instance to manipulate a container of selected owners.
 
virtual void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
 Dumps the content of me into the stream.
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()=default
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
bool IsInstance (const char *const theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
bool IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
bool IsKind (const char *const theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
int GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
 
int DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

Protected Member Functions

internal methods
void GetDefModes (const occ::handle< AIS_InteractiveObject > &anIobj, int &Dmode, int &HiMod, int &SelMode) const
 Highlights detected objects. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to update view.
 
void EraseGlobal (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Highlights detected objects. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to update view.
 
void ClearGlobal (const occ::handle< AIS_InteractiveObject > &theIObj, const bool theToUpdateViewer)
 Highlights detected objects. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to update view.
 
void ClearGlobalPrs (const occ::handle< AIS_InteractiveObject > &theObj, const int theMode, const bool theToUpdateViewer)
 Highlights detected objects. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to update view.
 
void InitAttributes ()
 Highlights detected objects. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to update view.
 
AIS_StatusOfDetection moveTo (const occ::handle< V3d_View > &theView, const bool theToRedrawOnUpdate)
 Highlights detected objects. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to update view.
 
bool isDetected (const occ::handle< AIS_InteractiveObject > &theObject)
 Returns True if the object is detected.
 
void unselectOwners (const occ::handle< AIS_InteractiveObject > &theObject)
 Helper function to unhighlight all entity owners currently highlighted with seleciton color.
 
void highlightWithColor (const occ::handle< SelectMgr_EntityOwner > &theOwner, const occ::handle< V3d_Viewer > &theViewer=nullptr)
 Helper function that highlights the owner given with <theStyle> without performing AutoHighlight checks, e.g. is used for dynamic highlight.
 
void highlightSelected (const occ::handle< SelectMgr_EntityOwner > &theOwner)
 Helper function that highlights the owner given with <theStyle> with check for AutoHighlight, e.g. is used for selection.
 
void highlightOwners (const NCollection_List< occ::handle< SelectMgr_EntityOwner > > &theOwners, const occ::handle< Prs3d_Drawer > &theStyle)
 Helper function that highlights the owners with check for AutoHighlight, e.g. is used for selection.
 
void highlightGlobal (const occ::handle< AIS_InteractiveObject > &theObj, const occ::handle< Prs3d_Drawer > &theStyle, const int theDispMode)
 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.
 
void unhighlightSelected (const bool theIsToHilightSubIntensity=false)
 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. If the parameter <theIsToHilightSubIntensity> is set to true, interactive objects with sub-intensity switched on in AIS_GlobalStatus will be highlighted with context's sub-intensity color.
 
void unhighlightOwners (const NCollection_List< occ::handle< SelectMgr_EntityOwner > > &theOwners, const bool theIsToHilightSubIntensity=false)
 Helper function that unhighlights the owners with check for AutoHighlight, e.g. is used for selection.
 
void unhighlightGlobal (const occ::handle< AIS_InteractiveObject > &theObj)
 Helper function that unhighlights global selection owner of given interactive. The function does not perform any updates of global or owner status.
 
void turnOnSubintensity (const occ::handle< AIS_InteractiveObject > &theObject=nullptr, const int theDispMode=-1, const bool theIsDisplayedOnly=true) const
 Helper function that turns on sub-intensity in global status and highlights given objects with sub-intensity color.
 
void highlightWithSubintensity (const occ::handle< AIS_InteractiveObject > &theObject, const int theMode) const
 Helper function that highlights the object with sub-intensity color without any checks.
 
void highlightWithSubintensity (const occ::handle< SelectMgr_EntityOwner > &theOwner, const int theMode) const
 Helper function that highlights the owner with sub-intensity color without any checks.
 
const occ::handle< Prs3d_Drawer > & getHiStyle (const occ::handle< AIS_InteractiveObject > &theObj, const occ::handle< SelectMgr_EntityOwner > &theOwner) const
 Helper function that returns correct dynamic highlight style for the object: if custom style is defined via object's highlight drawer, it will be used. Otherwise, dynamic highlight style of interactive context will be returned.
 
bool isSlowHiStyle (const occ::handle< SelectMgr_EntityOwner > &theOwner, const occ::handle< V3d_Viewer > &theViewer) const
 Return TRUE if highlight style of owner requires full viewer redraw.
 
const occ::handle< Prs3d_Drawer > & getSelStyle (const occ::handle< AIS_InteractiveObject > &theObj, const occ::handle< SelectMgr_EntityOwner > &theOwner) const
 Helper function that returns correct selection style for the object: if custom style is defined via object's highlight drawer, it will be used. Otherwise, selection style of interactive context will be returned.
 
void setContextToObject (const occ::handle< AIS_InteractiveObject > &theObj)
 Assign the context to the object or throw exception if object was already assigned to another context.
 
int getHilightMode (const occ::handle< AIS_InteractiveObject > &theObj, const occ::handle< Prs3d_Drawer > &theStyle, const int theDispMode) const
 Return display mode for highlighting.
 
void clearDynamicHighlight () const
 Removes dynamic highlight draw.
 
void setObjectStatus (const occ::handle< AIS_InteractiveObject > &theIObj, const PrsMgr_DisplayStatus theStatus, const int theDispyMode, const int theSelectionMode)
 Bind/Unbind status to object and its children.
 

Protected Attributes

internal fields
NCollection_DataMap< occ::handle< AIS_InteractiveObject >, occ::handle< AIS_GlobalStatus > > myObjects
 context filter (the content active filters can be applied with AND or OR operation)
 
occ::handle< SelectMgr_SelectionManagermgrSelector
 context filter (the content active filters can be applied with AND or OR operation)
 
occ::handle< PrsMgr_PresentationManagermyMainPM
 context filter (the content active filters can be applied with AND or OR operation)
 
occ::handle< V3d_ViewermyMainVwr
 context filter (the content active filters can be applied with AND or OR operation)
 
V3d_ViewmyLastActiveView
 context filter (the content active filters can be applied with AND or OR operation)
 
occ::handle< SelectMgr_EntityOwnermyLastPicked
 context filter (the content active filters can be applied with AND or OR operation)
 
bool myToHilightSelected
 context filter (the content active filters can be applied with AND or OR operation)
 
occ::handle< AIS_SelectionmySelection
 context filter (the content active filters can be applied with AND or OR operation)
 
occ::handle< SelectMgr_AndOrFiltermyFilters
 context filter (the content active filters can be applied with AND or OR operation)
 
occ::handle< Prs3d_DrawermyDefaultDrawer
 context filter (the content active filters can be applied with AND or OR operation)
 
occ::handle< Prs3d_DrawermyStyles [Prs3d_TypeOfHighlight_NB]
 context filter (the content active filters can be applied with AND or OR operation)
 
NCollection_Sequence< intmyDetectedSeq
 context filter (the content active filters can be applied with AND or OR operation)
 
int myCurDetected
 context filter (the content active filters can be applied with AND or OR operation)
 
int myCurHighlighted
 context filter (the content active filters can be applied with AND or OR operation)
 
SelectMgr_PickingStrategy myPickingStrategy
 picking strategy to be applied within MoveTo()
 
bool myAutoHilight
 context filter (the content active filters can be applied with AND or OR operation)
 
bool myIsAutoActivateSelMode
 context filter (the content active filters can be applied with AND or OR operation)
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 

Detailed Description

The Interactive Context allows you to manage graphic behavior and selection of Interactive Objects in one or more viewers. Class methods make this highly transparent. It is essential to remember that an Interactive Object which is already known by the Interactive Context must be modified using Context methods. You can only directly call the methods available for an Interactive Object if it has not been loaded into an Interactive Context.

Each selectable object must specify the selection mode that is responsible for selection of object as a whole (global selection mode). Interactive context itself supports decomposed object selection with selection filters support. By default, global selection mode is equal to 0, but it might be redefined if needed.

Constructor & Destructor Documentation

◆ AIS_InteractiveContext()

AIS_InteractiveContext::AIS_InteractiveContext ( const occ::handle< V3d_Viewer > & MainViewer)

Destructor.

◆ ~AIS_InteractiveContext()

AIS_InteractiveContext::~AIS_InteractiveContext ( )
override

Destructor.

Member Function Documentation

◆ Activate() [1/2]

void AIS_InteractiveContext::Activate ( const int theMode,
const bool theIsForce = false )

Activates the given selection mode for the all displayed objects.

◆ Activate() [2/2]

void AIS_InteractiveContext::Activate ( const occ::handle< AIS_InteractiveObject > & theObj,
const int theMode = 0,
const bool theIsForce = false )
inline

Activates the selection mode aMode whose index is given, for the given interactive entity anIobj.

◆ ActivatedModes()

void AIS_InteractiveContext::ActivatedModes ( const occ::handle< AIS_InteractiveObject > & anIobj,
NCollection_List< int > & theList ) const

Returns the list of activated selection modes.

◆ AddFilter()

void AIS_InteractiveContext::AddFilter ( const occ::handle< SelectMgr_Filter > & theFilter)
inline

Allows you to add the filter.

◆ AddOrRemoveCurrentObject()

Context void AIS_InteractiveContext::AddOrRemoveCurrentObject ( const occ::handle< AIS_InteractiveObject > & theObj,
const bool theIsToUpdateViewer )
inline

Allows to add or remove the object given to the list of current and highlight/unhighlight it correspondingly. Is valid for global context only; for local context use method AddOrRemoveSelected. Since this method makes sense only for neutral point selection of a whole object, if 0 selection of the object is empty this method simply does nothing.

Deprecated
("Local Context is deprecated - local selection should be used without Local "

◆ AddOrRemoveSelected() [1/2]

void AIS_InteractiveContext::AddOrRemoveSelected ( const occ::handle< AIS_InteractiveObject > & theObject,
const bool theToUpdateViewer )

Allows to highlight or unhighlight the owner given depending on its selection status.

◆ AddOrRemoveSelected() [2/2]

void AIS_InteractiveContext::AddOrRemoveSelected ( const occ::handle< SelectMgr_EntityOwner > & theOwner,
const bool theToUpdateViewer )

Allows to highlight or unhighlight the owner given depending on its selection status.

◆ AddSelect() [1/2]

AIS_StatusOfPick AIS_InteractiveContext::AddSelect ( const occ::handle< AIS_InteractiveObject > & theObject)
inline

Adds object in the selection.

◆ AddSelect() [2/2]

AIS_StatusOfPick AIS_InteractiveContext::AddSelect ( const occ::handle< SelectMgr_EntityOwner > & theObject)

Adds object in the selection.

◆ Applicative()

occ::handle< Standard_Transient > AIS_InteractiveContext::Applicative ( ) const
inline

Returns SelectedInteractive()->GetOwner().

See also
SelectedOwner().

◆ AutomaticHilight()

bool AIS_InteractiveContext::AutomaticHilight ( ) const
inline

Returns true if the automatic highlight mode is active; TRUE by default.

See also
MoveTo(), Select(), HilightWithColor(), Unhilight()

◆ BeginImmediateDraw()

Deprecated method Graphic3d_ZLayerId with IsImmediate flag should be used instead bool AIS_InteractiveContext::BeginImmediateDraw ( )

◆ BoundingBoxOfSelection() [1/2]

Bnd_Box AIS_InteractiveContext::BoundingBoxOfSelection ( ) const
inline
Deprecated
("BoundingBoxOfSelection() should be called with View argument")

◆ BoundingBoxOfSelection() [2/2]

Bnd_Box AIS_InteractiveContext::BoundingBoxOfSelection ( const occ::handle< V3d_View > & theView) const

Returns bounding box of selected objects.

◆ ClearActiveSensitive()

void AIS_InteractiveContext::ClearActiveSensitive ( const occ::handle< V3d_View > & aView)

Clear visualization of sensitives.

◆ ClearCurrents()

Context void AIS_InteractiveContext::ClearCurrents ( const bool theToUpdateViewer)
inline

Empties previous current objects in order to get the current objects detected by the selector using UpdateCurrent. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.

Deprecated
("Local Context is deprecated - local selection should be used without Local "

◆ ClearDetected()

bool AIS_InteractiveContext::ClearDetected ( bool theToRedrawImmediate = false)

Clears the list of entities detected by MoveTo() and resets dynamic highlighting.

Parameters
theToRedrawImmediateif TRUE, the main Viewer will be redrawn on update
Returns
TRUE if viewer needs to be updated (e.g. there were actually dynamically highlighted entities)

◆ clearDynamicHighlight()

void AIS_InteractiveContext::clearDynamicHighlight ( ) const
inlineprotected

Removes dynamic highlight draw.

◆ ClearGlobal()

void AIS_InteractiveContext::ClearGlobal ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )
protected

Highlights detected objects. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to update view.

◆ ClearGlobalPrs()

void AIS_InteractiveContext::ClearGlobalPrs ( const occ::handle< AIS_InteractiveObject > & theObj,
const int theMode,
const bool theToUpdateViewer )
protected

Highlights detected objects. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to update view.

◆ ClearPrs()

void AIS_InteractiveContext::ClearPrs ( const occ::handle< AIS_InteractiveObject > & theIObj,
const int theMode,
const bool theToUpdateViewer )
inline

Empties the graphic presentation of the mode indexed by aMode. Warning! Removes theIObj. theIObj is still active if it was previously activated.

◆ ClearSelected()

void AIS_InteractiveContext::ClearSelected ( const bool theToUpdateViewer)

Empties previous selected objects in order to get the selected objects detected by the selector using UpdateSelected.

◆ Color()

void AIS_InteractiveContext::Color ( const occ::handle< AIS_InteractiveObject > & aniobj,
Quantity_Color & acolor ) const

Returns the color of the Object in the interactive context.

◆ Current()

Local Context is deprecated local selection should be used without Local Context occ::handle< AIS_InteractiveObject > AIS_InteractiveContext::Current ( ) const
inline

Returns the current interactive object. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.

Deprecated
(

◆ CurrentViewer()

const occ::handle< V3d_Viewer > & AIS_InteractiveContext::CurrentViewer ( ) const
inline

Returns the current viewer.

◆ Deactivate() [1/4]

void AIS_InteractiveContext::Deactivate ( )

Deactivates all the activated selection mode at all displayed objects.

◆ Deactivate() [2/4]

void AIS_InteractiveContext::Deactivate ( const int theMode)

Deactivates the given selection mode for all displayed objects.

◆ Deactivate() [3/4]

void AIS_InteractiveContext::Deactivate ( const occ::handle< AIS_InteractiveObject > & theObj)
inline

Deactivates all the activated selection modes of an object.

◆ Deactivate() [4/4]

void AIS_InteractiveContext::Deactivate ( const occ::handle< AIS_InteractiveObject > & theObj,
const int theMode )
inline

Deactivates all the activated selection modes of the interactive object anIobj with a given selection mode aMode.

◆ DefaultDrawer()

const occ::handle< Prs3d_Drawer > & AIS_InteractiveContext::DefaultDrawer ( ) const
inline

Sets the default attribute manager; should be set at context creation time. Warning - this setter doesn't update links to the default drawer of already displayed objects!

◆ DetectedCurrentOwner() [1/2]

occ::handle< SelectMgr_EntityOwner > AIS_InteractiveContext::DetectedCurrentOwner ( ) const

Returns the owner from detected list pointed by current iterator position. WARNING! This method is irrelevant to DetectedOwner() which returns last picked Owner regardless of iterator position!

See also
InitDetected(), MoreDetected(), NextDetected().

◆ DetectedCurrentOwner() [2/2]

Local Context is deprecated AIS_InteractiveContext::DetectedCurrentOwner ( ) const &
Returns
current mouse-detected shape or empty (null) shape, if current interactive object is not a shape (AIS_Shape) or there is no current mouse-detected interactive object at all.
See also
DetectedCurrentOwner(), InitDetected(), MoreDetected(), NextDetected().
Deprecated
(

◆ DetectedInteractive()

occ::handle< AIS_InteractiveObject > AIS_InteractiveContext::DetectedInteractive ( ) const
inline

Returns the interactive objects last detected in context. In general this is just a wrapper for occ::down_cast<AIS_InteractiveObject>(DetectedOwner()->Selectable()).

See also
DetectedOwner()

◆ DetectedOwner()

const occ::handle< SelectMgr_EntityOwner > & AIS_InteractiveContext::DetectedOwner ( ) const
inline

Returns the owner of the detected sensitive primitive which is currently dynamically highlighted. WARNING! This method is irrelevant to InitDetected()/MoreDetected()/NextDetected().

See also
HasDetected(), HasNextDetected(), HilightPreviousDetected(), HilightNextDetected().

◆ DetectedShape()

Local Context is deprecated local selection should be used without Local Context const TopoDS_Shape & AIS_InteractiveContext::DetectedShape ( ) const

Returns the shape detected in local context.

See also
DetectedOwner()
Deprecated
(

◆ DeviationAngle()

double AIS_InteractiveContext::DeviationAngle ( ) const
inline

Calls the AIS_Shape SetAngleAndDeviation to set both Angle and Deviation coefficients.

◆ DeviationCoefficient()

double AIS_InteractiveContext::DeviationCoefficient ( ) const
inline

Returns the deviation coefficient. Drawings of curves or patches are made with respect to a maximal chordal deviation. A Deviation coefficient is used in the shading display mode. The shape is seen decomposed into triangles. These are used to calculate reflection of light from the surface of the object. The triangles are formed from chords of the curves in the shape. The deviation coefficient gives the highest value of the angle with which a chord can deviate from a tangent to a curve. If this limit is reached, a new triangle is begun. This deviation is absolute and is set through Prs3d_Drawer::SetMaximalChordialDeviation. The default value is 0.001. In drawing shapes, however, you are allowed to ask for a relative deviation. This deviation will be: SizeOfObject * DeviationCoefficient.

◆ DisableDrawHiddenLine()

void AIS_InteractiveContext::DisableDrawHiddenLine ( ) const
inline

Sets the hidden line aspect anAspect. Aspect defines display attributes for hidden lines in HLR projections.

◆ Disconnect()

void AIS_InteractiveContext::Disconnect ( const occ::handle< AIS_InteractiveObject > & theAssembly,
const occ::handle< AIS_InteractiveObject > & theObjToDisconnect = nullptr )

Disconnects theObjToDisconnect from theAssembly and removes dependent selection structures.

◆ Display() [1/3]

void AIS_InteractiveContext::Display ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )

Displays the object in this Context using default Display Mode. This will be the object's default display mode, if there is one. Otherwise, it will be the context mode. The Interactive Object's default selection mode is activated if GetAutoActivateSelection() is TRUE. In general, this is 0.

◆ Display() [2/3]

theToAllowDecomposition void AIS_InteractiveContext::Display ( const occ::handle< AIS_InteractiveObject > & theIObj,
const int theDispMode,
const int theSelectionMode,
const bool theToUpdateViewer,
const bool theToAllowDecomposition,
const PrsMgr_DisplayStatus theDispStatus = PrsMgr_DisplayStatus_None )
inline
Deprecated
("Deprecated method Display() with obsolete argument "

◆ Display() [3/3]

void AIS_InteractiveContext::Display ( const occ::handle< AIS_InteractiveObject > & theIObj,
const int theDispMode,
const int theSelectionMode,
const bool theToUpdateViewer,
const PrsMgr_DisplayStatus theDispStatus = PrsMgr_DisplayStatus_None )

Sets status, display mode and selection mode for specified Object If theSelectionMode equals -1, theIObj will not be activated: it will be displayed but will not be selectable.

◆ DisplayActiveSensitive() [1/2]

void AIS_InteractiveContext::DisplayActiveSensitive ( const occ::handle< AIS_InteractiveObject > & anObject,
const occ::handle< V3d_View > & aView )

Visualization of sensitives - for debugging purposes!

◆ DisplayActiveSensitive() [2/2]

void AIS_InteractiveContext::DisplayActiveSensitive ( const occ::handle< V3d_View > & aView)

Clear visualization of sensitives.

◆ DisplayAll()

void AIS_InteractiveContext::DisplayAll ( const bool theToUpdateViewer)

Displays all hidden objects.

◆ DisplayedObjects() [1/2]

void AIS_InteractiveContext::DisplayedObjects ( const AIS_KindOfInteractive theWhichKind,
const int theWhichSignature,
NCollection_List< occ::handle< AIS_InteractiveObject > > & theListOfIO ) const

gives the list of displayed objects of a particular Type and signature. by Default, <WhichSignature> = -1 means control only on <WhichKind>.

◆ DisplayedObjects() [2/2]

void AIS_InteractiveContext::DisplayedObjects ( NCollection_List< occ::handle< AIS_InteractiveObject > > & aListOfIO) const

Returns the list of displayed objects of a particular Type WhichKind and Signature WhichSignature. By Default, WhichSignature equals -1. This means that there is a check on type only.

◆ DisplayMode()

int AIS_InteractiveContext::DisplayMode ( ) const
inline

Sets the display mode of seen Interactive Objects (which have no overridden Display Mode).

◆ DisplayPriority()

Graphic3d_DisplayPriority AIS_InteractiveContext::DisplayPriority ( const occ::handle< AIS_InteractiveObject > & theIObj) const

Sets the display priority of the seen parts presentation of the Object.

◆ DisplaySelected()

void AIS_InteractiveContext::DisplaySelected ( const bool theToUpdateViewer)

Displays current objects.

◆ DisplayStatus()

PrsMgr_DisplayStatus AIS_InteractiveContext::DisplayStatus ( const occ::handle< AIS_InteractiveObject > & anIobj) const

Returns the display status of the entity anIobj. This will be one of the following:

  • AIS_DS_Displayed displayed in main viewer
  • AIS_DS_Erased hidden in main viewer
  • AIS_DS_Temporary temporarily displayed
  • AIS_DS_None nowhere displayed.

◆ DrawHiddenLine()

bool AIS_InteractiveContext::DrawHiddenLine ( ) const
inline

returns true if the hidden lines are to be drawn. By default the hidden lines are not drawn.

◆ DumpJson()

virtual void AIS_InteractiveContext::DumpJson ( Standard_OStream & theOStream,
int theDepth = -1 ) const
virtual

Dumps the content of me into the stream.

◆ EnableDrawHiddenLine()

void AIS_InteractiveContext::EnableDrawHiddenLine ( ) const
inline

Sets the hidden line aspect anAspect. Aspect defines display attributes for hidden lines in HLR projections.

◆ EndImmediateDraw() [1/2]

Deprecated method Graphic3d_ZLayerId with IsImmediate flag should be used instead bool AIS_InteractiveContext::EndImmediateDraw ( )

◆ EndImmediateDraw() [2/2]

Deprecated method Graphic3d_ZLayerId with IsImmediate flag should be used instead bool AIS_InteractiveContext::EndImmediateDraw ( const occ::handle< V3d_View > & theView)

◆ EntityOwners()

void AIS_InteractiveContext::EntityOwners ( occ::handle< NCollection_Shared< NCollection_IndexedMap< occ::handle< SelectMgr_EntityOwner > > > > & theOwners,
const occ::handle< AIS_InteractiveObject > & theIObj,
const int theMode = -1 ) const

Returns a collection containing all entity owners created for the interactive object in specified selection mode (in all active modes if the Mode == -1)

◆ Erase()

void AIS_InteractiveContext::Erase ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )

Hides the object. The object's presentations are simply flagged as invisible and therefore excluded from redrawing. To show hidden objects, use Display().

◆ EraseAll()

void AIS_InteractiveContext::EraseAll ( const bool theToUpdateViewer)

Hides all objects. The object's presentations are simply flagged as invisible and therefore excluded from redrawing. To show all hidden objects, use DisplayAll().

◆ ErasedObjects() [1/2]

void AIS_InteractiveContext::ErasedObjects ( const AIS_KindOfInteractive theWhichKind,
const int theWhichSignature,
NCollection_List< occ::handle< AIS_InteractiveObject > > & theListOfIO ) const

gives the list of erased objects (hidden objects) Type and signature by Default, <WhichSignature> = -1 means control only on <WhichKind>.

◆ ErasedObjects() [2/2]

void AIS_InteractiveContext::ErasedObjects ( NCollection_List< occ::handle< AIS_InteractiveObject > > & theListOfIO) const

Returns the list theListOfIO of erased objects (hidden objects) particular Type WhichKind and Signature WhichSignature. By Default, WhichSignature equals 1. This means that there is a check on type only.

◆ EraseGlobal()

void AIS_InteractiveContext::EraseGlobal ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )
protected

Highlights detected objects. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to update view.

◆ EraseSelected()

void AIS_InteractiveContext::EraseSelected ( const bool theToUpdateViewer)

Hides selected objects. The object's presentations are simply flagged as invisible and therefore excluded from redrawing. To show hidden objects, use Display().

◆ Filters()

const NCollection_List< occ::handle< SelectMgr_Filter > > & AIS_InteractiveContext::Filters ( ) const
inline

Returns the list of filters active in a local context.

◆ FilterType()

SelectMgr_FilterType AIS_InteractiveContext::FilterType ( ) const
inline

Sets the context selection filter type. SelectMgr_TypeFilter_OR selection filter is used by default.

Parameters
theFilterTypethe filter type.

◆ FirstSelectedObject()

occ::handle< AIS_InteractiveObject > AIS_InteractiveContext::FirstSelectedObject ( ) const

Returns the first selected object in the list of current selected.

◆ FitSelected() [1/2]

void AIS_InteractiveContext::FitSelected ( const occ::handle< V3d_View > & theView)

Fits the view correspondingly to the bounds of selected objects. Infinite objects are ignored if infinite state of AIS_InteractiveObject is set to true.

◆ FitSelected() [2/2]

void AIS_InteractiveContext::FitSelected ( const occ::handle< V3d_View > & theView,
const double theMargin,
const bool theToUpdate )

Fits the view correspondingly to the bounds of selected objects. Infinite objects are ignored if infinite state of AIS_InteractiveObject is set to true.

◆ GetAutoActivateSelection()

bool AIS_InteractiveContext::GetAutoActivateSelection ( ) const
inline

Manages displaying the new object should also automatically activate default selection mode; TRUE by default.

◆ GetDefModes()

void AIS_InteractiveContext::GetDefModes ( const occ::handle< AIS_InteractiveObject > & anIobj,
int & Dmode,
int & HiMod,
int & SelMode ) const
protected

Highlights detected objects. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to update view.

◆ getHilightMode()

int AIS_InteractiveContext::getHilightMode ( const occ::handle< AIS_InteractiveObject > & theObj,
const occ::handle< Prs3d_Drawer > & theStyle,
const int theDispMode ) const
inlineprotected

Return display mode for highlighting.

◆ getHiStyle()

const occ::handle< Prs3d_Drawer > & AIS_InteractiveContext::getHiStyle ( const occ::handle< AIS_InteractiveObject > & theObj,
const occ::handle< SelectMgr_EntityOwner > & theOwner ) const
inlineprotected

Helper function that returns correct dynamic highlight style for the object: if custom style is defined via object's highlight drawer, it will be used. Otherwise, dynamic highlight style of interactive context will be returned.

Parameters
[in]theObjthe object to check

◆ getSelStyle()

const occ::handle< Prs3d_Drawer > & AIS_InteractiveContext::getSelStyle ( const occ::handle< AIS_InteractiveObject > & theObj,
const occ::handle< SelectMgr_EntityOwner > & theOwner ) const
inlineprotected

Helper function that returns correct selection style for the object: if custom style is defined via object's highlight drawer, it will be used. Otherwise, selection style of interactive context will be returned.

Parameters
[in]theObjthe object to check

◆ GetZLayer()

Graphic3d_ZLayerId AIS_InteractiveContext::GetZLayer ( const occ::handle< AIS_InteractiveObject > & theIObj) const

Get Z layer id set for displayed interactive object.

◆ GlobalFilter()

const occ::handle< SelectMgr_AndOrFilter > & AIS_InteractiveContext::GlobalFilter ( ) const
inline
Returns
the context selection global context filter.

◆ GravityPoint()

virtual gp_Pnt AIS_InteractiveContext::GravityPoint ( const occ::handle< V3d_View > & theView) const
virtual

Return rotation gravity point.

◆ HasApplicative()

bool AIS_InteractiveContext::HasApplicative ( ) const
inline

Returns SelectedInteractive()->HasOwner().

See also
SelectedOwner().

◆ HasColor()

bool AIS_InteractiveContext::HasColor ( const occ::handle< AIS_InteractiveObject > & aniobj) const

Returns true if a view of the Interactive Object has color.

◆ HasDetected()

bool AIS_InteractiveContext::HasDetected ( ) const
inline

Returns true if there is a mouse-detected entity in context.

See also
DetectedOwner(), HasNextDetected(), HilightPreviousDetected(), HilightNextDetected().

◆ HasDetectedShape()

Local Context is deprecated local selection should be used without Local Context bool AIS_InteractiveContext::HasDetectedShape ( ) const

Returns true if there is a detected shape in local context.

See also
HasDetected(), DetectedShape()
Deprecated
(

◆ HasLocation()

bool AIS_InteractiveContext::HasLocation ( const occ::handle< AIS_InteractiveObject > & theObject) const

Returns true if the Object has a location.

◆ HasNextDetected()

bool AIS_InteractiveContext::HasNextDetected ( ) const
inline

returns True if other entities were detected in the last mouse detection

See also
HilightPreviousDetected(), HilightNextDetected().

◆ HasPolygonOffsets()

bool AIS_InteractiveContext::HasPolygonOffsets ( const occ::handle< AIS_InteractiveObject > & anObj) const

◆ HasSelectedShape()

bool AIS_InteractiveContext::HasSelectedShape ( ) const

Returns TRUE if the interactive context has a shape selected.

See also
SelectedShape().

◆ HiddenLineAspect()

const occ::handle< Prs3d_LineAspect > & AIS_InteractiveContext::HiddenLineAspect ( ) const
inline

Sets the hidden line aspect anAspect. Aspect defines display attributes for hidden lines in HLR projections.

◆ highlightGlobal()

void AIS_InteractiveContext::highlightGlobal ( const occ::handle< AIS_InteractiveObject > & theObj,
const occ::handle< Prs3d_Drawer > & theStyle,
const int theDispMode )
protected

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.

◆ highlightOwners()

void AIS_InteractiveContext::highlightOwners ( const NCollection_List< occ::handle< SelectMgr_EntityOwner > > & theOwners,
const occ::handle< Prs3d_Drawer > & theStyle )
protected

Helper function that highlights the owners with check for AutoHighlight, e.g. is used for selection.

Parameters
[in]theOwnerslist of owners to highlight
[in]theStylehighlight style to apply or NULL to apply selection style

◆ highlightSelected()

void AIS_InteractiveContext::highlightSelected ( const occ::handle< SelectMgr_EntityOwner > & theOwner)
protected

Helper function that highlights the owner given with <theStyle> with check for AutoHighlight, e.g. is used for selection.

◆ HighlightStyle() [1/4]

const occ::handle< Prs3d_Drawer > & AIS_InteractiveContext::HighlightStyle ( ) const
inline

Returns current dynamic highlight style settings corresponding to Prs3d_TypeOfHighlight_Dynamic. This is just a short-cut to HighlightStyle(Prs3d_TypeOfHighlight_Dynamic).

◆ HighlightStyle() [2/4]

bool AIS_InteractiveContext::HighlightStyle ( const occ::handle< AIS_InteractiveObject > & theObj,
occ::handle< Prs3d_Drawer > & theStyle ) const

Returns highlight style of the object if it is marked as highlighted via global status.

Parameters
[in]theObjthe object to check

◆ HighlightStyle() [3/4]

bool AIS_InteractiveContext::HighlightStyle ( const occ::handle< SelectMgr_EntityOwner > & theOwner,
occ::handle< Prs3d_Drawer > & theStyle ) const

Returns highlight style of the owner if it is selected.

Parameters
[in]theOwnerthe owner to check

◆ HighlightStyle() [4/4]

const occ::handle< Prs3d_Drawer > & AIS_InteractiveContext::HighlightStyle ( const Prs3d_TypeOfHighlight theStyleType) const
inline

Setup highlight style settings. Tip: it is better modifying existing style returned by method HighlightStyle() instead of creating a new Prs3d_Drawer to avoid unexpected results due misconfiguration.

If a new highlight style is created, its presentation Zlayer should be checked, otherwise highlighting might not work as expected.

◆ highlightWithColor()

void AIS_InteractiveContext::highlightWithColor ( const occ::handle< SelectMgr_EntityOwner > & theOwner,
const occ::handle< V3d_Viewer > & theViewer = nullptr )
protected

Helper function that highlights the owner given with <theStyle> without performing AutoHighlight checks, e.g. is used for dynamic highlight.

◆ highlightWithSubintensity() [1/2]

void AIS_InteractiveContext::highlightWithSubintensity ( const occ::handle< AIS_InteractiveObject > & theObject,
const int theMode ) const
protected

Helper function that highlights the object with sub-intensity color without any checks.

Parameters
[in]theObjectthe object that will be highlighted
[in]theModedisplay mode

◆ highlightWithSubintensity() [2/2]

void AIS_InteractiveContext::highlightWithSubintensity ( const occ::handle< SelectMgr_EntityOwner > & theOwner,
const int theMode ) const
protected

Helper function that highlights the owner with sub-intensity color without any checks.

Parameters
[in]theOwnerthe owner that will be highlighted
[in]theModedisplay mode

◆ Hilight()

void AIS_InteractiveContext::Hilight ( const occ::handle< AIS_InteractiveObject > & theObj,
const bool theIsToUpdateViewer )
inline

Updates the display in the viewer to take dynamic detection into account. On dynamic detection by the mouse cursor, sensitive primitives are highlighted. The highlight color of entities detected by mouse movement is white by default.

Deprecated
("Deprecated method Hilight()")

◆ HilightCurrents()

Context void AIS_InteractiveContext::HilightCurrents ( const bool theToUpdateViewer)
inline

Highlights current objects. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.

Deprecated
("Local Context is deprecated - local selection should be used without Local "

◆ HilightNextDetected()

int AIS_InteractiveContext::HilightNextDetected ( const occ::handle< V3d_View > & theView,
const bool theToRedrawImmediate = true )

If more than 1 object is detected by the selector, only the "best" owner is hilighted at the mouse position. This Method allows the user to hilight one after another the other detected entities. If The method select is called, the selected entity will be the hilighted one! WARNING: Loop Method. When all the detected entities have been hilighted, the next call will hilight the first one again.

Returns
the Rank of hilighted entity
See also
HasNextDetected(), HilightPreviousDetected().

◆ HilightPreviousDetected()

int AIS_InteractiveContext::HilightPreviousDetected ( const occ::handle< V3d_View > & theView,
const bool theToRedrawImmediate = true )

Same as previous methods in reverse direction.

See also
HasNextDetected(), HilightNextDetected().

◆ HilightSelected()

void AIS_InteractiveContext::HilightSelected ( const bool theToUpdateViewer)

Highlights selected objects.

◆ HilightWithColor()

void AIS_InteractiveContext::HilightWithColor ( const occ::handle< AIS_InteractiveObject > & theObj,
const occ::handle< Prs3d_Drawer > & theStyle,
const bool theToUpdateViewer )

Changes the color of all the lines of the object in view.

◆ ImmediateAdd()

Deprecated method Graphic3d_ZLayerId with IsImmediate flag should be used instead bool AIS_InteractiveContext::ImmediateAdd ( const occ::handle< AIS_InteractiveObject > & theObj,
const int theMode = 0 )

◆ InitAttributes()

void AIS_InteractiveContext::InitAttributes ( )
protected

Highlights detected objects. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to update view.

◆ InitCurrent()

Context void AIS_InteractiveContext::InitCurrent ( )
inline

Initializes a scan of the current selected objects in Neutral Point. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.

Deprecated
("Local Context is deprecated - local selection should be used without Local "

◆ InitDetected()

void AIS_InteractiveContext::InitDetected ( )
inline

Return TRUE if there is more mouse-detected objects after the current one during iteration through mouse-detected interactive objects.

See also
DetectedCurrentOwner(), InitDetected(), NextDetected().

◆ InitSelected()

void AIS_InteractiveContext::InitSelected ( )
inline

Initializes a scan of the selected objects.

See also
SelectedOwner(), MoreSelected(), NextSelected().

◆ IsCurrent()

Local Context is deprecated local selection should be used without Local Context bool AIS_InteractiveContext::IsCurrent ( const occ::handle< AIS_InteractiveObject > & theObject) const
inline

Returns true if there is a non-null interactive object in Neutral Point. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.

Deprecated
(

◆ isDetected()

bool AIS_InteractiveContext::isDetected ( const occ::handle< AIS_InteractiveObject > & theObject)
protected

Returns True if the object is detected.

◆ IsDisplayed() [1/2]

bool AIS_InteractiveContext::IsDisplayed ( const occ::handle< AIS_InteractiveObject > & anIobj) const

Returns true if Object is displayed in the interactive context.

◆ IsDisplayed() [2/2]

bool AIS_InteractiveContext::IsDisplayed ( const occ::handle< AIS_InteractiveObject > & aniobj,
const int aMode ) const

Destructor.

◆ IsHilighted() [1/2]

bool AIS_InteractiveContext::IsHilighted ( const occ::handle< AIS_InteractiveObject > & theObj) const

Returns true if the object is marked as highlighted via its global status.

Parameters
[in]theObjthe object to check

◆ IsHilighted() [2/2]

bool AIS_InteractiveContext::IsHilighted ( const occ::handle< SelectMgr_EntityOwner > & theOwner) const

Returns true if the owner is marked as selected.

Parameters
[in]theOwnerthe owner to check

◆ IsImmediateModeOn()

Deprecated method Graphic3d_ZLayerId with IsImmediate flag should be used instead bool AIS_InteractiveContext::IsImmediateModeOn ( ) const

◆ IsoNumber()

int AIS_InteractiveContext::IsoNumber ( const AIS_TypeOfIso WhichIsos = AIS_TOI_Both)

Returns the number of U and V isoparameters displayed.

◆ IsoOnPlane() [1/2]

bool AIS_InteractiveContext::IsoOnPlane ( ) const
inline

Returns True if drawing isoparameters on planes is enabled. if <forUIsos> = False,.

◆ IsoOnPlane() [2/2]

void AIS_InteractiveContext::IsoOnPlane ( const bool theToSwitchOn)
inline

Returns True if drawing isoparameters on planes is enabled.

◆ IsoOnTriangulation() [1/3]

bool AIS_InteractiveContext::IsoOnTriangulation ( ) const
inline

Returns true if drawing isolines on triangulation algorithm is enabled.

◆ IsoOnTriangulation() [2/3]

void AIS_InteractiveContext::IsoOnTriangulation ( const bool theIsEnabled,
const occ::handle< AIS_InteractiveObject > & theObject )

Enables or disables on-triangulation build for isolines for a particular object. In case if on-triangulation builder is disabled, default on-plane builder will compute isolines for the object given.

◆ IsoOnTriangulation() [3/3]

void AIS_InteractiveContext::IsoOnTriangulation ( const bool theToSwitchOn)
inline

Enables or disables on-triangulation build for isolines for default drawer. In case if on-triangulation builder is disabled, default on-plane builder will compute isolines for the object given.

◆ IsSelected() [1/2]

bool AIS_InteractiveContext::IsSelected ( const occ::handle< AIS_InteractiveObject > & theObj) const

Returns true is the object given is selected.

◆ IsSelected() [2/2]

bool AIS_InteractiveContext::IsSelected ( const occ::handle< SelectMgr_EntityOwner > & theOwner) const
inline

Returns true is the owner given is selected.

◆ isSlowHiStyle()

bool AIS_InteractiveContext::isSlowHiStyle ( const occ::handle< SelectMgr_EntityOwner > & theOwner,
const occ::handle< V3d_Viewer > & theViewer ) const
protected

Return TRUE if highlight style of owner requires full viewer redraw.

◆ LastActiveView()

occ::handle< V3d_View > AIS_InteractiveContext::LastActiveView ( ) const

Returns last active View (argument of MoveTo()/Select() methods).

◆ Load() [1/2]

void AIS_InteractiveContext::Load ( const occ::handle< AIS_InteractiveObject > & theObj,
const int theSelectionMode = -1 )

Allows you to load the Interactive Object with a given selection mode, and/or with the desired decomposition option, whether the object is visualized or not. The loaded objects will be selectable but displayable in highlighting only when detected by the Selector.

◆ Load() [2/2]

theToAllowDecomposition void AIS_InteractiveContext::Load ( const occ::handle< AIS_InteractiveObject > & theObj,
int theSelectionMode,
bool  )
inline
Deprecated
("Deprecated method Load() with obsolete last argument "

◆ Location()

TopLoc_Location AIS_InteractiveContext::Location ( const occ::handle< AIS_InteractiveObject > & theObject) const

Returns the location of the Object.

◆ MainPrsMgr()

const occ::handle< PrsMgr_PresentationManager > & AIS_InteractiveContext::MainPrsMgr ( ) const
inline

Sets the default attribute manager; should be set at context creation time. Warning - this setter doesn't update links to the default drawer of already displayed objects!

◆ MainSelector()

const occ::handle< StdSelect_ViewerSelector3d > & AIS_InteractiveContext::MainSelector ( ) const
inline

Sets the default attribute manager; should be set at context creation time. Warning - this setter doesn't update links to the default drawer of already displayed objects!

◆ MoreCurrent()

Local Context is deprecated local selection should be used without Local Context bool AIS_InteractiveContext::MoreCurrent ( ) const
inline

Returns true if there is another object found by the scan of the list of current objects. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.

Deprecated
(

◆ MoreDetected()

bool AIS_InteractiveContext::MoreDetected ( ) const
inline

Return TRUE if there is more mouse-detected objects after the current one during iteration through mouse-detected interactive objects.

See also
DetectedCurrentOwner(), InitDetected(), NextDetected().

◆ MoreSelected()

bool AIS_InteractiveContext::MoreSelected ( ) const
inline

Returns true if there is another object found by the scan of the list of selected objects.

See also
SelectedOwner(), InitSelected(), NextSelected().

◆ MoveTo() [1/2]

AIS_StatusOfDetection AIS_InteractiveContext::MoveTo ( const gp_Ax1 & theAxis,
const occ::handle< V3d_View > & theView,
const bool theToRedrawOnUpdate )

Relays axis theAxis to the interactive context selectors. This is done by the view theView passing this axis to the main viewer and updating it. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to highlight detected object.

See also
PickingStrategy()

◆ MoveTo() [2/2]

AIS_StatusOfDetection AIS_InteractiveContext::MoveTo ( const int theXPix,
const int theYPix,
const occ::handle< V3d_View > & theView,
const bool theToRedrawOnUpdate )

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.

See also
PickingStrategy()
HighlightStyle() defining default dynamic highlight styles of detected owners (Prs3d_TypeOfHighlight_Dynamic and Prs3d_TypeOfHighlight_LocalDynamic)
PrsMgr_PresentableObject::DynamicHilightAttributes() defining per-object dynamic highlight style of detected owners (overrides defaults)

◆ moveTo()

AIS_StatusOfDetection AIS_InteractiveContext::moveTo ( const occ::handle< V3d_View > & theView,
const bool theToRedrawOnUpdate )
protected

Highlights detected objects. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to update view.

◆ NbCurrents()

Local Context is deprecated local selection should be used without Local Context int AIS_InteractiveContext::NbCurrents ( )
inline

◆ NbSelected()

int AIS_InteractiveContext::NbSelected ( )
inline

Count a number of selected entities using InitSelected()+MoreSelected()+NextSelected() iterator.

See also
SelectedOwner(), InitSelected(), MoreSelected(), NextSelected().

◆ NextCurrent()

Context void AIS_InteractiveContext::NextCurrent ( )
inline

Continues the scan to the next object in the list of current objects. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.

Deprecated
("Local Context is deprecated - local selection should be used without Local "

◆ NextDetected()

void AIS_InteractiveContext::NextDetected ( )
inline

Gets next current object during iteration through mouse-detected interactive objects.

See also
DetectedCurrentOwner(), InitDetected(), MoreDetected().

◆ NextSelected()

void AIS_InteractiveContext::NextSelected ( )
inline

Continues the scan to the next object in the list of selected objects.

See also
SelectedOwner(), InitSelected(), MoreSelected().

◆ ObjectIterator()

NCollection_DataMap< occ::handle< AIS_InteractiveObject >, occ::handle< AIS_GlobalStatus > >::Iterator AIS_InteractiveContext::ObjectIterator ( ) const
inline

Create iterator through all objects registered in context.

◆ ObjectsByDisplayStatus() [1/2]

void AIS_InteractiveContext::ObjectsByDisplayStatus ( const AIS_KindOfInteractive WhichKind,
const int WhichSignature,
const PrsMgr_DisplayStatus theStatus,
NCollection_List< occ::handle< AIS_InteractiveObject > > & theListOfIO ) const

gives the list of objects with indicated display status Type and signature by Default, <WhichSignature> = -1 means control only on <WhichKind>.

◆ ObjectsByDisplayStatus() [2/2]

void AIS_InteractiveContext::ObjectsByDisplayStatus ( const PrsMgr_DisplayStatus theStatus,
NCollection_List< occ::handle< AIS_InteractiveObject > > & theListOfIO ) const

Returns the list theListOfIO of objects with indicated display status particular Type WhichKind and Signature WhichSignature. By Default, WhichSignature equals 1. This means that there is a check on type only.

◆ ObjectsForView()

void AIS_InteractiveContext::ObjectsForView ( NCollection_List< occ::handle< AIS_InteractiveObject > > & theListOfIO,
const occ::handle< V3d_View > & theView,
const bool theIsVisibleInView,
const PrsMgr_DisplayStatus theStatus = PrsMgr_DisplayStatus_None ) const

Query objects visible or hidden in specified view due to affinity mask.

◆ ObjectsInside()

void AIS_InteractiveContext::ObjectsInside ( NCollection_List< occ::handle< AIS_InteractiveObject > > & aListOfIO,
const AIS_KindOfInteractive WhichKind = AIS_KindOfInteractive_None,
const int WhichSignature = -1 ) const

fills <aListOfIO> with objects of a particular Type and Signature with no consideration of display status. by Default, <WhichSignature> = -1 means control only on <WhichKind>. if <WhichKind> = AIS_KindOfInteractive_None and <WhichSignature> = -1, all the objects are put into the list.

◆ PickingStrategy()

SelectMgr_PickingStrategy AIS_InteractiveContext::PickingStrategy ( ) const
inline

Return picking strategy; SelectMgr_PickingStrategy_FirstAcceptable by default.

See also
MoveTo(), Filters()

◆ PixelTolerance()

int AIS_InteractiveContext::PixelTolerance ( ) const

Returns the pixel tolerance, default is 2. Pixel Tolerance extends sensitivity within MoveTo() operation (picking by point) and can be adjusted by application based on user input precision (e.g. screen pixel density, input device precision, etc.).

◆ PlaneSize()

bool AIS_InteractiveContext::PlaneSize ( double & XSize,
double & YSize ) const

Returns true if the length in the X direction XSize is the same as that in the Y direction YSize.

◆ PolygonOffsets()

void AIS_InteractiveContext::PolygonOffsets ( const occ::handle< AIS_InteractiveObject > & anObj,
int & aMode,
float & aFactor,
float & aUnits ) const

Retrieves current polygon offsets settings for Object.

◆ RebuildSelectionStructs()

void AIS_InteractiveContext::RebuildSelectionStructs ( )

Rebuilds 1st level of BVH selection forcibly.

◆ RecomputePrsOnly()

void AIS_InteractiveContext::RecomputePrsOnly ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer,
const bool theAllModes = false )

Recomputes the displayed presentations, flags the others. Doesn't update presentations.

◆ RecomputeSelectionOnly()

void AIS_InteractiveContext::RecomputeSelectionOnly ( const occ::handle< AIS_InteractiveObject > & anIObj)

Recomputes the active selections, flags the others. Doesn't update presentations.

◆ Redisplay() [1/2]

void AIS_InteractiveContext::Redisplay ( const AIS_KindOfInteractive theTypeOfObject,
const int theSignature,
const bool theToUpdateViewer )

Recomputes the Prs/Selection of displayed objects of a given type and a given signature. if signature = -1 doesn't take signature criterion.

◆ Redisplay() [2/2]

void AIS_InteractiveContext::Redisplay ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer,
const bool theAllModes = false )

Recomputes the seen parts presentation of the Object. If theAllModes equals true, all presentations are present in the object even if unseen.

◆ RedrawImmediate()

void AIS_InteractiveContext::RedrawImmediate ( const occ::handle< V3d_Viewer > & theViewer)
inline

Redraws immediate structures in all views of the viewer given taking into account its visibility.

◆ Remove()

void AIS_InteractiveContext::Remove ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )

Removes Object from every viewer.

◆ RemoveAll()

void AIS_InteractiveContext::RemoveAll ( const bool theToUpdateViewer)

Removes all the objects from Context.

◆ RemoveFilter()

void AIS_InteractiveContext::RemoveFilter ( const occ::handle< SelectMgr_Filter > & theFilter)
inline

Removes a filter from context.

◆ RemoveFilters()

void AIS_InteractiveContext::RemoveFilters ( )
inline

Remove all filters from context.

◆ ResetLocation()

void AIS_InteractiveContext::ResetLocation ( const occ::handle< AIS_InteractiveObject > & theObject)

Puts the Object back into its initial position.

◆ Select() [1/4]

AIS_SelectionScheme_Replace should be called instead AIS_StatusOfPick AIS_InteractiveContext::Select ( const bool theToUpdateViewer)

Stores and hilights the previous detected; Unhilights the previous picked.

See also
MoveTo().
Deprecated
("This method is deprecated - SelectDetected() taking "

◆ Select() [2/4]

AIS_SelectionScheme_Replace should be called instead AIS_StatusOfPick AIS_InteractiveContext::Select ( const int theXPMin,
const int theYPMin,
const int theXPMax,
const int theYPMax,
const occ::handle< V3d_View > & theView,
const bool theToUpdateViewer )

Selects everything found in the bounding rectangle defined by the pixel minima and maxima, XPMin, YPMin, XPMax, and YPMax in the view. The objects detected are passed to the main viewer, which is then updated.

Deprecated
("This method is deprecated - SelectRectangle() taking "

◆ Select() [3/4]

AIS_SelectionScheme_Replace should be called instead AIS_StatusOfPick AIS_InteractiveContext::Select ( const NCollection_Array1< gp_Pnt2d > & thePolyline,
const occ::handle< V3d_View > & theView,
const bool theToUpdateViewer )

polyline selection; clears the previous picked list

Deprecated
("This method is deprecated - SelectPolygon() taking "

◆ Select() [4/4]

AIS_StatusOfPick AIS_InteractiveContext::Select ( const NCollection_Array1< occ::handle< SelectMgr_EntityOwner > > & theOwners,
const AIS_SelectionScheme theSelScheme )

Sets list of owner selected/deselected using specified selection scheme.

Parameters
theOwnersowners to change selection state
theSelSchemeselection scheme
Returns
picking status

◆ SelectDetected()

AIS_StatusOfPick AIS_InteractiveContext::SelectDetected ( const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace)

Select and hilights the previous detected via AIS_InteractiveContext::MoveTo() method; unhilights the previous picked. Viewer should be explicitly redrawn after selection.

Parameters
[in]theSelSchemeselection scheme
Returns
picking status
See also
HighlightStyle() defining default highlight styles of selected owners (Prs3d_TypeOfHighlight_Selected and Prs3d_TypeOfHighlight_LocalSelected)
PrsMgr_PresentableObject::HilightAttributes() defining per-object highlight style of selected owners (overrides defaults) For all selection schemes, allowing to select an object, HandleMouseClick is available

◆ SelectedInteractive()

occ::handle< AIS_InteractiveObject > AIS_InteractiveContext::SelectedInteractive ( ) const
inline

Return Handle(AIS_InteractiveObject)::DownCast (SelectedOwner()->Selectable()).

See also
SelectedOwner().

◆ SelectedOwner()

occ::handle< SelectMgr_EntityOwner > AIS_InteractiveContext::SelectedOwner ( ) const
inline

Returns the owner of the selected entity.

See also
InitSelected(), MoreSelected(), NextSelected().

◆ SelectedShape()

TopoDS_Shape AIS_InteractiveContext::SelectedShape ( ) const

Returns the selected shape. Basically it is just a shape returned stored by StdSelect_BRepOwner with graphic transformation being applied:

aLocatedShape = aSelShape.Located (aBRepOwner->Location() * aSelShape.Location());
#define Handle(Class)
Define Handle() macro.
Definition Standard_Handle.hxx:448
occ::handle< SelectMgr_EntityOwner > SelectedOwner() const
Returns the owner of the selected entity.
Definition AIS_InteractiveContext.hxx:700
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142
Defines Specific Owners for Sensitive Primitives (Sensitive Segments,Circles...). Used in Dynamic Sel...
Definition StdSelect_BRepOwner.hxx:40
Describes a shape which.
Definition TopoDS_Shape.hxx:41
Intrusive smart pointer for use with Standard_Transient class and its descendants.
Definition Standard_Handle.hxx:54
See also
SelectedOwner(), HasSelectedShape().

◆ Selection()

const occ::handle< AIS_Selection > & AIS_InteractiveContext::Selection ( ) const
inline

Returns selection instance.

◆ SelectionManager()

const occ::handle< SelectMgr_SelectionManager > & AIS_InteractiveContext::SelectionManager ( ) const
inline

Sets the default attribute manager; should be set at context creation time. Warning - this setter doesn't update links to the default drawer of already displayed objects!

◆ SelectionStyle()

const occ::handle< Prs3d_Drawer > & AIS_InteractiveContext::SelectionStyle ( ) const
inline

Returns current selection style settings corresponding to Prs3d_TypeOfHighlight_Selected. This is just a short-cut to HighlightStyle(Prs3d_TypeOfHighlight_Selected).

◆ SelectPoint()

AIS_StatusOfPick AIS_InteractiveContext::SelectPoint ( const NCollection_Vec2< int > & thePnt,
const occ::handle< V3d_View > & theView,
const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace )

Selects the topmost object picked by the point in the view, Viewer should be explicitly redrawn after selection.

Parameters
[in]thePntpoint pixel coordinates within the view
[in]theViewactive view where point is defined
[in]theSelSchemeselection scheme
Returns
picking status

◆ SelectPolygon()

AIS_StatusOfPick AIS_InteractiveContext::SelectPolygon ( const NCollection_Array1< gp_Pnt2d > & thePolyline,
const occ::handle< V3d_View > & theView,
const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace )

Select everything found in the polygon defined by bounding polyline. Viewer should be explicitly redrawn after selection.

Parameters
[in]thePolylinepolyline defining polygon bounds (in pixels)
[in]theViewactive view where polyline is defined
[in]theSelSchemeselection scheme
Returns
picking status

◆ SelectRectangle()

AIS_StatusOfPick AIS_InteractiveContext::SelectRectangle ( const NCollection_Vec2< int > & thePntMin,
const NCollection_Vec2< int > & thePntMax,
const occ::handle< V3d_View > & theView,
const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace )

Selects objects within the bounding rectangle. Viewer should be explicitly redrawn after selection.

Parameters
[in]thePntMinrectangle lower point (in pixels)
[in]thePntMaxrectangle upper point (in pixels)
[in]theViewactive view where rectangle is defined
[in]theSelSchemeselection scheme
Returns
picking status
See also
StdSelect_ViewerSelector3d::AllowOverlapDetection()

◆ SetAngleAndDeviation()

void AIS_InteractiveContext::SetAngleAndDeviation ( const occ::handle< AIS_InteractiveObject > & theIObj,
const double theAngle,
const bool theToUpdateViewer )

Calls the AIS_Shape SetAngleAndDeviation to set both Angle and Deviation coefficients.

◆ SetAutoActivateSelection()

void AIS_InteractiveContext::SetAutoActivateSelection ( const bool theIsAuto)
inline

Enable or disable automatic activation of default selection mode while displaying the object.

◆ SetAutomaticHilight()

void AIS_InteractiveContext::SetAutomaticHilight ( bool theStatus)
inline

Sets the highlighting status of detected and selected entities. This function allows you to disconnect the automatic mode.

MoveTo() will fill the list of detected entities and Select() will set selected state to detected objects regardless of this flag, but with disabled AutomaticHiligh() their highlighting state will be left unaffected, so that application will be able performing custom highlighting in a different way, if needed.

This API should be distinguished from SelectMgr_SelectableObject::SetAutoHilight() that is used to implement custom highlighting logic for a specific interactive object class.

See also
MoveTo(), Select(), HilightWithColor(), Unhilight()

◆ SetColor()

void AIS_InteractiveContext::SetColor ( const occ::handle< AIS_InteractiveObject > & theIObj,
const Quantity_Color & theColor,
const bool theToUpdateViewer )

Sets the color of the selected entity.

◆ setContextToObject()

void AIS_InteractiveContext::setContextToObject ( const occ::handle< AIS_InteractiveObject > & theObj)
protected

Assign the context to the object or throw exception if object was already assigned to another context.

◆ SetCurrentFacingModel()

void AIS_InteractiveContext::SetCurrentFacingModel ( const occ::handle< AIS_InteractiveObject > & aniobj,
const Aspect_TypeOfFacingModel aModel = Aspect_TOFM_BOTH_SIDE )

change the current facing model apply on polygons for SetColor(), SetTransparency(), SetMaterial() methods default facing model is Aspect_TOFM_TWO_SIDE. This mean that attributes is applying both on the front and back face.

◆ SetCurrentObject()

Context void AIS_InteractiveContext::SetCurrentObject ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )
inline

Updates the view of the current object in open context. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.

Deprecated
("Local Context is deprecated - local selection should be used without Local "

◆ SetDefaultDrawer()

void AIS_InteractiveContext::SetDefaultDrawer ( const occ::handle< Prs3d_Drawer > & theDrawer)
inline

Sets the default attribute manager; should be set at context creation time. Warning - this setter doesn't update links to the default drawer of already displayed objects!

◆ SetDeviationAngle() [1/2]

void AIS_InteractiveContext::SetDeviationAngle ( const double theAngle)
inline

default 20 degrees

◆ SetDeviationAngle() [2/2]

void AIS_InteractiveContext::SetDeviationAngle ( const occ::handle< AIS_InteractiveObject > & theIObj,
const double theAngle,
const bool theToUpdateViewer )

Calls the AIS_Shape SetAngleAndDeviation to set both Angle and Deviation coefficients.

◆ SetDeviationCoefficient() [1/2]

void AIS_InteractiveContext::SetDeviationCoefficient ( const double theCoefficient)
inline

Sets the deviation coefficient theCoefficient. Drawings of curves or patches are made with respect to a maximal chordal deviation. A Deviation coefficient is used in the shading display mode. The shape is seen decomposed into triangles. These are used to calculate reflection of light from the surface of the object. The triangles are formed from chords of the curves in the shape. The deviation coefficient theCoefficient gives the highest value of the angle with which a chord can deviate from a tangent to a curve. If this limit is reached, a new triangle is begun. This deviation is absolute and is set through the method: SetMaximalChordialDeviation. The default value is 0.001. In drawing shapes, however, you are allowed to ask for a relative deviation. This deviation will be: SizeOfObject * DeviationCoefficient.

◆ SetDeviationCoefficient() [2/2]

void AIS_InteractiveContext::SetDeviationCoefficient ( const occ::handle< AIS_InteractiveObject > & theIObj,
const double theCoefficient,
const bool theToUpdateViewer )

Calls the AIS_Shape SetAngleAndDeviation to set both Angle and Deviation coefficients.

◆ SetDisplayMode() [1/2]

void AIS_InteractiveContext::SetDisplayMode ( const int theMode,
const bool theToUpdateViewer )

Sets the display mode of seen Interactive Objects (which have no overridden Display Mode).

◆ SetDisplayMode() [2/2]

void AIS_InteractiveContext::SetDisplayMode ( const occ::handle< AIS_InteractiveObject > & theIObj,
const int theMode,
const bool theToUpdateViewer )

Sets the display mode of seen Interactive Objects. theMode provides the display mode index of the entity theIObj.

◆ SetDisplayPriority() [1/2]

instead of integer number to AIS_InteractiveContext::SetDisplayPriority ( ) const
inline
Deprecated
("Deprecated since OCCT7.7, Graphic3d_DisplayPriority should be passed "

◆ SetDisplayPriority() [2/2]

void AIS_InteractiveContext::SetDisplayPriority ( const occ::handle< AIS_InteractiveObject > & theIObj,
const Graphic3d_DisplayPriority thePriority )

Sets the display priority of the seen parts presentation of the Object.

◆ SetFilterType()

void AIS_InteractiveContext::SetFilterType ( const SelectMgr_FilterType theFilterType)
inline

Sets the context selection filter type. SelectMgr_TypeFilter_OR selection filter is used by default.

Parameters
theFilterTypethe filter type.

◆ SetHiddenLineAspect()

void AIS_InteractiveContext::SetHiddenLineAspect ( const occ::handle< Prs3d_LineAspect > & theAspect) const
inline

Sets the hidden line aspect anAspect. Aspect defines display attributes for hidden lines in HLR projections.

◆ SetHighlightStyle() [1/2]

void AIS_InteractiveContext::SetHighlightStyle ( const occ::handle< Prs3d_Drawer > & theStyle)
inline

Setup the style of dynamic highlighting corresponding to Prs3d_TypeOfHighlight_Selected. This is just a short-cut to SetHighlightStyle(Prs3d_TypeOfHighlight_Dynamic,theStyle).

◆ SetHighlightStyle() [2/2]

void AIS_InteractiveContext::SetHighlightStyle ( const Prs3d_TypeOfHighlight theStyleType,
const occ::handle< Prs3d_Drawer > & theStyle )
inline

Setup highlight style settings. Tip: it is better modifying existing style returned by method HighlightStyle() instead of creating a new Prs3d_Drawer to avoid unexpected results due misconfiguration.

If a new highlight style is created, its presentation Zlayer should be checked, otherwise highlighting might not work as expected.

◆ SetIsoNumber()

void AIS_InteractiveContext::SetIsoNumber ( const int NbIsos,
const AIS_TypeOfIso WhichIsos = AIS_TOI_Both )

Returns the number of U and V isoparameters displayed.

◆ SetLocalAttributes()

void AIS_InteractiveContext::SetLocalAttributes ( const occ::handle< AIS_InteractiveObject > & theIObj,
const occ::handle< Prs3d_Drawer > & theDrawer,
const bool theToUpdateViewer )

Removes the settings for local attributes of the Object and returns to defaults.

◆ SetLocation()

void AIS_InteractiveContext::SetLocation ( const occ::handle< AIS_InteractiveObject > & theObject,
const TopLoc_Location & theLocation )

Puts the Object back into its initial position.

◆ SetMaterial()

void AIS_InteractiveContext::SetMaterial ( const occ::handle< AIS_InteractiveObject > & theIObj,
const Graphic3d_MaterialAspect & theMaterial,
const bool theToUpdateViewer )

Provides the type of material setting for the view of the Object.

◆ setObjectStatus()

void AIS_InteractiveContext::setObjectStatus ( const occ::handle< AIS_InteractiveObject > & theIObj,
const PrsMgr_DisplayStatus theStatus,
const int theDispyMode,
const int theSelectionMode )
protected

Bind/Unbind status to object and its children.

Parameters
[in]theIObjthe object to change status
[in]theStatusstatus, if NULL, unbind object

◆ SetPickingStrategy()

void AIS_InteractiveContext::SetPickingStrategy ( const SelectMgr_PickingStrategy theStrategy)
inline

Setup picking strategy - which entities detected by picking line will be accepted, considering Selection Filters. By default (SelectMgr_PickingStrategy_FirstAcceptable), Selection Filters reduce the list of entities so that the context accepts topmost in remaining.

This means that entities behind non-selectable (by filters) parts can be picked by user. If this behavior is undesirable, and user wants that non-selectable (by filters) parts should remain an obstacle for picking, SelectMgr_PickingStrategy_OnlyTopmost can be set instead.

Notice, that since Selection Manager operates only objects registered in it, SelectMgr_PickingStrategy_OnlyTopmost will NOT prevent picking entities behind visible by unregistered in Selection Manager presentations (e.g. deactivated). Hence, SelectMgr_PickingStrategy_OnlyTopmost changes behavior only with Selection Filters enabled.

◆ SetPixelTolerance()

void AIS_InteractiveContext::SetPixelTolerance ( const int thePrecision = 2)

Returns the pixel tolerance, default is 2. Pixel Tolerance extends sensitivity within MoveTo() operation (picking by point) and can be adjusted by application based on user input precision (e.g. screen pixel density, input device precision, etc.).

◆ SetPlaneSize() [1/2]

void AIS_InteractiveContext::SetPlaneSize ( const double theSize,
const bool theToUpdateViewer )

Sets the plane size aSize.

◆ SetPlaneSize() [2/2]

void AIS_InteractiveContext::SetPlaneSize ( const double theSizeX,
const double theSizeY,
const bool theToUpdateViewer )

Sets the plane size aSize.

◆ SetPolygonOffsets()

void AIS_InteractiveContext::SetPolygonOffsets ( const occ::handle< AIS_InteractiveObject > & theIObj,
const int theMode,
const float theFactor,
const float theUnits,
const bool theToUpdateViewer )

Sets up polygon offsets for the given AIS_InteractiveObject. It simply calls AIS_InteractiveObject::SetPolygonOffsets().

◆ SetSelected() [1/2]

void AIS_InteractiveContext::SetSelected ( const occ::handle< AIS_InteractiveObject > & theObject,
const bool theToUpdateViewer )

Puts the interactive object aniObj in the list of selected objects. Performs selection filters check.

◆ SetSelected() [2/2]

void AIS_InteractiveContext::SetSelected ( const occ::handle< SelectMgr_EntityOwner > & theOwners,
const bool theToUpdateViewer )

Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check.

◆ SetSelectedAspect()

Deprecated method presentation attributes should be assigned directly to object void AIS_InteractiveContext::SetSelectedAspect ( const occ::handle< Prs3d_BasicAspect > & theAspect,
const bool theToUpdateViewer )

Sets the graphic basic aspect to the current presentation of ALL selected objects.

Deprecated
(

◆ SetSelectedState()

bool AIS_InteractiveContext::SetSelectedState ( const occ::handle< SelectMgr_EntityOwner > & theOwner,
const bool theIsSelected )

Updates Selected state of specified owner without calling HilightSelected(). Has no effect if Selected state is not changed, and redirects to AddOrRemoveSelected() otherwise.

Parameters
theOwnerowner object to set selected state
theIsSelectednew selected state
Returns
TRUE if Selected state has been changed

◆ SetSelection()

void AIS_InteractiveContext::SetSelection ( const occ::handle< AIS_Selection > & theSelection)
inline

Sets selection instance to manipulate a container of selected owners.

Parameters
theSelectionan instance of the selection

◆ SetSelectionModeActive()

void AIS_InteractiveContext::SetSelectionModeActive ( const occ::handle< AIS_InteractiveObject > & theObj,
const int theMode,
const bool theToActivate,
const AIS_SelectionModesConcurrency theConcurrency = AIS_SelectionModesConcurrency_Multiple,
const bool theIsForce = false )

Activates the selection mode aMode whose index is given, for the given interactive entity anIobj.

◆ SetSelectionSensitivity()

void AIS_InteractiveContext::SetSelectionSensitivity ( const occ::handle< AIS_InteractiveObject > & theObject,
const int theMode,
const int theNewSensitivity )

Allows to manage sensitivity of a particular selection of interactive object theObject and changes previous sensitivity value of all sensitive entities in selection with theMode to the given theNewSensitivity.

◆ SetSelectionStyle()

void AIS_InteractiveContext::SetSelectionStyle ( const occ::handle< Prs3d_Drawer > & theStyle)
inline

Setup the style of selection highlighting. This is just a short-cut to SetHighlightStyle(Prs3d_TypeOfHighlight_Selected,theStyle).

◆ SetSubIntensityColor()

void AIS_InteractiveContext::SetSubIntensityColor ( const Quantity_Color & theColor)
inline

Sub-intensity allows temporary highlighting of particular objects with specified color in a manner of selection highlight, but without actual selection (e.g., global status and owner's selection state will not be updated). The method sets up the color for such highlighting. By default, this is Quantity_NOC_GRAY40.

◆ SetToHilightSelected()

void AIS_InteractiveContext::SetToHilightSelected ( const bool toHilight)
inline

Specify whether selected object must be hilighted when mouse cursor is moved above it (in MoveTo method). By default this value is false and selected object is not hilighted in this case.

See also
MoveTo()

◆ SetTransformPersistence()

void AIS_InteractiveContext::SetTransformPersistence ( const occ::handle< AIS_InteractiveObject > & theObject,
const occ::handle< Graphic3d_TransformPers > & theTrsfPers )

Sets transform persistence.

◆ SetTransparency()

void AIS_InteractiveContext::SetTransparency ( const occ::handle< AIS_InteractiveObject > & theIObj,
const double theValue,
const bool theToUpdateViewer )

Provides the transparency settings for viewing the Object. The transparency value aValue may be between 0.0, opaque, and 1.0, fully transparent.

◆ SetTrihedronSize()

void AIS_InteractiveContext::SetTrihedronSize ( const double theSize,
const bool theToUpdateViewer )

returns the current value of trihedron size.

◆ SetViewAffinity()

void AIS_InteractiveContext::SetViewAffinity ( const occ::handle< AIS_InteractiveObject > & theIObj,
const occ::handle< V3d_View > & theView,
const bool theIsVisible )

Setup object visibility in specified view. Has no effect if object is not displayed in this context.

◆ SetWidth()

virtual void AIS_InteractiveContext::SetWidth ( const occ::handle< AIS_InteractiveObject > & theIObj,
const double theValue,
const bool theToUpdateViewer )
virtual

Sets the width of the Object.

◆ SetZLayer()

void AIS_InteractiveContext::SetZLayer ( const occ::handle< AIS_InteractiveObject > & theIObj,
const Graphic3d_ZLayerId theLayerId )

Set Z layer id for interactive object. The Z layers can be used to display temporarily presentations of some object in front of the other objects in the scene. The ids for Z layers are generated by V3d_Viewer.

◆ ShiftSelect() [1/3]

should be called instead AIS_StatusOfPick AIS_InteractiveContext::ShiftSelect ( const bool theToUpdateViewer)

Adds the last detected to the list of previous picked. If the last detected was already declared as picked, removes it from the Picked List.

See also
MoveTo().
Deprecated
("This method is deprecated - SelectDetected() taking AIS_SelectionScheme_XOR "

◆ ShiftSelect() [2/3]

AIS_SelectionScheme_XOR should be called instead AIS_StatusOfPick AIS_InteractiveContext::ShiftSelect ( const int theXPMin,
const int theYPMin,
const int theXPMax,
const int theYPMax,
const occ::handle< V3d_View > & theView,
const bool theToUpdateViewer )

Rectangle of selection; adds new detected entities into the picked list, removes the detected entities that were already stored.

Deprecated
("This method is deprecated - SelectRectangle() taking "

◆ ShiftSelect() [3/3]

should be called instead AIS_StatusOfPick AIS_InteractiveContext::ShiftSelect ( const NCollection_Array1< gp_Pnt2d > & thePolyline,
const occ::handle< V3d_View > & theView,
const bool theToUpdateViewer )

Adds the last detected to the list of previous picked. If the last detected was already declared as picked, removes it from the Picked List.

Deprecated
("This method is deprecated - SelectPolygon() taking AIS_SelectionScheme_XOR "

◆ Status()

void AIS_InteractiveContext::Status ( const occ::handle< AIS_InteractiveObject > & anObj,
TCollection_ExtendedString & astatus ) const

Returns the status of the Interactive Context for the view of the Interactive Object.

◆ SubIntensityColor()

const Quantity_Color & AIS_InteractiveContext::SubIntensityColor ( ) const
inline

Sub-intensity allows temporary highlighting of particular objects with specified color in a manner of selection highlight, but without actual selection (e.g., global status and owner's selection state will not be updated). The method sets up the color for such highlighting. By default, this is Quantity_NOC_GRAY40.

◆ SubIntensityOff()

void AIS_InteractiveContext::SubIntensityOff ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )

Removes the subintensity option for the entity. If a local context is open, the presentation of the Interactive Object activates the selection mode.

◆ SubIntensityOn()

void AIS_InteractiveContext::SubIntensityOn ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )

Highlights, and removes highlights from, the displayed object which is displayed at Neutral Point with subintensity color. Available only for active local context. There is no effect if there is no local context. If a local context is open, the presentation of the Interactive Object activates the selection mode.

◆ ToHilightSelected()

bool AIS_InteractiveContext::ToHilightSelected ( ) const
inline

Return value specified whether selected object must be hilighted when mouse cursor is moved above it.

See also
MoveTo()

◆ TrihedronSize()

double AIS_InteractiveContext::TrihedronSize ( ) const

returns the current value of trihedron size.

◆ turnOnSubintensity()

void AIS_InteractiveContext::turnOnSubintensity ( const occ::handle< AIS_InteractiveObject > & theObject = nullptr,
const int theDispMode = -1,
const bool theIsDisplayedOnly = true ) const
protected

Helper function that turns on sub-intensity in global status and highlights given objects with sub-intensity color.

Parameters
[in]theObjectthe object. If NULL is given, than sub-intensity will be turned on for all inveractive objects of the context
[in]theDispModedisplay mode. If -1 is given, sub-intensity will be turned on for all display modes in global status's list of modes
[in]theIsDisplayedOnlyis true if sub-intensity should be applied only to objects with status AIS_DS_Displayed

◆ unhighlightGlobal()

void AIS_InteractiveContext::unhighlightGlobal ( const occ::handle< AIS_InteractiveObject > & theObj)
protected

Helper function that unhighlights global selection owner of given interactive. The function does not perform any updates of global or owner status.

◆ unhighlightOwners()

void AIS_InteractiveContext::unhighlightOwners ( const NCollection_List< occ::handle< SelectMgr_EntityOwner > > & theOwners,
const bool theIsToHilightSubIntensity = false )
protected

Helper function that unhighlights the owners with check for AutoHighlight, e.g. is used for selection.

◆ unhighlightSelected()

void AIS_InteractiveContext::unhighlightSelected ( const bool theIsToHilightSubIntensity = false)
protected

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. If the parameter <theIsToHilightSubIntensity> is set to true, interactive objects with sub-intensity switched on in AIS_GlobalStatus will be highlighted with context's sub-intensity color.

◆ Unhilight()

void AIS_InteractiveContext::Unhilight ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )

Removes highlighting from the Object.

◆ UnhilightCurrents()

Context void AIS_InteractiveContext::UnhilightCurrents ( const bool theToUpdateViewer)
inline

Removes highlighting from current objects. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.

Deprecated
("Local Context is deprecated - local selection should be used without Local "

◆ UnhilightSelected()

void AIS_InteractiveContext::UnhilightSelected ( const bool theToUpdateViewer)

Removes highlighting from selected objects.

◆ unselectOwners()

void AIS_InteractiveContext::unselectOwners ( const occ::handle< AIS_InteractiveObject > & theObject)
protected

Helper function to unhighlight all entity owners currently highlighted with seleciton color.

◆ UnsetColor()

void AIS_InteractiveContext::UnsetColor ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )

Removes the color selection for the selected entity.

◆ UnsetDisplayMode()

void AIS_InteractiveContext::UnsetDisplayMode ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )

Unsets the display mode of seen Interactive Objects.

◆ UnsetLocalAttributes()

void AIS_InteractiveContext::UnsetLocalAttributes ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )

Removes the settings for local attributes of the Object and returns to defaults.

◆ UnsetMaterial()

void AIS_InteractiveContext::UnsetMaterial ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )

Removes the type of material setting for viewing the Object.

◆ UnsetTransparency()

void AIS_InteractiveContext::UnsetTransparency ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )

Removes the transparency settings for viewing the Object.

◆ UnsetWidth()

virtual void AIS_InteractiveContext::UnsetWidth ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theToUpdateViewer )
virtual

Removes the width setting of the Object.

◆ Update()

void AIS_InteractiveContext::Update ( const occ::handle< AIS_InteractiveObject > & theIObj,
const bool theUpdateViewer )

Updates displayed interactive object by checking and recomputing its flagged as "to be recomputed" presentation and selection structures. This method does not force any recomputation on its own. The method recomputes selections even if they are loaded without activation in particular selector.

◆ UpdateCurrent()

Context void AIS_InteractiveContext::UpdateCurrent ( )
inline

Updates the list of current objects, i.e. hilights new current objects, removes hilighting from former current objects. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.

Deprecated
("Local Context is deprecated - local selection should be used without Local "

◆ UpdateCurrentViewer()

void AIS_InteractiveContext::UpdateCurrentViewer ( )

Updates the current viewer.

◆ UpdateSelected()

void AIS_InteractiveContext::UpdateSelected ( bool theToUpdateViewer)
inline

Updates the list of selected objects: i.e. highlights the newly selected ones and unhighlights previously selected objects.

See also
HilightSelected().

◆ Width()

virtual double AIS_InteractiveContext::Width ( const occ::handle< AIS_InteractiveObject > & aniobj) const
virtual

Returns the width of the Interactive Object in the interactive context.

Field Documentation

◆ mgrSelector

occ::handle<SelectMgr_SelectionManager> AIS_InteractiveContext::mgrSelector
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myAutoHilight

bool AIS_InteractiveContext::myAutoHilight
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myCurDetected

int AIS_InteractiveContext::myCurDetected
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myCurHighlighted

int AIS_InteractiveContext::myCurHighlighted
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myDefaultDrawer

occ::handle<Prs3d_Drawer> AIS_InteractiveContext::myDefaultDrawer
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myDetectedSeq

NCollection_Sequence<int> AIS_InteractiveContext::myDetectedSeq
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myFilters

occ::handle<SelectMgr_AndOrFilter> AIS_InteractiveContext::myFilters
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myIsAutoActivateSelMode

bool AIS_InteractiveContext::myIsAutoActivateSelMode
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myLastActiveView

V3d_View* AIS_InteractiveContext::myLastActiveView
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myLastPicked

occ::handle<SelectMgr_EntityOwner> AIS_InteractiveContext::myLastPicked
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myMainPM

occ::handle<PrsMgr_PresentationManager> AIS_InteractiveContext::myMainPM
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myMainVwr

occ::handle<V3d_Viewer> AIS_InteractiveContext::myMainVwr
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myObjects

NCollection_DataMap<occ::handle<AIS_InteractiveObject>, occ::handle<AIS_GlobalStatus> > AIS_InteractiveContext::myObjects
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myPickingStrategy

SelectMgr_PickingStrategy AIS_InteractiveContext::myPickingStrategy
protected

picking strategy to be applied within MoveTo()

◆ mySelection

occ::handle<AIS_Selection> AIS_InteractiveContext::mySelection
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myStyles

occ::handle<Prs3d_Drawer> AIS_InteractiveContext::myStyles[Prs3d_TypeOfHighlight_NB]
protected

context filter (the content active filters can be applied with AND or OR operation)

◆ myToHilightSelected

bool AIS_InteractiveContext::myToHilightSelected
protected

context filter (the content active filters can be applied with AND or OR operation)


The documentation for this class was generated from the following file: