Open CASCADE Technology  7.1.0.beta
Public Member Functions | Data Fields

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. You must distinguish two states in the Interactive Context: More...

#include <AIS_InteractiveContext.hxx>

Inheritance diagram for AIS_InteractiveContext:
Inheritance graph
[legend]

Public Member Functions

 AIS_InteractiveContext (const Handle< V3d_Viewer > &MainViewer)
 Constructs the interactive context object defined by the principal viewer MainViewer. More...
 
virtual ~AIS_InteractiveContext ()
 Destructor. More...
 
void SetAutoActivateSelection (const Standard_Boolean Auto)
 
Standard_Boolean GetAutoActivateSelection () const
 
void Display (const Handle< AIS_InteractiveObject > &anIobj, const Standard_Boolean updateviewer=Standard_True)
 Controls the choice between the using the display and selection modes of open local context which you have defined and activating those available by default. If a local context is open and if updateviewer equals Standard_False, the Interactive Object anIobj is displayed in the default active 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. In general, this is 0. This syntax has the same behavior as local context, open or closed. If you want to view the object in open local context without selection, use the syntax below, setting aSelectionMode to -1. More...
 
void Display (const Handle< AIS_InteractiveObject > &theIObj, const Standard_Integer theDispMode, const Standard_Integer theSelectionMode, const Standard_Boolean theToUpdateViewer=Standard_True, const Standard_Boolean theToAllowDecomposition=Standard_True, const AIS_DisplayStatus theDispStatus=AIS_DS_None)
 Controls the choice between the using the display and selection modes of open local context which you have defined and activating those available by default. If no Local Context is opened. and the Interactive Object theIObj has no display mode of its own, the default display mode, 0, is used. Likewise, if theIObj has no selection mode of its own, the default one, 0, is used. If a local context is open and if theToUpdateViewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. If theSelectionMode equals -1, theIObj will not be activated: it will be displayed but will not be selectable. Use this if you want to view the object in open local context without selection. Note: This option is only available in Local Context. If theToAllowDecomposition equals true, theIObj can have subshapes detected by selection mechanisms. theIObj must be able to give a shape selection modes which fit the AIS_Shape selection modes: More...
 
void Load (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Integer SelectionMode=-1, const Standard_Boolean AllowDecomp=Standard_False)
 Allows you to load the Interactive Object aniobj with a given selection mode SelectionMode, and/or with the desired decomposition option, whether the object is visualized or not. If AllowDecomp = Standard_True and, if the interactive object is of the "Shape" type, these "standard" selection modes will be automatically activated as a function of the modes present in the Local Context. The loaded objects will be selectable but displayable in highlighting only when detected by the Selector. This method is available only when Local Contexts are open. More...
 
void Erase (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Boolean updateviewer=Standard_True)
 Hides the object. The object's presentations are simply flagged as invisible and therefore excluded from redrawing. To show hidden objects, use Display(). More...
 
void EraseAll (const Standard_Boolean updateviewer=Standard_True)
 Hides all objects. The object's presentations are simply flagged as invisible and therefore excluded from redrawing. To show all hidden objects, use DisplayAll(). More...
 
void DisplayAll (const Standard_Boolean updateviewer=Standard_True)
 Displays all hidden objects. More...
 
void EraseSelected (const Standard_Boolean updateviewer=Standard_True)
 Hides selected objects. The object's presentations are simply flagged as invisible and therefore excluded from redrawing. To show hidden objects, use Display(). More...
 
void DisplaySelected (const Standard_Boolean updateviewer=Standard_True)
 Displays selected objects if a local context is open. Displays current objects if there is no active local context. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
Standard_Boolean KeepTemporary (const Handle< AIS_InteractiveObject > &anIObj, const Standard_Integer InWhichLocal=-1)
 Changes the status of a temporary object. It will be kept at the neutral point, i.e. put in the list of displayed objects along withwith its temporary attributes. These include display mode and selection mode, for example. Returns true if done. inWhichLocal gives the local context in which anIObj is displayed. By default, the index -1 refers to the last Local Context opened. More...
 
void ClearPrs (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Integer aMode=0, const Standard_Boolean updateviewer=Standard_True)
 Empties the graphic presentation of the mode indexed by aMode. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. Warning Removes anIobj. anIobj is still active if it was previously activated. More...
 
void Remove (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Boolean updateviewer=Standard_True)
 Removes aniobj from every viewer. aniobj is no longer referenced in the Context. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void RemoveAll (const Standard_Boolean updateviewer=Standard_True)
 Removes all the objects from all opened Local Contexts and from the Neutral Point. More...
 
 Standard_DEPRECATED ("Deprecated method Hilight()") void Hilight(const Handle< AIS_InteractiveObject > &theObj
 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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void Unhilight (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Boolean updateviewer=Standard_True)
 Removes hilighting from the entity aniobj. Updates the viewer. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void SetDisplayPriority (const Handle< AIS_InteractiveObject > &anIobj, const Standard_Integer aPriority)
 Sets the display priority aPriority of the seen parts presentation of the entity anIobj. More...
 
void SetZLayer (const Handle< AIS_InteractiveObject > &theIObj, const Standard_Integer 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. More...
 
Standard_Integer GetZLayer (const Handle< AIS_InteractiveObject > &theIObj) const
 Get Z layer id set for displayed interactive object. More...
 
void Redisplay (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Boolean updateviewer=Standard_True, const Standard_Boolean allmodes=Standard_False)
 Recomputes the seen parts presentation of the entity aniobj. If allmodes equals true, all presentations are present in the object even if unseen. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void Redisplay (const AIS_KindOfInteractive aTypeOfObject, const Standard_Integer Signature=-1, const Standard_Boolean updateviewer=Standard_True)
 Recomputes the Prs/Selection of displayed objects of a given type and a given signature. if signature = -1 doesnt take signature criterion. More...
 
void RecomputePrsOnly (const Handle< AIS_InteractiveObject > &anIobj, const Standard_Boolean updateviewer=Standard_True, const Standard_Boolean allmodes=Standard_False)
 Recomputes the displayed presentations, flags the others Doesn't update presentations. More...
 
void RecomputeSelectionOnly (const Handle< AIS_InteractiveObject > &anIObj)
 Recomputes the active selections, flags the others Doesn't update presentations. More...
 
void Update (const Handle< AIS_InteractiveObject > &theIObj, const Standard_Boolean theUpdateViewer=Standard_True)
 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. More...
 
void SetDisplayMode (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Integer aMode, const Standard_Boolean updateviewer=Standard_True)
 Sets the display mode of seen Interactive Objects. aMode provides the display mode index of the entity aniobj. If updateviewer equals Standard_True, the predominant mode aMode will overule the context mode. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object returns to the default selection mode; the object is displayed but no viewer will be updated. Note that display mode 3 is only used if you have an AIS_Textured Shape. More...
 
void UnsetDisplayMode (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Boolean updateviewer=Standard_True)
 Unsets the display mode of seen Interactive Objects. aMode provides the display mode index of the entity aniobj. If updateviewer equals Standard_True, the predominant mode aMode will overule the context mode. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object returns to the default selection mode; the object is displayed but no viewer will be updated. More...
 
void SetPixelTolerance (const Standard_Integer aPrecision=2)
 Disables the mechanism of adaptive tolerance calculation in SelectMgr_ViewerSelector and sets the given tolerance for ALL sensitive entities activated. For more information, see SelectMgr_ViewerSelector documentation Warning: When a local context is open the sensitivity is apply on it instead on the main context. More...
 
Standard_Integer PixelTolerance () const
 Returns the pixel tolerance. More...
 
void SetSelectionSensitivity (const Handle< AIS_InteractiveObject > &theObject, const Standard_Integer theMode, const Standard_Integer 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. More...
 
void SetLocation (const Handle< AIS_InteractiveObject > &aniobj, const TopLoc_Location &aLocation)
 Puts the location aLocation on the initial graphic representation and the selection for the entity aniobj. In other words, aniobj is visible and selectable at a position other than initial position. Graphic and selection primitives are not recomputed. To clean the view correctly, you must reset the previous location. More...
 
void ResetLocation (const Handle< AIS_InteractiveObject > &aniobj)
 Puts the entity aniobj back into its initial position. More...
 
Standard_Boolean HasLocation (const Handle< AIS_InteractiveObject > &aniobj) const
 Returns true if the entity aniobj has a location. More...
 
TopLoc_Location Location (const Handle< AIS_InteractiveObject > &aniobj) const
 Returns the location of the entity aniobj. More...
 
void SetCurrentFacingModel (const 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. More...
 
void SetColor (const Handle< AIS_InteractiveObject > &aniobj, const Quantity_NameOfColor aColor, const Standard_Boolean updateviewer=Standard_True)
 
void SetColor (const Handle< AIS_InteractiveObject > &aniobj, const Quantity_Color &aColor, const Standard_Boolean updateviewer=Standard_True)
 Sets the color of the selected entity. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void UnsetColor (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Boolean updateviewer=Standard_True)
 Removes the color selection for the selected entity. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
virtual void SetWidth (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Real aValue, const Standard_Boolean updateviewer=Standard_True)
 Sets the width of the entity aniobj. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
virtual void UnsetWidth (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Boolean updateviewer=Standard_True)
 Removes the width setting of the entity aniobj. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void SetMaterial (const Handle< AIS_InteractiveObject > &aniobj, const Graphic3d_NameOfMaterial aName, const Standard_Boolean updateviewer=Standard_True)
 Provides the type of material setting for the view of the entity aniobj. The range of settings includes: BRASS, BRONZE, GOLD, PEWTER, SILVER, STONE. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void UnsetMaterial (const Handle< AIS_InteractiveObject > &anObj, const Standard_Boolean updateviewer=Standard_True)
 Removes the type of material setting for viewing the entity aniobj. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void SetTransparency (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Real aValue=0.6, const Standard_Boolean updateviewer=Standard_True)
 Provides the transparency settings for viewing the entity aniobj. The transparency value aValue may be between 0.0, opaque, and 1.0, fully transparent. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void UnsetTransparency (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Boolean updateviewer=Standard_True)
 Removes the transparency settings for viewing the entity aniobj. The transparency value aValue may be between 0.0, opaque, and 1.0, fully transparent. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void SetLocalAttributes (const Handle< AIS_InteractiveObject > &aniobj, const Handle< Prs3d_Drawer > &aDrawer, const Standard_Boolean updateviewer=Standard_True)
 Sets the attributes of the interactive object aniobj by plugging the attribute manager aDrawer into the local context. The graphic attributes of aDrawer such as visualization mode, color, and material, are then used to display aniobj. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void UnsetLocalAttributes (const Handle< AIS_InteractiveObject > &anObj, const Standard_Boolean updateviewer=Standard_True)
 Removes the settings for local attributes of the entity anObj and returns to the Neutral Point attributes or those of the previous local context. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void SetPolygonOffsets (const Handle< AIS_InteractiveObject > &anObj, const Standard_Integer aMode, const Standard_ShortReal aFactor=1.0, const Standard_ShortReal aUnits=0.0, const Standard_Boolean updateviewer=Standard_True)
 Sets up polygon offsets for the given AIS_InteractiveObject. It simply calls anObj->SetPolygonOffsets() More...
 
Standard_Boolean HasPolygonOffsets (const Handle< AIS_InteractiveObject > &anObj) const
 simply calls anObj->HasPolygonOffsets() More...
 
void PolygonOffsets (const Handle< AIS_InteractiveObject > &anObj, Standard_Integer &aMode, Standard_ShortReal &aFactor, Standard_ShortReal &aUnits) const
 Retrieves current polygon offsets settings for <anObj>. More...
 
void SetTrihedronSize (const Standard_Real aSize, const Standard_Boolean updateviewer=Standard_True)
 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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
Standard_Real TrihedronSize () const
 returns the current value of trihedron size. More...
 
void SetPlaneSize (const Standard_Real aSizeX, const Standard_Real aSizeY, const Standard_Boolean updateviewer=Standard_True)
 Sets the plane size defined by the length in the X direction XSize and that in the Y direction YSize. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void SetPlaneSize (const Standard_Real aSize, const Standard_Boolean updateviewer=Standard_True)
 Sets the plane size aSize. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. May be used if PlaneSize returns true. More...
 
Standard_Boolean PlaneSize (Standard_Real &XSize, Standard_Real &YSize) const
 Returns true if the length in the X direction XSize is the same as that in the Y direction YSize. More...
 
AIS_DisplayStatus DisplayStatus (const Handle< AIS_InteractiveObject > &anIobj) const
 Returns the display status of the entity anIobj. This will be one of the following: More...
 
Standard_Boolean IsDisplayed (const Handle< AIS_InteractiveObject > &anIobj) const
 Returns true if anIobj is displayed in the interactive context. More...
 
Standard_Boolean IsDisplayed (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Integer aMode) const
 
Standard_Boolean IsHilighted (const Handle< AIS_InteractiveObject > &theObj) const
 Returns true if the object is marked as highlighted via its global status. More...
 
Standard_Boolean IsHilighted (const Handle< SelectMgr_EntityOwner > &theOwner) const
 Returns true if the owner is marked as selected. More...
 
Standard_Boolean HighlightStyle (const Handle< AIS_InteractiveObject > &theObj, Handle< Graphic3d_HighlightStyle > &theStyle) const
 Returns highlight style of the object if it is marked as highlighted via global status. More...
 
Standard_Boolean HighlightStyle (const Handle< SelectMgr_EntityOwner > &theOwner, Handle< Graphic3d_HighlightStyle > &theStyle) const
 Returns highlight style of the owner if it is selected. More...
 
Standard_Integer DisplayPriority (const Handle< AIS_InteractiveObject > &anIobj) const
 Returns the display priority of the entity anIobj. This will be display mode of anIobj if it is in the main viewer. More...
 
Standard_Boolean HasColor (const Handle< AIS_InteractiveObject > &aniobj) const
 Returns true if a view of the Interactive Object aniobj has color. More...
 
Quantity_NameOfColor Color (const Handle< AIS_InteractiveObject > &aniobj) const
 
void Color (const Handle< AIS_InteractiveObject > &aniobj, Quantity_Color &acolor) const
 Returns the color Color of the entity aniobj in the interactive context. More...
 
virtual Standard_Real Width (const Handle< AIS_InteractiveObject > &aniobj) const
 Returns the width of the Interactive Object aniobj in the interactive context. More...
 
void Status (const Handle< AIS_InteractiveObject > &anObj, TCollection_ExtendedString &astatus) const
 Returns the status astatus of the Interactive Context for the view of the Interactive Object anObj. More...
 
void SetTransformPersistence (const Handle< AIS_InteractiveObject > &theObject, const Handle< Graphic3d_TransformPers > &theTrsfPers)
 Sets transform persistence. More...
 
 Standard_DEPRECATED ("This method is deprecated - SetTransformPersistence() taking Graphic3d_TransformPers should be called instead") void SetTransformPersistence(const Handle< AIS_InteractiveObject > &theObj
 
Standard_Integer DisplayMode () const
 Returns the display mode setting. Note that mode 3 is only used. More...
 
const Handle< Graphic3d_HighlightStyle > & HighlightStyle () const
 Returns current dynamic highlight style settings. By default: More...
 
void SetHighlightStyle (const Handle< Graphic3d_HighlightStyle > &theStyle)
 Setup the style of dynamic highlighting. More...
 
const Handle< Graphic3d_HighlightStyle > & SelectionStyle () const
 Returns current selection style settings. By default: More...
 
void SetSelectionStyle (const Handle< Graphic3d_HighlightStyle > &theStyle)
 Setup the style of selection highlighting. More...
 
Quantity_NameOfColor PreSelectionColor () const
 Returns the name of the color used to show preselection. By default, this is Quantity_NOC_GREEN. More...
 
Quantity_NameOfColor DefaultColor () const
 Returns the name of the color used by default. By default, this is Quantity_NOC_GOLDENROD. More...
 
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 returns the color of such highlighting. By default, it is Quantity_NOC_GRAY40. More...
 
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. More...
 
void SetPreselectionColor (const Quantity_NameOfColor aCol)
 Allows you to set the color used to show preselection. By default, this is Quantity_NOC_GREEN. A preselected entity is one which has been selected as the domain of application of a function such as a fillet. More...
 
void SetDisplayMode (const Standard_Integer AMode, const Standard_Boolean updateviewer=Standard_True)
 Sets the display mode of seen Interactive Objects. aMode provides the display mode index of the entity aniobj. If updateviewer equals Standard_True, the predominant mode aMode will overule the context mode. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object returns to the default selection mode; the object is displayed but no viewer will be updated. Note that display mode 3 is only used if you have an AIS_Textured Shape. More...
 
void SetDeviationCoefficient (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Real aCoefficient, const Standard_Boolean updateviewer=Standard_True)
 Sets the deviation coefficient aCoefficient. 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 aCoefficient 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. default 0.001. More...
 
void SetDeviationAngle (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Real anAngle, const Standard_Boolean updateviewer=Standard_True)
 
void SetAngleAndDeviation (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Real anAngle, const Standard_Boolean updateviewer=Standard_True)
 Calls the AIS_Shape SetAngleAndDeviation to set both Angle and Deviation coefficients. More...
 
void SetHLRDeviationCoefficient (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Real aCoefficient, const Standard_Boolean updateviewer=Standard_True)
 Sets the deviation coefficient aCoefficient for removal of hidden lines created by different viewpoints in different presentations. The Default value is 0.02. More...
 
void SetHLRDeviationAngle (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Real anAngle, const Standard_Boolean updateviewer=Standard_True)
 
void SetHLRAngleAndDeviation (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Real anAngle, const Standard_Boolean updateviewer=Standard_True)
 Computes a HLRAngle and a HLRDeviationCoefficient by means of the angle anAngle and sets the corresponding methods in the default drawing tool with these values. More...
 
void SetDeviationCoefficient (const Standard_Real aCoefficient)
 Sets the deviation coefficient aCoefficient. 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 aCoefficient 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. default 0.001. More...
 
Standard_Real 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. More...
 
void SetDeviationAngle (const Standard_Real anAngle)
 default 12 degrees More...
 
Standard_Real DeviationAngle () const
 
void SetHLRDeviationCoefficient (const Standard_Real aCoefficient)
 Sets the deviation coefficient aCoefficient for removal of hidden lines created by different viewpoints in different presentations. The Default value is 0.02. More...
 
Standard_Real HLRDeviationCoefficient () const
 Returns the real number value of the hidden line removal deviation coefficient. 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 give 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. To find the hidden lines, hidden line display mode entails recalculation of the view at each different projector perspective. Because hidden lines entail calculations of more than usual complexity to decompose them into these triangles, a deviation coefficient allowing greater tolerance is used. This increases efficiency in calculation. The Default value is 0.02. More...
 
void SetHLRAngle (const Standard_Real anAngle)
 Sets the HLR angle anAngle. More...
 
Standard_Real HLRAngle () const
 Returns the real number value of the deviation angle in hidden line removal views in this interactive context. The default value is 20*PI/180. More...
 
void SetHLRAngleAndDeviation (const Standard_Real anAngle)
 compute with anangle a HLRAngle and a HLRDeviationCoefficient and set them in myHLRAngle and in myHLRDeviationCoefficient of myDefaultDrawer ; anAngle is in radian ; ( 1 deg < angle in deg < 20 deg) More...
 
Handle< Prs3d_LineAspectHiddenLineAspect () const
 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. More...
 
void SetHiddenLineAspect (const Handle< Prs3d_LineAspect > &anAspect) const
 Sets the hidden line aspect anAspect. anAspect defines display attributes for hidden lines in HLR projections. More...
 
Standard_Boolean DrawHiddenLine () const
 returns Standard_True if the hidden lines are to be drawn. By default the hidden lines are not drawn. More...
 
void EnableDrawHiddenLine () const
 
void DisableDrawHiddenLine () const
 
void SetIsoNumber (const Standard_Integer NbIsos, const AIS_TypeOfIso WhichIsos=AIS_TOI_Both)
 Sets the number of U and V isoparameters displayed. More...
 
Standard_Integer IsoNumber (const AIS_TypeOfIso WhichIsos=AIS_TOI_Both)
 Returns the number of U and V isoparameters displayed. More...
 
void IsoOnPlane (const Standard_Boolean SwitchOn)
 Returns True if drawing isoparameters on planes is enabled. More...
 
Standard_Boolean IsoOnPlane () const
 Returns True if drawing isoparameters on planes is enabled. if <forUIsos> = False,. More...
 
void IsoOnTriangulation (const Standard_Boolean theIsEnabled, const 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. More...
 
void IsoOnTriangulation (const Standard_Boolean 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. More...
 
Standard_Boolean IsoOnTriangulation () const
 Returns true if drawing isolines on triangulation algorithm is enabled. More...
 
void SetSelectedAspect (const Handle< Prs3d_BasicAspect > &anAspect, const Standard_Boolean globalChange=Standard_True, const Standard_Boolean updateViewer=Standard_True)
 Sets the graphic basic aspect to the current presentation of ALL selected objects. Flag globalChange has no effect (left to simplify porting). Updates the viewer when <updateViewer> is TRUE. More...
 
AIS_StatusOfDetection MoveTo (const Standard_Integer theXPix, const Standard_Integer theYPix, const Handle< V3d_View > &theView, const Standard_Boolean theToRedrawOnUpdate=Standard_True)
 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. Functions in both Neutral Point and local contexts. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to highlight detected object. More...
 
Standard_Boolean HasNextDetected () const
 returns True if other entities were detected in the last mouse detection More...
 
Standard_Integer HilightNextDetected (const Handle< V3d_View > &theView, const Standard_Boolean theToRedrawImmediate=Standard_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! returns the Rank of hilighted entity WARNING : Loop Method. When all the detected entities have been hilighted , the next call will hilight the first one again More...
 
Standard_Integer HilightPreviousDetected (const Handle< V3d_View > &theView, const Standard_Boolean theToRedrawImmediate=Standard_True)
 Same as previous methods in reverse direction... More...
 
AIS_StatusOfPick AddSelect (const Handle< SelectMgr_EntityOwner > &theObject)
 Adds object in the selection. More...
 
AIS_StatusOfPick AddSelect (const Handle< AIS_InteractiveObject > &theObject)
 Adds object in the selection. More...
 
AIS_StatusOfPick Select (const Standard_Integer XPMin, const Standard_Integer YPMin, const Standard_Integer XPMax, const Standard_Integer YPMax, const Handle< V3d_View > &aView, const Standard_Boolean updateviewer=Standard_True)
 Selects everything found in the bounding rectangle defined by the pixel minima and maxima, XPMin, YPMin, XPMax, and YPMax in the view, aView The objects detected are passed to the main viewer, which is then updated. More...
 
AIS_StatusOfPick Select (const TColgp_Array1OfPnt2d &Polyline, const Handle< V3d_View > &aView, const Standard_Boolean updateviewer=Standard_True)
 polyline selection; clears the previous picked list More...
 
AIS_StatusOfPick Select (const Standard_Boolean updateviewer=Standard_True)
 Stores and hilights the previous detected; Unhilights the previous picked. More...
 
AIS_StatusOfPick ShiftSelect (const Standard_Boolean updateviewer=Standard_True)
 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. More...
 
AIS_StatusOfPick ShiftSelect (const TColgp_Array1OfPnt2d &Polyline, const Handle< V3d_View > &aView, const Standard_Boolean updateviewer=Standard_True)
 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. More...
 
AIS_StatusOfPick ShiftSelect (const Standard_Integer XPMin, const Standard_Integer YPMin, const Standard_Integer XPMax, const Standard_Integer YPMax, const Handle< V3d_View > &aView, const Standard_Boolean updateviewer=Standard_True)
 rectangle of selection ; adds new detected entities into the picked list, removes the detected entities that were already stored... More...
 
void SetToHilightSelected (const Standard_Boolean 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. More...
 
Standard_Boolean ToHilightSelected () const
 Return value specified whether selected object must be hilighted when mouse cursor is moved above it. More...
 
OBSOLETE METHODS THAT ARE VALID FOR LOCAL CONTEXT ONLY
void SetCurrentObject (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Boolean updateviewer=Standard_True)
 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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void AddOrRemoveCurrentObject (const Handle< AIS_InteractiveObject > &theObj, const Standard_Boolean theIsToUpdateViewer=Standard_True)
 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 sence only for neutral point selection of a whole object, if 0 selection of the object is empty this method simply does nothing. More...
 
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. More...
 
Standard_Boolean WasCurrentTouched () const
 Returns the current selection touched by the cursor. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. More...
 
void SetOkCurrent ()
 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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
Standard_Boolean IsCurrent (const 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. More...
 
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. More...
 
Standard_Boolean 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. More...
 
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. More...
 
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. More...
 
Standard_Integer NbCurrents ()
 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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void HilightCurrents (const Standard_Boolean theToUpdateViewer=Standard_True)
 Highlights current objects. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void UnhilightCurrents (const Standard_Boolean updateviewer=Standard_True)
 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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void ClearCurrents (const Standard_Boolean theToUpdateViewer=Standard_True)
 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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
const TopoDS_ShapeDetectedCurrentShape () const
 
Handle< AIS_InteractiveObjectDetectedCurrentObject () const
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean 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. More...
 
Standard_Boolean IsKind (const Standard_CString 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. More...
 
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. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Data Fields

const Standard_Boolean theIsToUpdateViewer
 
const Graphic3d_TransModeFlagstheFlag
 
const Graphic3d_TransModeFlags const gp_PntthePoint
 

COMMON SELECTION METHODS VALID FOR BOTH GLOBAL AND LOCAL CONTEXT

AIS_DataMapOfIOStatus myObjects
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< SelectMgr_SelectionManagermgrSelector
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< PrsMgr_PresentationManager3dmyMainPM
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< V3d_ViewermyMainVwr
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< StdSelect_ViewerSelector3dmyMainSel
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< SelectMgr_EntityOwnermyLastPicked
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< SelectMgr_EntityOwnermyLastinMain
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Boolean myWasLastMain
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Boolean myCurrentTouched
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Boolean mySelectedTouched
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Boolean myToHilightSelected
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< SelectMgr_OrFiltermyFilters
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< Prs3d_DrawermyDefaultDrawer
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< AIS_SelectionmySelection
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Quantity_NameOfColor myDefaultColor
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< Graphic3d_HighlightStylemyHiStyle
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< Graphic3d_HighlightStylemySelStyle
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Quantity_NameOfColor myPreselectionColor
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< Graphic3d_HighlightStylemySubintStyle
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Integer myDisplayMode
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
AIS_DataMapOfILC myLocalContexts
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Integer myCurLocalIndex
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< V3d_Viewmylastmoveview
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
TColStd_SequenceOfInteger myDetectedSeq
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Integer myCurDetected
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Integer myCurHighlighted
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Boolean myZDetectionFlag
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Boolean myIsAutoActivateSelMode
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
void SetSelected (const Handle< SelectMgr_EntityOwner > &theOwners, const Standard_Boolean theToUpdateViewer=Standard_True)
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
void SetSelected (const Handle< AIS_InteractiveObject > &theObject, const Standard_Boolean theToUpdateViewer=Standard_True)
 Puts the interactive object aniObj in the list of selected objects. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. Performs selection filters check. More...
 
void UpdateSelected (const Standard_Boolean theToUpdateViewer=Standard_True)
 Updates the list of selected objects: i.e. highlights the newely selected ones and unhighlights previously selected objects. More...
 
void AddOrRemoveSelected (const Handle< AIS_InteractiveObject > &theObject, const Standard_Boolean theToUpdateViewer=Standard_True)
 Allows to highlight or unhighlight the owner given depending on its selection status. More...
 
void HilightSelected (const Standard_Boolean theToUpdateViewer=Standard_True)
 Highlights selected objects. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void UnhilightSelected (const Standard_Boolean theToUpdateViewer=Standard_True)
 Removes highlighting from selected objects. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void ClearSelected (const Standard_Boolean theToUpdateViewer=Standard_True)
 Empties previous selected objects in order to get the selected objects detected by the selector using UpdateSelected. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void AddOrRemoveSelected (const TopoDS_Shape &aShape, const Standard_Boolean updateviewer=Standard_True)
 No right to Add a selected Shape (Internal Management of shape Selection). A Previous selected shape may only be removed. More...
 
void AddOrRemoveSelected (const Handle< SelectMgr_EntityOwner > &theOwner, const Standard_Boolean theToUpdateViewer=Standard_True)
 Allows to highlight or unhighlight the owner given depending on its selection status. More...
 
Standard_Boolean IsSelected (const Handle< SelectMgr_EntityOwner > &theOwner) const
 Returns true is the owner given is selected. More...
 
Standard_Boolean IsSelected (const Handle< AIS_InteractiveObject > &theObj) const
 Returns true is the object given is selected. More...
 
Handle< AIS_InteractiveObjectFirstSelectedObject ()
 Returns the first selected object in the list of current selected. More...
 
void InitSelected ()
 Initializes a scan of the selected objects. More...
 
Standard_Boolean MoreSelected () const
 Returns true if there is another object found by the scan of the list of selected objects. More...
 
void NextSelected ()
 Continues the scan to the next object in the list of selected objects. More...
 
Standard_Integer NbSelected ()
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Boolean HasSelectedShape () const
 Returns true if the interactive context has a shape selected in it which results from the decomposition of another entity. If HasSelectedShape returns true, SelectedShape returns the shape which has been shown to be selected. Interactive returns the Interactive Object from which the shape has been selected. If HasSelectedShape returns false, Interactive returns the interactive entity selected by the click of the mouse. More...
 
TopoDS_Shape SelectedShape () const
 Returns the selected shape. More...
 
Handle< SelectMgr_EntityOwnerSelectedOwner () const
 Returns the owner of the selected entity resulting from the decomposition of another entity. More...
 
void EntityOwners (Handle< SelectMgr_IndexedMapOfOwner > &theOwners, const Handle< AIS_InteractiveObject > &theIObj, const Standard_Integer theMode=-1) const
 Returns a collection containing all entity owners created for the interactive object <theIObj> in the selection mode theMode (in all active modes if the Mode == -1) More...
 
Handle< AIS_InteractiveObjectSelectedInteractive () const
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Boolean HasApplicative () const
 Returns true if the applicative object has an owner from Interactive attributed to it. More...
 
Handle< Standard_TransientApplicative () const
 Returns the owner of the applicative entity detected in interactive context. The owner can be a shape for a set of sub-shapes or a sub-shape for sub-shapes which it is composed of. More...
 
Standard_Boolean HasDetected () const
 Returns true if there is a mouse-detected entity in local context. If there is no open local context, the objects selected are called current objects; selected objects if there is one. Iterators allow entities to be recovered in either case. This method is one of a set which allows you to manipulate the objects which have been placed in these two lists. More...
 
Standard_Boolean HasDetectedShape () const
 Returns true if there is a detected shape in local context. If there is no open local context, the objects selected are called current objects; selected objects if there is one. Iterators allow entities to be recovered in either case. This method is one of a set which allows you to manipulate the objects which have been placed in these two lists. More...
 
const TopoDS_ShapeDetectedShape () const
 Returns the shape detected in local context. If there is no open local context, the objects selected are called current objects; selected objects if there is one. Iterators allow entities to be recovered in either case. This method is one of a set which allows you to manipulate the objects which have been placed in these two lists. More...
 
Handle< AIS_InteractiveObjectDetectedInteractive () const
 Returns the interactive objects last detected in open context. If there is no open local context, the objects selected are called current objects; selected objects if there is one. Iterators allow entities to be recovered in either case. This method is one of a set which allows you to manipulate the objects which have been placed in these two lists. More...
 
Handle< SelectMgr_EntityOwnerDetectedOwner () const
 returns the owner of the detected sensitive primitive. More...
 
void InitDetected ()
 Initialization for iteration through mouse-detected objects in interactive context or in local context if it is opened. More...
 
Standard_Boolean MoreDetected () const
 
void NextDetected ()
 Gets next current object during iteration through mouse-detected interactive objects. More...
 
Standard_Integer OpenLocalContext (const Standard_Boolean UseDisplayedObjects=Standard_True, const Standard_Boolean AllowShapeDecomposition=Standard_True, const Standard_Boolean AcceptEraseOfObjects=Standard_False, const Standard_Boolean BothViewers=Standard_False)
 Opens local contexts and specifies how this is to be done. The options listed above function in the following manner: More...
 
void CloseLocalContext (const Standard_Integer Index=-1, const Standard_Boolean updateviewer=Standard_True)
 Allows you to close local contexts. For greater security, you should close the context with the index Index given on opening. When you close a local context, the one before, which is still on the stack, reactivates. If none is left, you return to Neutral Point. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. Warning When the index isn't specified, the current context is closed. This option can be dangerous, as other Interactive Functions can open local contexts without necessarily warning the user. More...
 
Standard_Integer IndexOfCurrentLocal () const
 returns -1 if no opened local context. More...
 
void CloseAllContexts (const Standard_Boolean updateviewer=Standard_True)
 Allows you to close all local contexts at one go and return to Neutral Point. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void ResetOriginalState (const Standard_Boolean updateviewer=Standard_True)
 to be used only with no opened local context.. displays and activates objects in their original state before local contexts were opened... More...
 
void ClearLocalContext (const AIS_ClearMode TheMode=AIS_CM_All)
 clears Objects/Filters/Activated Modes list in the current opened local context. More...
 
void UseDisplayedObjects ()
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
void NotUseDisplayedObjects ()
 when a local Context is opened, one is able to use/not use the displayed objects at neutral point at anytime. More...
 
Standard_Boolean BeginImmediateDraw ()
 initializes the list of presentations to be displayed returns False if no local context is opened. More...
 
Standard_Boolean ImmediateAdd (const Handle< AIS_InteractiveObject > &theObj, const Standard_Integer theMode=0)
 returns True if <anIObj> has been stored in the list. More...
 
Standard_Boolean EndImmediateDraw (const Handle< V3d_View > &theView)
 returns True if the immediate display has been done. More...
 
Standard_Boolean EndImmediateDraw ()
 Uses the First Active View of Main Viewer! returns True if the immediate display has been done. More...
 
Standard_Boolean IsImmediateModeOn () const
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
void SetAutomaticHilight (const Standard_Boolean aStatus)
 Sets the highlighting status aStatus of detected and selected entities. Whether you are in Neutral Point or local context, this is automatically managed by the Interactive Context. This function allows you to disconnect the automatic mode. More...
 
Standard_Boolean AutomaticHilight () const
 Returns true if the automatic highlight mode is active in an open context. More...
 
void SetZDetection (const Standard_Boolean aStatus=Standard_False)
 Enables/Disables the Z detection. If TRUE the detection echo can be partially hidden by the detected object. More...
 
Standard_Boolean ZDetection () const
 Retrieves the Z detection state. More...
 
void Activate (const Handle< AIS_InteractiveObject > &anIobj, const Standard_Integer aMode=0, const Standard_Boolean theIsForce=Standard_False)
 Activates the selection mode aMode whose index is given, for the given interactive entity anIobj. More...
 
void Deactivate (const Handle< AIS_InteractiveObject > &anIObj)
 Deactivates all the activated selection modes of an object. More...
 
void Deactivate (const Handle< AIS_InteractiveObject > &anIobj, const Standard_Integer aMode)
 Deactivates all the activated selection modes of the interactive object anIobj with a given selection mode aMode. More...
 
void ActivatedModes (const Handle< AIS_InteractiveObject > &anIobj, TColStd_ListOfInteger &theList) const
 Returns the list of activated selection modes in an open context. More...
 
void SetShapeDecomposition (const Handle< AIS_InteractiveObject > &anIobj, const Standard_Boolean aStatus)
 to be Used only with opened local context and if <anIobj> is of type shape... if <aStatus> = True <anIobj> will be sensitive to shape selection modes activation. = False, <anIobj> will not be senstive any more. More...
 
void SetTemporaryAttributes (const Handle< AIS_InteractiveObject > &anObj, const Handle< Prs3d_Drawer > &aDrawer, const Standard_Boolean updateviewer=Standard_True)
 Sets the temporary graphic attributes of the entity anObj. These are provided by the attribute manager aDrawer and are valid for a particular local context only. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void SubIntensityOn (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Boolean updateviewer=Standard_True)
 Highlights, and removes highlights from, the displayed object aniobj 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 and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void SubIntensityOff (const Handle< AIS_InteractiveObject > &aniobj, const Standard_Boolean updateviewer=Standard_True)
 Removes the subintensity option for the entity aniobj. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. More...
 
void SubIntensityOn (const Standard_Boolean updateviewer=Standard_True)
 hilights/unhilights displayed objects which are displayed at neutral state with subintensity color; available only for active local context. No effect if no local context. More...
 
void SubIntensityOff (const Standard_Boolean updateviewer=Standard_True)
 removes subintensity option for all objects. More...
 
void AddFilter (const Handle< SelectMgr_Filter > &aFilter)
 Allows you to add the filter aFilter to Neutral Point or to a local context if one or more selection modes have been activated. Only type filters may be active in Neutral Point. More...
 
void RemoveFilter (const Handle< SelectMgr_Filter > &aFilter)
 Removes a filter from Neutral Point or a local context if one or more selection modes have been activated. Only type filters are activated in Neutral Point. More...
 
void RemoveFilters ()
 Remove a filter to Neutral Point or a local context if one or more selection modes have been activated. Only type filters are active in Neutral Point. More...
 
void ActivateStandardMode (const TopAbs_ShapeEnum aStandardActivation)
 Provides an alternative to the Display methods when activating specific selection modes. This has the effect of activating the corresponding selection mode aStandardActivation for all objects in Local Context which accept decomposition into sub-shapes. Every new Object which has been loaded into the interactive context and which answers these decomposition criteria is automatically activated according to these modes. Warning If you have opened a local context by loading an object with the default options (<AllowShapeDecomposition>= Standard_True), all objects of the "Shape" type are also activated with the same modes. You can act on the state of these "Standard" objects by using SetShapeDecomposition(Status). More...
 
void DeactivateStandardMode (const TopAbs_ShapeEnum aStandardActivation)
 Provides an alternative to the Display methods when deactivating specific selection modes. This has the effect of deactivating the corresponding selection mode aStandardActivation for all objects in Local Context which accept decomposition into sub-shapes. More...
 
const TColStd_ListOfIntegerActivatedStandardModes () const
 Returns the list of activated standard selection modes available in a local context. More...
 
const SelectMgr_ListOfFilterFilters () const
 Returns the list of filters active in a local context. More...
 
const Handle< Prs3d_Drawer > & DefaultDrawer () const
 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. More...
 
const Handle< V3d_Viewer > & CurrentViewer () const
 Returns the current viewer. More...
 
void DisplayedObjects (AIS_ListOfInteractive &aListOfIO, const Standard_Boolean OnlyFromNeutral=Standard_False) 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. More...
 
void DisplayedObjects (const AIS_KindOfInteractive WhichKind, const Standard_Integer WhichSignature, AIS_ListOfInteractive &aListOfIO, const Standard_Boolean OnlyFromNeutral=Standard_False) const
 gives the list of displayed objects of a particular Type and signature. by Default, <WhichSignature> = -1 means control only on <WhichKind>. More...
 
void ErasedObjects (AIS_ListOfInteractive &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. More...
 
void ErasedObjects (const AIS_KindOfInteractive WhichKind, const Standard_Integer WhichSignature, AIS_ListOfInteractive &theListOfIO) const
 gives the list of erased objects (hidden objects) Type and signature by Default, <WhichSignature> = -1 means control only on <WhichKind>. More...
 
void ObjectsByDisplayStatus (const AIS_DisplayStatus theStatus, AIS_ListOfInteractive &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. More...
 
void ObjectsByDisplayStatus (const AIS_KindOfInteractive WhichKind, const Standard_Integer WhichSignature, const AIS_DisplayStatus theStatus, AIS_ListOfInteractive &theListOfIO) const
 gives the list of objects with indicated display status Type and signature by Default, <WhichSignature> = -1 means control only on <WhichKind>. More...
 
void ObjectsInside (AIS_ListOfInteractive &aListOfIO, const AIS_KindOfInteractive WhichKind=AIS_KOI_None, const Standard_Integer 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_KOI_None and <WhichSignature> = -1, all the objects are put into the list. More...
 
Standard_Boolean HasOpenedContext () const
 Returns true if there is an open context. More...
 
Handle< AIS_LocalContextLocalContext () const
 This method is only intended for advanced operation, particularly with the aim to improve performance when many objects have to be selected together. Otherwise, you should use other (non-internal) methods of class AIS_InteractiveContext without trying to obtain an instance of AIS_LocalContext. More...
 
const Handle< SelectMgr_SelectionManager > & SelectionManager () const
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
const Handle< PrsMgr_PresentationManager3d > & MainPrsMgr () const
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
const Handle< StdSelect_ViewerSelector3d > & MainSelector () const
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Handle< StdSelect_ViewerSelector3dLocalSelector () const
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Integer PurgeDisplay ()
 Clears all the structures which don't belong to objects displayed at neutral point only effective when no Local Context is opened... returns the number of removed structures from the viewers. More...
 
Standard_Integer HighestIndex () const
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
void DisplayActiveSensitive (const Handle< V3d_View > &aView)
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
void ClearActiveSensitive (const Handle< V3d_View > &aView)
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
void FitSelected (const Handle< V3d_View > &theView, const Standard_Real theMargin=0.01, const Standard_Boolean theToUpdate=Standard_True)
 Fits the view correspondingly to the bounds of selected objects. Infinite objects are ignored if infinite state of AIS_InteractiveObject is set to true. More...
 
void DisplayActiveSensitive (const Handle< AIS_InteractiveObject > &anObject, const Handle< V3d_View > &aView)
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Boolean IsInLocal (const Handle< AIS_InteractiveObject > &anObject, Standard_Integer &TheIndex) const
 returns if possible, the first local context where the object is seen More...
 
void RebuildSelectionStructs ()
 Rebuilds 1st level of BVH selection forcibly. More...
 
void SetViewAffinity (const Handle< AIS_InteractiveObject > &theIObj, const Handle< V3d_View > &theView, const Standard_Boolean theIsVisible)
 setup object visibility in specified view, has no effect if object is not disaplyed in this context. More...
 
void Disconnect (const Handle< AIS_InteractiveObject > &theAssembly, const Handle< AIS_InteractiveObject > &theObjToDisconnect=NULL)
 Disconnects theObjToDisconnect from theAssembly and removes dependent selection structures. More...
 
void ObjectsForView (AIS_ListOfInteractive &theListOfIO, const Handle< V3d_View > &theView, const Standard_Boolean theIsVisibleInView, const AIS_DisplayStatus theStatus=AIS_DS_None) const
 Query objects visible or hidden in specified view due to affinity mask. More...
 
void RedrawImmediate (const Handle< V3d_Viewer > &theViewer)
 Redraws immediate structures in all views of the viewer given taking into account its visibility. More...
 
void GetDefModes (const Handle< AIS_InteractiveObject > &anIobj, Standard_Integer &Dmode, Standard_Integer &HiMod, Standard_Integer &SelMode) const
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
void EraseGlobal (const Handle< AIS_InteractiveObject > &anObj, const Standard_Boolean updateviewer=Standard_True)
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
void ClearGlobal (const Handle< AIS_InteractiveObject > &anObj, const Standard_Boolean updateviewer=Standard_True)
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
void ClearGlobalPrs (const Handle< AIS_InteractiveObject > &anObj, const Standard_Integer aMode, const Standard_Boolean updateviewer=Standard_True)
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
void InitAttributes ()
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
Standard_Integer PurgeViewer (const Handle< V3d_Viewer > &Vwr)
 Unhighlights previously selected owners and marks them as not selected. Marks owner given as selected and highlights it. Performs selection filters check. More...
 
void redisplayPrsModes (const Handle< AIS_InteractiveObject > &theIObj, const Standard_Boolean theToUpdateViewer=Standard_True)
 UNKNOWN. More...
 
void redisplayPrsRecModes (const Handle< AIS_InteractiveObject > &theIObj, const Standard_Boolean theToUpdateViewer=Standard_True)
 UNKNOWN. More...
 
void unhighlightOwners (const Handle< AIS_InteractiveObject > &theObject)
 Helper function to unhighlight all entity owners currently highlighted with seleciton color. More...
 
void highlightWithColor (const Handle< SelectMgr_EntityOwner > &theOwner, const Handle< V3d_Viewer > &theViewer=NULL)
 Helper function that highlights the owner given with <theStyle> without performing AutoHighlight checks, e.g. is used for dynamic highlight. More...
 
void highlightSelected (const Handle< SelectMgr_EntityOwner > &theOwner)
 Helper function that highlights the owner given with <theStyle> with check for AutoHighlight, e.g. is used for selection. More...
 
void highlightGlobal (const Handle< AIS_InteractiveObject > &theObj, const Handle< Graphic3d_HighlightStyle > &theStyle, const Standard_Integer theMode) const
 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. More...
 
void unhighlightSelected (const Standard_Boolean theIsToHilightSubIntensity=Standard_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. More...
 
void unhighlightGlobal (const Handle< AIS_InteractiveObject > &theObj, const Standard_Integer theMode) const
 Helper function that unhighlights global selection owner of given interactive. The function does not perform any updates of global or owner status. More...
 
void turnOnSubintensity (const Handle< AIS_InteractiveObject > &theObject=NULL, const Standard_Integer theDispMode=-1, const Standard_Boolean theIsDisplayedOnly=Standard_True) const
 Helper function that turns on sub-intensity in global status and highlights given objects with sub-intensity color. More...
 
void highlightWithSubintensity (const Handle< AIS_InteractiveObject > &theObject, const Standard_Integer theMode) const
 Helper function that highlights the object with sub-intensity color without any checks. More...
 
void highlightWithSubintensity (const Handle< SelectMgr_EntityOwner > &theOwner, const Standard_Integer theMode) const
 Helper function that highlights the owner with sub-intensity color without any checks. More...
 
const Handle< Graphic3d_HighlightStyle > & getHiStyle (const Handle< AIS_InteractiveObject > &theObj) 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. More...
 
const Handle< Graphic3d_HighlightStyle > & getSelStyle (const Handle< AIS_InteractiveObject > &theObj) 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. More...
 
void setContextToObject (const Handle< AIS_InteractiveObject > &theObj)
 Assign the context to the object or throw exception if object was already assigned to another context. More...
 

Additional Inherited Members

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

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. You must distinguish two states in the Interactive Context:

  1. When you want ot work on one type of entity, you may open a local context with the option UseDisplayedObjects set to false. DisplayedObjects allows you to recover the visualized Interactive Objects which have a given Type and Signature from Neutral Point.
  2. You must keep in mind the fact that when you open a Local Context with default options:

Constructor & Destructor Documentation

AIS_InteractiveContext::AIS_InteractiveContext ( const Handle< V3d_Viewer > &  MainViewer)

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

virtual AIS_InteractiveContext::~AIS_InteractiveContext ( )
virtual

Destructor.

Member Function Documentation

void AIS_InteractiveContext::Activate ( const Handle< AIS_InteractiveObject > &  anIobj,
const Standard_Integer  aMode = 0,
const Standard_Boolean  theIsForce = Standard_False 
)

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

void AIS_InteractiveContext::ActivatedModes ( const Handle< AIS_InteractiveObject > &  anIobj,
TColStd_ListOfInteger theList 
) const

Returns the list of activated selection modes in an open context.

const TColStd_ListOfInteger& AIS_InteractiveContext::ActivatedStandardModes ( ) const

Returns the list of activated standard selection modes available in a local context.

void AIS_InteractiveContext::ActivateStandardMode ( const TopAbs_ShapeEnum  aStandardActivation)

Provides an alternative to the Display methods when activating specific selection modes. This has the effect of activating the corresponding selection mode aStandardActivation for all objects in Local Context which accept decomposition into sub-shapes. Every new Object which has been loaded into the interactive context and which answers these decomposition criteria is automatically activated according to these modes. Warning If you have opened a local context by loading an object with the default options (<AllowShapeDecomposition>= Standard_True), all objects of the "Shape" type are also activated with the same modes. You can act on the state of these "Standard" objects by using SetShapeDecomposition(Status).

void AIS_InteractiveContext::AddFilter ( const Handle< SelectMgr_Filter > &  aFilter)

Allows you to add the filter aFilter to Neutral Point or to a local context if one or more selection modes have been activated. Only type filters may be active in Neutral Point.

void AIS_InteractiveContext::AddOrRemoveCurrentObject ( const Handle< AIS_InteractiveObject > &  theObj,
const Standard_Boolean  theIsToUpdateViewer = Standard_True 
)

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 sence only for neutral point selection of a whole object, if 0 selection of the object is empty this method simply does nothing.

void AIS_InteractiveContext::AddOrRemoveSelected ( const Handle< AIS_InteractiveObject > &  theObject,
const Standard_Boolean  theToUpdateViewer = Standard_True 
)

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

void AIS_InteractiveContext::AddOrRemoveSelected ( const TopoDS_Shape aShape,
const Standard_Boolean  updateviewer = Standard_True 
)

No right to Add a selected Shape (Internal Management of shape Selection). A Previous selected shape may only be removed.

void AIS_InteractiveContext::AddOrRemoveSelected ( const Handle< SelectMgr_EntityOwner > &  theOwner,
const Standard_Boolean  theToUpdateViewer = Standard_True 
)

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

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

Adds object in the selection.

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

Adds object in the selection.

Handle< Standard_Transient > AIS_InteractiveContext::Applicative ( ) const

Returns the owner of the applicative entity detected in interactive context. The owner can be a shape for a set of sub-shapes or a sub-shape for sub-shapes which it is composed of.

Standard_Boolean AIS_InteractiveContext::AutomaticHilight ( ) const

Returns true if the automatic highlight mode is active in an open context.

Standard_Boolean AIS_InteractiveContext::BeginImmediateDraw ( )

initializes the list of presentations to be displayed returns False if no local context is opened.

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

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

void AIS_InteractiveContext::ClearCurrents ( const Standard_Boolean  theToUpdateViewer = Standard_True)

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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::ClearGlobal ( const Handle< AIS_InteractiveObject > &  anObj,
const Standard_Boolean  updateviewer = Standard_True 
)
protected

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

void AIS_InteractiveContext::ClearGlobalPrs ( const Handle< AIS_InteractiveObject > &  anObj,
const Standard_Integer  aMode,
const Standard_Boolean  updateviewer = Standard_True 
)
protected

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

void AIS_InteractiveContext::ClearLocalContext ( const AIS_ClearMode  TheMode = AIS_CM_All)

clears Objects/Filters/Activated Modes list in the current opened local context.

void AIS_InteractiveContext::ClearPrs ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Integer  aMode = 0,
const Standard_Boolean  updateviewer = Standard_True 
)

Empties the graphic presentation of the mode indexed by aMode. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. Warning Removes anIobj. anIobj is still active if it was previously activated.

void AIS_InteractiveContext::ClearSelected ( const Standard_Boolean  theToUpdateViewer = Standard_True)

Empties previous selected objects in order to get the selected objects detected by the selector using UpdateSelected. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::CloseAllContexts ( const Standard_Boolean  updateviewer = Standard_True)

Allows you to close all local contexts at one go and return to Neutral Point. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::CloseLocalContext ( const Standard_Integer  Index = -1,
const Standard_Boolean  updateviewer = Standard_True 
)

Allows you to close local contexts. For greater security, you should close the context with the index Index given on opening. When you close a local context, the one before, which is still on the stack, reactivates. If none is left, you return to Neutral Point. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. Warning When the index isn't specified, the current context is closed. This option can be dangerous, as other Interactive Functions can open local contexts without necessarily warning the user.

Quantity_NameOfColor AIS_InteractiveContext::Color ( const Handle< AIS_InteractiveObject > &  aniobj) const
void AIS_InteractiveContext::Color ( const Handle< AIS_InteractiveObject > &  aniobj,
Quantity_Color acolor 
) const

Returns the color Color of the entity aniobj in the interactive context.

Handle< AIS_InteractiveObject > AIS_InteractiveContext::Current ( ) 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.

const Handle< V3d_Viewer >& AIS_InteractiveContext::CurrentViewer ( ) const

Returns the current viewer.

void AIS_InteractiveContext::Deactivate ( const Handle< AIS_InteractiveObject > &  anIObj)

Deactivates all the activated selection modes of an object.

void AIS_InteractiveContext::Deactivate ( const Handle< AIS_InteractiveObject > &  anIobj,
const Standard_Integer  aMode 
)

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

void AIS_InteractiveContext::DeactivateStandardMode ( const TopAbs_ShapeEnum  aStandardActivation)

Provides an alternative to the Display methods when deactivating specific selection modes. This has the effect of deactivating the corresponding selection mode aStandardActivation for all objects in Local Context which accept decomposition into sub-shapes.

Quantity_NameOfColor AIS_InteractiveContext::DefaultColor ( ) const

Returns the name of the color used by default. By default, this is Quantity_NOC_GOLDENROD.

const Handle< Prs3d_Drawer >& AIS_InteractiveContext::DefaultDrawer ( ) const

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.

Handle< AIS_InteractiveObject > AIS_InteractiveContext::DetectedCurrentObject ( ) const
Returns
current mouse-detected interactive object or null object, if there is no currently detected interactives
const TopoDS_Shape& AIS_InteractiveContext::DetectedCurrentShape ( ) 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.
Handle< AIS_InteractiveObject > AIS_InteractiveContext::DetectedInteractive ( ) const

Returns the interactive objects last detected in open context. If there is no open local context, the objects selected are called current objects; selected objects if there is one. Iterators allow entities to be recovered in either case. This method is one of a set which allows you to manipulate the objects which have been placed in these two lists.

Handle< SelectMgr_EntityOwner > AIS_InteractiveContext::DetectedOwner ( ) const

returns the owner of the detected sensitive primitive.

const TopoDS_Shape& AIS_InteractiveContext::DetectedShape ( ) const

Returns the shape detected in local context. If there is no open local context, the objects selected are called current objects; selected objects if there is one. Iterators allow entities to be recovered in either case. This method is one of a set which allows you to manipulate the objects which have been placed in these two lists.

Standard_Real AIS_InteractiveContext::DeviationAngle ( ) const
Standard_Real AIS_InteractiveContext::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 AIS_InteractiveContext::DisableDrawHiddenLine ( ) const
void AIS_InteractiveContext::Disconnect ( const Handle< AIS_InteractiveObject > &  theAssembly,
const Handle< AIS_InteractiveObject > &  theObjToDisconnect = NULL 
)

Disconnects theObjToDisconnect from theAssembly and removes dependent selection structures.

void AIS_InteractiveContext::Display ( const Handle< AIS_InteractiveObject > &  anIobj,
const Standard_Boolean  updateviewer = Standard_True 
)

Controls the choice between the using the display and selection modes of open local context which you have defined and activating those available by default. If a local context is open and if updateviewer equals Standard_False, the Interactive Object anIobj is displayed in the default active 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. In general, this is 0. This syntax has the same behavior as local context, open or closed. If you want to view the object in open local context without selection, use the syntax below, setting aSelectionMode to -1.

void AIS_InteractiveContext::Display ( const Handle< AIS_InteractiveObject > &  theIObj,
const Standard_Integer  theDispMode,
const Standard_Integer  theSelectionMode,
const Standard_Boolean  theToUpdateViewer = Standard_True,
const Standard_Boolean  theToAllowDecomposition = Standard_True,
const AIS_DisplayStatus  theDispStatus = AIS_DS_None 
)

Controls the choice between the using the display and selection modes of open local context which you have defined and activating those available by default. If no Local Context is opened. and the Interactive Object theIObj has no display mode of its own, the default display mode, 0, is used. Likewise, if theIObj has no selection mode of its own, the default one, 0, is used. If a local context is open and if theToUpdateViewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. If theSelectionMode equals -1, theIObj will not be activated: it will be displayed but will not be selectable. Use this if you want to view the object in open local context without selection. Note: This option is only available in Local Context. If theToAllowDecomposition equals true, theIObj can have subshapes detected by selection mechanisms. theIObj must be able to give a shape selection modes which fit the AIS_Shape selection modes:

  • vertices: 1
  • edges: 2
  • wires: 3.
void AIS_InteractiveContext::DisplayActiveSensitive ( const Handle< V3d_View > &  aView)

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

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

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

void AIS_InteractiveContext::DisplayAll ( const Standard_Boolean  updateviewer = Standard_True)

Displays all hidden objects.

void AIS_InteractiveContext::DisplayedObjects ( AIS_ListOfInteractive aListOfIO,
const Standard_Boolean  OnlyFromNeutral = Standard_False 
) 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 AIS_InteractiveContext::DisplayedObjects ( const AIS_KindOfInteractive  WhichKind,
const Standard_Integer  WhichSignature,
AIS_ListOfInteractive aListOfIO,
const Standard_Boolean  OnlyFromNeutral = Standard_False 
) const

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

Standard_Integer AIS_InteractiveContext::DisplayMode ( ) const

Returns the display mode setting. Note that mode 3 is only used.

Standard_Integer AIS_InteractiveContext::DisplayPriority ( const Handle< AIS_InteractiveObject > &  anIobj) const

Returns the display priority of the entity anIobj. This will be display mode of anIobj if it is in the main viewer.

void AIS_InteractiveContext::DisplaySelected ( const Standard_Boolean  updateviewer = Standard_True)

Displays selected objects if a local context is open. Displays current objects if there is no active local context. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

AIS_DisplayStatus AIS_InteractiveContext::DisplayStatus ( const Handle< AIS_InteractiveObject > &  anIobj) const

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

  • DS_Displayed displayed in main viewer
  • DS_Erased hidden in main viewer
  • DS_Temporary temporarily displayed
  • DS_None nowhere displayed.
Standard_Boolean AIS_InteractiveContext::DrawHiddenLine ( ) const

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

void AIS_InteractiveContext::EnableDrawHiddenLine ( ) const
Standard_Boolean AIS_InteractiveContext::EndImmediateDraw ( const Handle< V3d_View > &  theView)

returns True if the immediate display has been done.

Standard_Boolean AIS_InteractiveContext::EndImmediateDraw ( )

Uses the First Active View of Main Viewer! returns True if the immediate display has been done.

void AIS_InteractiveContext::EntityOwners ( Handle< SelectMgr_IndexedMapOfOwner > &  theOwners,
const Handle< AIS_InteractiveObject > &  theIObj,
const Standard_Integer  theMode = -1 
) const

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

void AIS_InteractiveContext::Erase ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Boolean  updateviewer = Standard_True 
)

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

void AIS_InteractiveContext::EraseAll ( const Standard_Boolean  updateviewer = Standard_True)

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 AIS_InteractiveContext::ErasedObjects ( AIS_ListOfInteractive 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 AIS_InteractiveContext::ErasedObjects ( const AIS_KindOfInteractive  WhichKind,
const Standard_Integer  WhichSignature,
AIS_ListOfInteractive theListOfIO 
) const

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

void AIS_InteractiveContext::EraseGlobal ( const Handle< AIS_InteractiveObject > &  anObj,
const Standard_Boolean  updateviewer = Standard_True 
)
protected

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

void AIS_InteractiveContext::EraseSelected ( const Standard_Boolean  updateviewer = Standard_True)

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

const SelectMgr_ListOfFilter& AIS_InteractiveContext::Filters ( ) const

Returns the list of filters active in a local context.

Handle< AIS_InteractiveObject > AIS_InteractiveContext::FirstSelectedObject ( )

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

void AIS_InteractiveContext::FitSelected ( const Handle< V3d_View > &  theView,
const Standard_Real  theMargin = 0.01,
const Standard_Boolean  theToUpdate = Standard_True 
)

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

Standard_Boolean AIS_InteractiveContext::GetAutoActivateSelection ( ) const
void AIS_InteractiveContext::GetDefModes ( const Handle< AIS_InteractiveObject > &  anIobj,
Standard_Integer Dmode,
Standard_Integer HiMod,
Standard_Integer SelMode 
) const
protected

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

const Handle< Graphic3d_HighlightStyle >& AIS_InteractiveContext::getHiStyle ( const Handle< AIS_InteractiveObject > &  theObj) 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
theObj[in] the object to check
const Handle< Graphic3d_HighlightStyle >& AIS_InteractiveContext::getSelStyle ( const Handle< AIS_InteractiveObject > &  theObj) 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
theObj[in] the object to check
Standard_Integer AIS_InteractiveContext::GetZLayer ( const Handle< AIS_InteractiveObject > &  theIObj) const

Get Z layer id set for displayed interactive object.

Standard_Boolean AIS_InteractiveContext::HasApplicative ( ) const

Returns true if the applicative object has an owner from Interactive attributed to it.

Standard_Boolean AIS_InteractiveContext::HasColor ( const Handle< AIS_InteractiveObject > &  aniobj) const

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

Standard_Boolean AIS_InteractiveContext::HasDetected ( ) const

Returns true if there is a mouse-detected entity in local context. If there is no open local context, the objects selected are called current objects; selected objects if there is one. Iterators allow entities to be recovered in either case. This method is one of a set which allows you to manipulate the objects which have been placed in these two lists.

Standard_Boolean AIS_InteractiveContext::HasDetectedShape ( ) const

Returns true if there is a detected shape in local context. If there is no open local context, the objects selected are called current objects; selected objects if there is one. Iterators allow entities to be recovered in either case. This method is one of a set which allows you to manipulate the objects which have been placed in these two lists.

Standard_Boolean AIS_InteractiveContext::HasLocation ( const Handle< AIS_InteractiveObject > &  aniobj) const

Returns true if the entity aniobj has a location.

Standard_Boolean AIS_InteractiveContext::HasNextDetected ( ) const

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

Standard_Boolean AIS_InteractiveContext::HasOpenedContext ( ) const

Returns true if there is an open context.

Standard_Boolean AIS_InteractiveContext::HasPolygonOffsets ( const Handle< AIS_InteractiveObject > &  anObj) const

simply calls anObj->HasPolygonOffsets()

Standard_Boolean AIS_InteractiveContext::HasSelectedShape ( ) const

Returns true if the interactive context has a shape selected in it which results from the decomposition of another entity. If HasSelectedShape returns true, SelectedShape returns the shape which has been shown to be selected. Interactive returns the Interactive Object from which the shape has been selected. If HasSelectedShape returns false, Interactive returns the interactive entity selected by the click of the mouse.

Handle< Prs3d_LineAspect > AIS_InteractiveContext::HiddenLineAspect ( ) const

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.

Standard_Integer AIS_InteractiveContext::HighestIndex ( ) const

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

void AIS_InteractiveContext::highlightGlobal ( const Handle< AIS_InteractiveObject > &  theObj,
const Handle< Graphic3d_HighlightStyle > &  theStyle,
const Standard_Integer  theMode 
) const
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.

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

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

Standard_Boolean AIS_InteractiveContext::HighlightStyle ( const Handle< AIS_InteractiveObject > &  theObj,
Handle< Graphic3d_HighlightStyle > &  theStyle 
) const

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

Parameters
theObj[in] the object to check
Standard_Boolean AIS_InteractiveContext::HighlightStyle ( const Handle< SelectMgr_EntityOwner > &  theOwner,
Handle< Graphic3d_HighlightStyle > &  theStyle 
) const

Returns highlight style of the owner if it is selected.

Parameters
theOwner[in] the owner to check
const Handle< Graphic3d_HighlightStyle >& AIS_InteractiveContext::HighlightStyle ( ) const
inline

Returns current dynamic highlight style settings. By default:

  • the color of dynamic highlight is Quantity_NOC_CYAN1;
  • the presentation for dynamic highlight is completely opaque;
  • the type of highlight is Aspect_TOHM_COLOR.
void AIS_InteractiveContext::highlightWithColor ( const Handle< SelectMgr_EntityOwner > &  theOwner,
const Handle< V3d_Viewer > &  theViewer = NULL 
)
protected

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

void AIS_InteractiveContext::highlightWithSubintensity ( const Handle< AIS_InteractiveObject > &  theObject,
const Standard_Integer  theMode 
) const
protected

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

Parameters
theObject[in] the object that will be highlighted
theMode[in] display mode
void AIS_InteractiveContext::highlightWithSubintensity ( const Handle< SelectMgr_EntityOwner > &  theOwner,
const Standard_Integer  theMode 
) const
protected

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

Parameters
theOwner[in] the owner that will be highlighted
theMode[in] display mode
void AIS_InteractiveContext::HilightCurrents ( const Standard_Boolean  theToUpdateViewer = Standard_True)

Highlights current objects. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

Standard_Integer AIS_InteractiveContext::HilightNextDetected ( const Handle< V3d_View > &  theView,
const Standard_Boolean  theToRedrawImmediate = Standard_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! returns the Rank of hilighted entity WARNING : Loop Method. When all the detected entities have been hilighted , the next call will hilight the first one again

Standard_Integer AIS_InteractiveContext::HilightPreviousDetected ( const Handle< V3d_View > &  theView,
const Standard_Boolean  theToRedrawImmediate = Standard_True 
)

Same as previous methods in reverse direction...

void AIS_InteractiveContext::HilightSelected ( const Standard_Boolean  theToUpdateViewer = Standard_True)

Highlights selected objects. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

Standard_Real AIS_InteractiveContext::HLRAngle ( ) const

Returns the real number value of the deviation angle in hidden line removal views in this interactive context. The default value is 20*PI/180.

Standard_Real AIS_InteractiveContext::HLRDeviationCoefficient ( ) const

Returns the real number value of the hidden line removal deviation coefficient. 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 give 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. To find the hidden lines, hidden line display mode entails recalculation of the view at each different projector perspective. Because hidden lines entail calculations of more than usual complexity to decompose them into these triangles, a deviation coefficient allowing greater tolerance is used. This increases efficiency in calculation. The Default value is 0.02.

Standard_Boolean AIS_InteractiveContext::ImmediateAdd ( const Handle< AIS_InteractiveObject > &  theObj,
const Standard_Integer  theMode = 0 
)

returns True if <anIObj> has been stored in the list.

Standard_Integer AIS_InteractiveContext::IndexOfCurrentLocal ( ) const

returns -1 if no opened local context.

void AIS_InteractiveContext::InitAttributes ( )
protected

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

void AIS_InteractiveContext::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.

void AIS_InteractiveContext::InitDetected ( )

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

void AIS_InteractiveContext::InitSelected ( )

Initializes a scan of the selected objects.

Standard_Boolean AIS_InteractiveContext::IsCurrent ( const 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.

Standard_Boolean AIS_InteractiveContext::IsDisplayed ( const Handle< AIS_InteractiveObject > &  anIobj) const

Returns true if anIobj is displayed in the interactive context.

Standard_Boolean AIS_InteractiveContext::IsDisplayed ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Integer  aMode 
) const
Standard_Boolean AIS_InteractiveContext::IsHilighted ( const Handle< AIS_InteractiveObject > &  theObj) const

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

Parameters
theObj[in] the object to check
Standard_Boolean AIS_InteractiveContext::IsHilighted ( const Handle< SelectMgr_EntityOwner > &  theOwner) const

Returns true if the owner is marked as selected.

Parameters
theOwner[in] the owner to check
Standard_Boolean AIS_InteractiveContext::IsImmediateModeOn ( ) const

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

Standard_Boolean AIS_InteractiveContext::IsInLocal ( const Handle< AIS_InteractiveObject > &  anObject,
Standard_Integer TheIndex 
) const

returns if possible, the first local context where the object is seen

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

Returns the number of U and V isoparameters displayed.

void AIS_InteractiveContext::IsoOnPlane ( const Standard_Boolean  SwitchOn)

Returns True if drawing isoparameters on planes is enabled.

Standard_Boolean AIS_InteractiveContext::IsoOnPlane ( ) const

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

void AIS_InteractiveContext::IsoOnTriangulation ( const Standard_Boolean  theIsEnabled,
const 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 AIS_InteractiveContext::IsoOnTriangulation ( const Standard_Boolean  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.

Standard_Boolean AIS_InteractiveContext::IsoOnTriangulation ( ) const

Returns true if drawing isolines on triangulation algorithm is enabled.

Standard_Boolean AIS_InteractiveContext::IsSelected ( const Handle< SelectMgr_EntityOwner > &  theOwner) const

Returns true is the owner given is selected.

Standard_Boolean AIS_InteractiveContext::IsSelected ( const Handle< AIS_InteractiveObject > &  theObj) const

Returns true is the object given is selected.

Standard_Boolean AIS_InteractiveContext::KeepTemporary ( const Handle< AIS_InteractiveObject > &  anIObj,
const Standard_Integer  InWhichLocal = -1 
)

Changes the status of a temporary object. It will be kept at the neutral point, i.e. put in the list of displayed objects along withwith its temporary attributes. These include display mode and selection mode, for example. Returns true if done. inWhichLocal gives the local context in which anIObj is displayed. By default, the index -1 refers to the last Local Context opened.

void AIS_InteractiveContext::Load ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Integer  SelectionMode = -1,
const Standard_Boolean  AllowDecomp = Standard_False 
)

Allows you to load the Interactive Object aniobj with a given selection mode SelectionMode, and/or with the desired decomposition option, whether the object is visualized or not. If AllowDecomp = Standard_True and, if the interactive object is of the "Shape" type, these "standard" selection modes will be automatically activated as a function of the modes present in the Local Context. The loaded objects will be selectable but displayable in highlighting only when detected by the Selector. This method is available only when Local Contexts are open.

Handle< AIS_LocalContext > AIS_InteractiveContext::LocalContext ( ) const

This method is only intended for advanced operation, particularly with the aim to improve performance when many objects have to be selected together. Otherwise, you should use other (non-internal) methods of class AIS_InteractiveContext without trying to obtain an instance of AIS_LocalContext.

Handle< StdSelect_ViewerSelector3d > AIS_InteractiveContext::LocalSelector ( ) const

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

TopLoc_Location AIS_InteractiveContext::Location ( const Handle< AIS_InteractiveObject > &  aniobj) const

Returns the location of the entity aniobj.

const Handle< PrsMgr_PresentationManager3d >& AIS_InteractiveContext::MainPrsMgr ( ) const

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

const Handle< StdSelect_ViewerSelector3d >& AIS_InteractiveContext::MainSelector ( ) const

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

Standard_Boolean AIS_InteractiveContext::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.

Standard_Boolean AIS_InteractiveContext::MoreDetected ( ) const
Returns
true if there is more mouse-detected objects after the current one during iteration through mouse-detected interactive objects.
Standard_Boolean AIS_InteractiveContext::MoreSelected ( ) const

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

AIS_StatusOfDetection AIS_InteractiveContext::MoveTo ( const Standard_Integer  theXPix,
const Standard_Integer  theYPix,
const Handle< V3d_View > &  theView,
const Standard_Boolean  theToRedrawOnUpdate = Standard_True 
)

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. Functions in both Neutral Point and local contexts. If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to highlight detected object.

Standard_Integer AIS_InteractiveContext::NbCurrents ( )

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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

Standard_Integer AIS_InteractiveContext::NbSelected ( )

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

void AIS_InteractiveContext::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.

void AIS_InteractiveContext::NextDetected ( )

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

void AIS_InteractiveContext::NextSelected ( )

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

void AIS_InteractiveContext::NotUseDisplayedObjects ( )

when a local Context is opened, one is able to use/not use the displayed objects at neutral point at anytime.

void AIS_InteractiveContext::ObjectsByDisplayStatus ( const AIS_DisplayStatus  theStatus,
AIS_ListOfInteractive 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 AIS_InteractiveContext::ObjectsByDisplayStatus ( const AIS_KindOfInteractive  WhichKind,
const Standard_Integer  WhichSignature,
const AIS_DisplayStatus  theStatus,
AIS_ListOfInteractive theListOfIO 
) const

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

void AIS_InteractiveContext::ObjectsForView ( AIS_ListOfInteractive theListOfIO,
const Handle< V3d_View > &  theView,
const Standard_Boolean  theIsVisibleInView,
const AIS_DisplayStatus  theStatus = AIS_DS_None 
) const

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

void AIS_InteractiveContext::ObjectsInside ( AIS_ListOfInteractive aListOfIO,
const AIS_KindOfInteractive  WhichKind = AIS_KOI_None,
const Standard_Integer  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_KOI_None and <WhichSignature> = -1, all the objects are put into the list.

Standard_Integer AIS_InteractiveContext::OpenLocalContext ( const Standard_Boolean  UseDisplayedObjects = Standard_True,
const Standard_Boolean  AllowShapeDecomposition = Standard_True,
const Standard_Boolean  AcceptEraseOfObjects = Standard_False,
const Standard_Boolean  BothViewers = Standard_False 
)

Opens local contexts and specifies how this is to be done. The options listed above function in the following manner:

  • UseDisplayedObjects -allows you to load or not load the interactive objects visualized at Neutral Point in the local context which you open. If false, the local context is empty after being opened. If true, the objects at Neutral Point are loaded by their default selection mode.
  • AllowShapeDecomposition -AIS_Shape allows or prevents decomposition in standard shape location mode of objects at Neutral Point which are type-"privileged". This Flag is only taken into account when UseDisplayedObjects is true.
  • AcceptEraseOfObjects -authorises other local contexts to erase the interactive objects present in this context. This option is rarely used.
  • BothViewers - Has no use currently defined. This method returns the index of the created local context. It should be kept and used to close the context. Opening a local context allows you to prepare an environment for temporary presentations and selections which will disappear once the local context is closed. You can open several local contexts, but only the last one will be active.
Standard_Integer AIS_InteractiveContext::PixelTolerance ( ) const

Returns the pixel tolerance.

Standard_Boolean AIS_InteractiveContext::PlaneSize ( Standard_Real XSize,
Standard_Real YSize 
) const

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

void AIS_InteractiveContext::PolygonOffsets ( const Handle< AIS_InteractiveObject > &  anObj,
Standard_Integer aMode,
Standard_ShortReal aFactor,
Standard_ShortReal aUnits 
) const

Retrieves current polygon offsets settings for <anObj>.

Quantity_NameOfColor AIS_InteractiveContext::PreSelectionColor ( ) const

Returns the name of the color used to show preselection. By default, this is Quantity_NOC_GREEN.

Standard_Integer AIS_InteractiveContext::PurgeDisplay ( )

Clears all the structures which don't belong to objects displayed at neutral point only effective when no Local Context is opened... returns the number of removed structures from the viewers.

Standard_Integer AIS_InteractiveContext::PurgeViewer ( const Handle< V3d_Viewer > &  Vwr)
protected

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

void AIS_InteractiveContext::RebuildSelectionStructs ( )

Rebuilds 1st level of BVH selection forcibly.

void AIS_InteractiveContext::RecomputePrsOnly ( const Handle< AIS_InteractiveObject > &  anIobj,
const Standard_Boolean  updateviewer = Standard_True,
const Standard_Boolean  allmodes = Standard_False 
)

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

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

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

void AIS_InteractiveContext::Redisplay ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Boolean  updateviewer = Standard_True,
const Standard_Boolean  allmodes = Standard_False 
)

Recomputes the seen parts presentation of the entity aniobj. If allmodes equals true, all presentations are present in the object even if unseen. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::Redisplay ( const AIS_KindOfInteractive  aTypeOfObject,
const Standard_Integer  Signature = -1,
const Standard_Boolean  updateviewer = Standard_True 
)

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

void AIS_InteractiveContext::redisplayPrsModes ( const Handle< AIS_InteractiveObject > &  theIObj,
const Standard_Boolean  theToUpdateViewer = Standard_True 
)
protected

UNKNOWN.

void AIS_InteractiveContext::redisplayPrsRecModes ( const Handle< AIS_InteractiveObject > &  theIObj,
const Standard_Boolean  theToUpdateViewer = Standard_True 
)
protected

UNKNOWN.

void AIS_InteractiveContext::RedrawImmediate ( const Handle< V3d_Viewer > &  theViewer)

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

void AIS_InteractiveContext::Remove ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Boolean  updateviewer = Standard_True 
)

Removes aniobj from every viewer. aniobj is no longer referenced in the Context. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::RemoveAll ( const Standard_Boolean  updateviewer = Standard_True)

Removes all the objects from all opened Local Contexts and from the Neutral Point.

void AIS_InteractiveContext::RemoveFilter ( const Handle< SelectMgr_Filter > &  aFilter)

Removes a filter from Neutral Point or a local context if one or more selection modes have been activated. Only type filters are activated in Neutral Point.

void AIS_InteractiveContext::RemoveFilters ( )

Remove a filter to Neutral Point or a local context if one or more selection modes have been activated. Only type filters are active in Neutral Point.

void AIS_InteractiveContext::ResetLocation ( const Handle< AIS_InteractiveObject > &  aniobj)

Puts the entity aniobj back into its initial position.

void AIS_InteractiveContext::ResetOriginalState ( const Standard_Boolean  updateviewer = Standard_True)

to be used only with no opened local context.. displays and activates objects in their original state before local contexts were opened...

AIS_StatusOfPick AIS_InteractiveContext::Select ( const Standard_Integer  XPMin,
const Standard_Integer  YPMin,
const Standard_Integer  XPMax,
const Standard_Integer  YPMax,
const Handle< V3d_View > &  aView,
const Standard_Boolean  updateviewer = Standard_True 
)

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

AIS_StatusOfPick AIS_InteractiveContext::Select ( const TColgp_Array1OfPnt2d Polyline,
const Handle< V3d_View > &  aView,
const Standard_Boolean  updateviewer = Standard_True 
)

polyline selection; clears the previous picked list

AIS_StatusOfPick AIS_InteractiveContext::Select ( const Standard_Boolean  updateviewer = Standard_True)

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

Handle< AIS_InteractiveObject > AIS_InteractiveContext::SelectedInteractive ( ) const

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

Handle< SelectMgr_EntityOwner > AIS_InteractiveContext::SelectedOwner ( ) const

Returns the owner of the selected entity resulting from the decomposition of another entity.

TopoDS_Shape AIS_InteractiveContext::SelectedShape ( ) const

Returns the selected shape.

const Handle< SelectMgr_SelectionManager >& AIS_InteractiveContext::SelectionManager ( ) const

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

const Handle< Graphic3d_HighlightStyle >& AIS_InteractiveContext::SelectionStyle ( ) const
inline

Returns current selection style settings. By default:

  • the color of selection is Quantity_NOC_GRAY80;
  • the presentation for selection is completely opaque;
  • the type of highlight is Aspect_TOHM_COLOR.
void AIS_InteractiveContext::SetAngleAndDeviation ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Real  anAngle,
const Standard_Boolean  updateviewer = Standard_True 
)

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

void AIS_InteractiveContext::SetAutoActivateSelection ( const Standard_Boolean  Auto)
void AIS_InteractiveContext::SetAutomaticHilight ( const Standard_Boolean  aStatus)

Sets the highlighting status aStatus of detected and selected entities. Whether you are in Neutral Point or local context, this is automatically managed by the Interactive Context. This function allows you to disconnect the automatic mode.

void AIS_InteractiveContext::SetColor ( const Handle< AIS_InteractiveObject > &  aniobj,
const Quantity_NameOfColor  aColor,
const Standard_Boolean  updateviewer = Standard_True 
)
void AIS_InteractiveContext::SetColor ( const Handle< AIS_InteractiveObject > &  aniobj,
const Quantity_Color aColor,
const Standard_Boolean  updateviewer = Standard_True 
)

Sets the color of the selected entity. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::setContextToObject ( const Handle< AIS_InteractiveObject > &  theObj)
inlineprotected

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

void AIS_InteractiveContext::SetCurrentFacingModel ( const 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.

void AIS_InteractiveContext::SetCurrentObject ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Boolean  updateviewer = Standard_True 
)

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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::SetDeviationAngle ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Real  anAngle,
const Standard_Boolean  updateviewer = Standard_True 
)
void AIS_InteractiveContext::SetDeviationAngle ( const Standard_Real  anAngle)

default 12 degrees

void AIS_InteractiveContext::SetDeviationCoefficient ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Real  aCoefficient,
const Standard_Boolean  updateviewer = Standard_True 
)

Sets the deviation coefficient aCoefficient. 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 aCoefficient 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. default 0.001.

void AIS_InteractiveContext::SetDeviationCoefficient ( const Standard_Real  aCoefficient)

Sets the deviation coefficient aCoefficient. 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 aCoefficient 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. default 0.001.

void AIS_InteractiveContext::SetDisplayMode ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Integer  aMode,
const Standard_Boolean  updateviewer = Standard_True 
)

Sets the display mode of seen Interactive Objects. aMode provides the display mode index of the entity aniobj. If updateviewer equals Standard_True, the predominant mode aMode will overule the context mode. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object returns to the default selection mode; the object is displayed but no viewer will be updated. Note that display mode 3 is only used if you have an AIS_Textured Shape.

void AIS_InteractiveContext::SetDisplayMode ( const Standard_Integer  AMode,
const Standard_Boolean  updateviewer = Standard_True 
)

Sets the display mode of seen Interactive Objects. aMode provides the display mode index of the entity aniobj. If updateviewer equals Standard_True, the predominant mode aMode will overule the context mode. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object returns to the default selection mode; the object is displayed but no viewer will be updated. Note that display mode 3 is only used if you have an AIS_Textured Shape.

void AIS_InteractiveContext::SetDisplayPriority ( const Handle< AIS_InteractiveObject > &  anIobj,
const Standard_Integer  aPriority 
)

Sets the display priority aPriority of the seen parts presentation of the entity anIobj.

void AIS_InteractiveContext::SetHiddenLineAspect ( const Handle< Prs3d_LineAspect > &  anAspect) const

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

void AIS_InteractiveContext::SetHighlightStyle ( const Handle< Graphic3d_HighlightStyle > &  theStyle)
inline

Setup the style of dynamic highlighting.

void AIS_InteractiveContext::SetHLRAngle ( const Standard_Real  anAngle)

Sets the HLR angle anAngle.

void AIS_InteractiveContext::SetHLRAngleAndDeviation ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Real  anAngle,
const Standard_Boolean  updateviewer = Standard_True 
)

Computes a HLRAngle and a HLRDeviationCoefficient by means of the angle anAngle and sets the corresponding methods in the default drawing tool with these values.

void AIS_InteractiveContext::SetHLRAngleAndDeviation ( const Standard_Real  anAngle)

compute with anangle a HLRAngle and a HLRDeviationCoefficient and set them in myHLRAngle and in myHLRDeviationCoefficient of myDefaultDrawer ; anAngle is in radian ; ( 1 deg < angle in deg < 20 deg)

void AIS_InteractiveContext::SetHLRDeviationAngle ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Real  anAngle,
const Standard_Boolean  updateviewer = Standard_True 
)
void AIS_InteractiveContext::SetHLRDeviationCoefficient ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Real  aCoefficient,
const Standard_Boolean  updateviewer = Standard_True 
)

Sets the deviation coefficient aCoefficient for removal of hidden lines created by different viewpoints in different presentations. The Default value is 0.02.

void AIS_InteractiveContext::SetHLRDeviationCoefficient ( const Standard_Real  aCoefficient)

Sets the deviation coefficient aCoefficient for removal of hidden lines created by different viewpoints in different presentations. The Default value is 0.02.

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

Sets the number of U and V isoparameters displayed.

void AIS_InteractiveContext::SetLocalAttributes ( const Handle< AIS_InteractiveObject > &  aniobj,
const Handle< Prs3d_Drawer > &  aDrawer,
const Standard_Boolean  updateviewer = Standard_True 
)

Sets the attributes of the interactive object aniobj by plugging the attribute manager aDrawer into the local context. The graphic attributes of aDrawer such as visualization mode, color, and material, are then used to display aniobj. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::SetLocation ( const Handle< AIS_InteractiveObject > &  aniobj,
const TopLoc_Location aLocation 
)

Puts the location aLocation on the initial graphic representation and the selection for the entity aniobj. In other words, aniobj is visible and selectable at a position other than initial position. Graphic and selection primitives are not recomputed. To clean the view correctly, you must reset the previous location.

void AIS_InteractiveContext::SetMaterial ( const Handle< AIS_InteractiveObject > &  aniobj,
const Graphic3d_NameOfMaterial  aName,
const Standard_Boolean  updateviewer = Standard_True 
)

Provides the type of material setting for the view of the entity aniobj. The range of settings includes: BRASS, BRONZE, GOLD, PEWTER, SILVER, STONE. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::SetOkCurrent ( )

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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::SetPixelTolerance ( const Standard_Integer  aPrecision = 2)

Disables the mechanism of adaptive tolerance calculation in SelectMgr_ViewerSelector and sets the given tolerance for ALL sensitive entities activated. For more information, see SelectMgr_ViewerSelector documentation Warning: When a local context is open the sensitivity is apply on it instead on the main context.

void AIS_InteractiveContext::SetPlaneSize ( const Standard_Real  aSizeX,
const Standard_Real  aSizeY,
const Standard_Boolean  updateviewer = Standard_True 
)

Sets the plane size defined by the length in the X direction XSize and that in the Y direction YSize. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::SetPlaneSize ( const Standard_Real  aSize,
const Standard_Boolean  updateviewer = Standard_True 
)

Sets the plane size aSize. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. May be used if PlaneSize returns true.

void AIS_InteractiveContext::SetPolygonOffsets ( const Handle< AIS_InteractiveObject > &  anObj,
const Standard_Integer  aMode,
const Standard_ShortReal  aFactor = 1.0,
const Standard_ShortReal  aUnits = 0.0,
const Standard_Boolean  updateviewer = Standard_True 
)

Sets up polygon offsets for the given AIS_InteractiveObject. It simply calls anObj->SetPolygonOffsets()

void AIS_InteractiveContext::SetPreselectionColor ( const Quantity_NameOfColor  aCol)

Allows you to set the color used to show preselection. By default, this is Quantity_NOC_GREEN. A preselected entity is one which has been selected as the domain of application of a function such as a fillet.

void AIS_InteractiveContext::SetSelected ( const Handle< SelectMgr_EntityOwner > &  theOwners,
const Standard_Boolean  theToUpdateViewer = Standard_True 
)

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

void AIS_InteractiveContext::SetSelected ( const Handle< AIS_InteractiveObject > &  theObject,
const Standard_Boolean  theToUpdateViewer = Standard_True 
)

Puts the interactive object aniObj in the list of selected objects. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated. Performs selection filters check.

void AIS_InteractiveContext::SetSelectedAspect ( const Handle< Prs3d_BasicAspect > &  anAspect,
const Standard_Boolean  globalChange = Standard_True,
const Standard_Boolean  updateViewer = Standard_True 
)

Sets the graphic basic aspect to the current presentation of ALL selected objects. Flag globalChange has no effect (left to simplify porting). Updates the viewer when <updateViewer> is TRUE.

void AIS_InteractiveContext::SetSelectionSensitivity ( const Handle< AIS_InteractiveObject > &  theObject,
const Standard_Integer  theMode,
const Standard_Integer  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.

void AIS_InteractiveContext::SetSelectionStyle ( const Handle< Graphic3d_HighlightStyle > &  theStyle)
inline

Setup the style of selection highlighting.

void AIS_InteractiveContext::SetShapeDecomposition ( const Handle< AIS_InteractiveObject > &  anIobj,
const Standard_Boolean  aStatus 
)

to be Used only with opened local context and if <anIobj> is of type shape... if <aStatus> = True <anIobj> will be sensitive to shape selection modes activation. = False, <anIobj> will not be senstive any more.

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.

void AIS_InteractiveContext::SetTemporaryAttributes ( const Handle< AIS_InteractiveObject > &  anObj,
const Handle< Prs3d_Drawer > &  aDrawer,
const Standard_Boolean  updateviewer = Standard_True 
)

Sets the temporary graphic attributes of the entity anObj. These are provided by the attribute manager aDrawer and are valid for a particular local context only. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::SetToHilightSelected ( const Standard_Boolean  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.

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

Sets transform persistence.

void AIS_InteractiveContext::SetTransparency ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Real  aValue = 0.6,
const Standard_Boolean  updateviewer = Standard_True 
)

Provides the transparency settings for viewing the entity aniobj. The transparency value aValue may be between 0.0, opaque, and 1.0, fully transparent. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::SetTrihedronSize ( const Standard_Real  aSize,
const Standard_Boolean  updateviewer = Standard_True 
)

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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::SetViewAffinity ( const Handle< AIS_InteractiveObject > &  theIObj,
const Handle< V3d_View > &  theView,
const Standard_Boolean  theIsVisible 
)

setup object visibility in specified view, has no effect if object is not disaplyed in this context.

virtual void AIS_InteractiveContext::SetWidth ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Real  aValue,
const Standard_Boolean  updateviewer = Standard_True 
)
virtual

Sets the width of the entity aniobj. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::SetZDetection ( const Standard_Boolean  aStatus = Standard_False)

Enables/Disables the Z detection. If TRUE the detection echo can be partially hidden by the detected object.

void AIS_InteractiveContext::SetZLayer ( const Handle< AIS_InteractiveObject > &  theIObj,
const Standard_Integer  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.

AIS_StatusOfPick AIS_InteractiveContext::ShiftSelect ( const Standard_Boolean  updateviewer = Standard_True)

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_StatusOfPick AIS_InteractiveContext::ShiftSelect ( const TColgp_Array1OfPnt2d Polyline,
const Handle< V3d_View > &  aView,
const Standard_Boolean  updateviewer = Standard_True 
)

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_StatusOfPick AIS_InteractiveContext::ShiftSelect ( const Standard_Integer  XPMin,
const Standard_Integer  YPMin,
const Standard_Integer  XPMax,
const Standard_Integer  YPMax,
const Handle< V3d_View > &  aView,
const Standard_Boolean  updateviewer = Standard_True 
)

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

AIS_InteractiveContext::Standard_DEPRECATED ( "Deprecated method Hilight()"  ) const

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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

AIS_InteractiveContext::Standard_DEPRECATED ( "This method is deprecated - SetTransformPersistence() taking Graphic3d_TransformPers should be called instead"  ) const
void AIS_InteractiveContext::Status ( const Handle< AIS_InteractiveObject > &  anObj,
TCollection_ExtendedString astatus 
) const

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

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 returns the color of such highlighting. By default, it is Quantity_NOC_GRAY40.

void AIS_InteractiveContext::SubIntensityOff ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Boolean  updateviewer = Standard_True 
)

Removes the subintensity option for the entity aniobj. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::SubIntensityOff ( const Standard_Boolean  updateviewer = Standard_True)

removes subintensity option for all objects.

void AIS_InteractiveContext::SubIntensityOn ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Boolean  updateviewer = Standard_True 
)

Highlights, and removes highlights from, the displayed object aniobj 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 and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::SubIntensityOn ( const Standard_Boolean  updateviewer = Standard_True)

hilights/unhilights displayed objects which are displayed at neutral state with subintensity color; available only for active local context. No effect if no local context.

Standard_Boolean AIS_InteractiveContext::ToHilightSelected ( ) const

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

Standard_Real AIS_InteractiveContext::TrihedronSize ( ) const

returns the current value of trihedron size.

void AIS_InteractiveContext::turnOnSubintensity ( const Handle< AIS_InteractiveObject > &  theObject = NULL,
const Standard_Integer  theDispMode = -1,
const Standard_Boolean  theIsDisplayedOnly = Standard_True 
) const
protected

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

Parameters
theObject[in] the object. If NULL is given, than sub-intensity will be turned on for all inveractive objects of the context
theDispMode[in] display mode. If -1 is given, sub-intensity will be turned on for all display modes in global status's list of modes
theIsDisplayedOnly[in] is true if sub-intensity should be applied only to objects with status AIS_DS_Displayed
void AIS_InteractiveContext::unhighlightGlobal ( const Handle< AIS_InteractiveObject > &  theObj,
const Standard_Integer  theMode 
) const
protected

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

void AIS_InteractiveContext::unhighlightOwners ( const Handle< AIS_InteractiveObject > &  theObject)
protected

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

void AIS_InteractiveContext::unhighlightSelected ( const Standard_Boolean  theIsToHilightSubIntensity = Standard_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.

void AIS_InteractiveContext::Unhilight ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Boolean  updateviewer = Standard_True 
)

Removes hilighting from the entity aniobj. Updates the viewer. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::UnhilightCurrents ( const Standard_Boolean  updateviewer = Standard_True)

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. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::UnhilightSelected ( const Standard_Boolean  theToUpdateViewer = Standard_True)

Removes highlighting from selected objects. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::UnsetColor ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Boolean  updateviewer = Standard_True 
)

Removes the color selection for the selected entity. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::UnsetDisplayMode ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Boolean  updateviewer = Standard_True 
)

Unsets the display mode of seen Interactive Objects. aMode provides the display mode index of the entity aniobj. If updateviewer equals Standard_True, the predominant mode aMode will overule the context mode. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object returns to the default selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::UnsetLocalAttributes ( const Handle< AIS_InteractiveObject > &  anObj,
const Standard_Boolean  updateviewer = Standard_True 
)

Removes the settings for local attributes of the entity anObj and returns to the Neutral Point attributes or those of the previous local context. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::UnsetMaterial ( const Handle< AIS_InteractiveObject > &  anObj,
const Standard_Boolean  updateviewer = Standard_True 
)

Removes the type of material setting for viewing the entity aniobj. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::UnsetTransparency ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Boolean  updateviewer = Standard_True 
)

Removes the transparency settings for viewing the entity aniobj. The transparency value aValue may be between 0.0, opaque, and 1.0, fully transparent. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

virtual void AIS_InteractiveContext::UnsetWidth ( const Handle< AIS_InteractiveObject > &  aniobj,
const Standard_Boolean  updateviewer = Standard_True 
)
virtual

Removes the width setting of the entity aniobj. If a local context is open and if updateviewer equals Standard_False, the presentation of the Interactive Object activates the selection mode; the object is displayed but no viewer will be updated.

void AIS_InteractiveContext::Update ( const Handle< AIS_InteractiveObject > &  theIObj,
const Standard_Boolean  theUpdateViewer = Standard_True 
)

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.

void AIS_InteractiveContext::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.

void AIS_InteractiveContext::UpdateSelected ( const Standard_Boolean  theToUpdateViewer = Standard_True)

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

void AIS_InteractiveContext::UseDisplayedObjects ( )

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

Standard_Boolean AIS_InteractiveContext::WasCurrentTouched ( ) const

Returns the current selection touched by the cursor. Objects selected when there is no open local context are called current objects; those selected in open local context, selected objects.

virtual Standard_Real AIS_InteractiveContext::Width ( const Handle< AIS_InteractiveObject > &  aniobj) const
virtual

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

Standard_Boolean AIS_InteractiveContext::ZDetection ( ) const

Retrieves the Z detection state.

Field Documentation

Handle< SelectMgr_SelectionManager > AIS_InteractiveContext::mgrSelector
protected

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

Standard_Integer AIS_InteractiveContext::myCurDetected
protected

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

Standard_Integer AIS_InteractiveContext::myCurHighlighted
protected

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

Standard_Integer AIS_InteractiveContext::myCurLocalIndex
protected

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

Standard_Boolean AIS_InteractiveContext::myCurrentTouched
protected

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

Quantity_NameOfColor AIS_InteractiveContext::myDefaultColor
protected

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

Handle< Prs3d_Drawer > AIS_InteractiveContext::myDefaultDrawer
protected

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

TColStd_SequenceOfInteger AIS_InteractiveContext::myDetectedSeq
protected

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

Standard_Integer AIS_InteractiveContext::myDisplayMode
protected

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

Handle< SelectMgr_OrFilter > AIS_InteractiveContext::myFilters
protected

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

Handle< Graphic3d_HighlightStyle > AIS_InteractiveContext::myHiStyle
protected

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

Standard_Boolean AIS_InteractiveContext::myIsAutoActivateSelMode
protected

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

Handle< SelectMgr_EntityOwner > AIS_InteractiveContext::myLastinMain
protected

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

Handle< V3d_View > AIS_InteractiveContext::mylastmoveview
protected

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

Handle< SelectMgr_EntityOwner > AIS_InteractiveContext::myLastPicked
protected

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

AIS_DataMapOfILC AIS_InteractiveContext::myLocalContexts
protected

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

Handle< PrsMgr_PresentationManager3d > AIS_InteractiveContext::myMainPM
protected

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

Handle< StdSelect_ViewerSelector3d > AIS_InteractiveContext::myMainSel
protected

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

Handle< V3d_Viewer > AIS_InteractiveContext::myMainVwr
protected

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

AIS_DataMapOfIOStatus AIS_InteractiveContext::myObjects
protected

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

Quantity_NameOfColor AIS_InteractiveContext::myPreselectionColor
protected

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

Standard_Boolean AIS_InteractiveContext::mySelectedTouched
protected

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

Handle< AIS_Selection > AIS_InteractiveContext::mySelection
protected

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

Handle< Graphic3d_HighlightStyle > AIS_InteractiveContext::mySelStyle
protected

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

Handle< Graphic3d_HighlightStyle > AIS_InteractiveContext::mySubintStyle
protected

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

Standard_Boolean AIS_InteractiveContext::myToHilightSelected
protected

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

Standard_Boolean AIS_InteractiveContext::myWasLastMain
protected

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

Standard_Boolean AIS_InteractiveContext::myZDetectionFlag
protected

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

const Graphic3d_TransModeFlags& AIS_InteractiveContext::theFlag
const Standard_Boolean AIS_InteractiveContext::theIsToUpdateViewer
Initial value:
{
return HilightWithColor (theObj, mySelStyle, theIsToUpdateViewer);
}
1 void HilightWithColor (const Handle< AIS_InteractiveObject >& theObj,
const Handle< Graphic3d_HighlightStyle >& theStyle,
const Standard_Boolean theIsToUpdate = Standard_True)
const Graphic3d_TransModeFlags const gp_Pnt& AIS_InteractiveContext::thePoint
Initial value:
= gp_Pnt (0.0, 0.0, 0.0))
{
}
1 void UpdateCurrentViewer()

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