Open CASCADE Technology 6.6.0
Public Member Functions | Protected Member Functions | Protected Attributes
SelectMgr_SelectableObject Class Reference

A framework to supply the structure of the object to be
selected. At the first pick, this structure is created by
calling the appropriate algorithm and retaining this
framework for further picking.
This abstract framework is inherited in Application
Interactive Services (AIS), notably in AIS_InteractiveObject.
Consequently, 3D selection should be handled by the
relevant daughter classes and their member functions
in AIS. This is particularly true in the creation of new interactive objects.

#include <SelectMgr_SelectableObject.hxx>

Inheritance diagram for SelectMgr_SelectableObject:
Inheritance graph
[legend]

Public Member Functions

virtual Standard_Integer NbPossibleSelection () const
 defines the number of different modes of selection
(or decomposition) for an Object.

void UpdateSelection ()
 re-computes the sensitive primitives for all modes

void UpdateSelection (const Standard_Integer aMode)
 re-computes the sensitive primitives which correspond to
the <amode>th selection mode.

void AddSelection (const Handle< SelectMgr_Selection > &aSelection, const Standard_Integer aMode)
 Adds the selection aSelection with the selection mode
index aMode to this framework.

void ClearSelections (const Standard_Boolean update=Standard_False)
 Empties all the selections in the SelectableObject
<update> parameter defines whether all object's
selections should be flagged for further update or not.
This improved method can be used to recompute an
object's selection (without redisplaying the object
completely) when some selection mode is activated not for the first time.

const Handle_SelectMgr_Selection & Selection (const Standard_Integer aMode) const
 Returns the selection Selection having the selection mode aMode.

Standard_Boolean HasSelection (const Standard_Integer aMode) const
 Returns true if a selection corresponding to the
selection mode aMode is present in this framework.

void Init ()
 Begins the iteration scanning for sensitive primitives.

Standard_Boolean More () const
 Continues the iteration scanning for sensitive primitives.

void Next ()
 Continues the iteration scanning for sensitive primitives.

const Handle_SelectMgr_Selection & CurrentSelection () const
 Returns the current selection in this framework.

void ResetLocation ()
virtual void UpdateLocation ()
 Recomputes the location of the selection aSelection.

virtual void HilightSelected (const Handle< PrsMgr_PresentationManager3d > &PM, const SelectMgr_SequenceOfOwner &Seq)
 Method which draws selected owners ( for fast presentation draw )

virtual void ClearSelected ()
 Method which clear all selected owners belonging
to this selectable object ( for fast presentation draw )

virtual void HilightOwnerWithColor (const Handle< PrsMgr_PresentationManager3d > &thePM, const Quantity_NameOfColor theColor, const Handle< SelectMgr_EntityOwner > &theOwner)
 Method which hilight an owner belonging to
this selectable object ( for fast presentation draw )

virtual Standard_Boolean IsAutoHilight () const
 If returns True, the old mechanism for highlighting
selected objects is used (HilightSelected Method may be empty).
If returns False, the HilightSelected method will be
fully responsible for highlighting selected entity
owners belonging to this selectable object.

virtual void SetAutoHilight (const Standard_Boolean newAutoHilight)
 Set AutoHilight property to true or false
//! Sets up Transform Persistence Mode for this object

Handle_Prs3d_Presentation GetHilightPresentation (const Handle< PrsMgr_PresentationManager3d > &TheMgr)
Handle_Prs3d_Presentation GetSelectPresentation (const Handle< PrsMgr_PresentationManager3d > &TheMgr)
virtual void SetZLayer (const Handle< PrsMgr_PresentationManager > &thePrsMgr, const Standard_Integer theLayerId)
 Set Z layer ID and update all presentations of
the selectable object. The layer can be set only for displayed object.
If all object presentations are removed, the layer ID will be set to
default value when computing presentation. The layers mechanism allows
drawing objects in higher layers in overlay of objects in lower layers.

Protected Member Functions

 SelectMgr_SelectableObject (const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d=PrsMgr_TOP_AllView)
virtual void UpdateLocation (const Handle< SelectMgr_Selection > &aSelection)
 Updates locations in all sensitive entities from <aSelection>
and in corresponding entity owners.

Protected Attributes

SelectMgr_SequenceOfSelection myselections

Constructor & Destructor Documentation

SelectMgr_SelectableObject::SelectMgr_SelectableObject ( const PrsMgr_TypeOfPresentation3d  aTypeOfPresentation3d = PrsMgr_TOP_AllView) [protected]

Member Function Documentation

void SelectMgr_SelectableObject::AddSelection ( const Handle< SelectMgr_Selection > &  aSelection,
const Standard_Integer  aMode 
)
virtual void SelectMgr_SelectableObject::ClearSelected ( ) [virtual]

Reimplemented in MeshVS_Mesh.

void SelectMgr_SelectableObject::ClearSelections ( const Standard_Boolean  update = Standard_False)
const Handle_SelectMgr_Selection& SelectMgr_SelectableObject::CurrentSelection ( ) const
Handle_Prs3d_Presentation SelectMgr_SelectableObject::GetHilightPresentation ( const Handle< PrsMgr_PresentationManager3d > &  TheMgr)
Handle_Prs3d_Presentation SelectMgr_SelectableObject::GetSelectPresentation ( const Handle< PrsMgr_PresentationManager3d > &  TheMgr)
Standard_Boolean SelectMgr_SelectableObject::HasSelection ( const Standard_Integer  aMode) const
virtual void SelectMgr_SelectableObject::HilightOwnerWithColor ( const Handle< PrsMgr_PresentationManager3d > &  thePM,
const Quantity_NameOfColor  theColor,
const Handle< SelectMgr_EntityOwner > &  theOwner 
) [virtual]

Reimplemented in MeshVS_Mesh.

virtual void SelectMgr_SelectableObject::HilightSelected ( const Handle< PrsMgr_PresentationManager3d > &  PM,
const SelectMgr_SequenceOfOwner Seq 
) [virtual]

Reimplemented in MeshVS_Mesh.

void SelectMgr_SelectableObject::Init ( )
virtual Standard_Boolean SelectMgr_SelectableObject::IsAutoHilight ( ) const [virtual]
Standard_Boolean SelectMgr_SelectableObject::More ( ) const
virtual Standard_Integer SelectMgr_SelectableObject::NbPossibleSelection ( ) const [virtual]

Reimplemented in QABugs_MyText.

void SelectMgr_SelectableObject::Next ( )
void SelectMgr_SelectableObject::ResetLocation ( ) [virtual]

Reimplemented from PrsMgr_PresentableObject.

const Handle_SelectMgr_Selection& SelectMgr_SelectableObject::Selection ( const Standard_Integer  aMode) const
virtual void SelectMgr_SelectableObject::SetAutoHilight ( const Standard_Boolean  newAutoHilight) [virtual]
virtual void SelectMgr_SelectableObject::SetZLayer ( const Handle< PrsMgr_PresentationManager > &  thePrsMgr,
const Standard_Integer  theLayerId 
) [virtual]

Reimplemented from PrsMgr_PresentableObject.

virtual void SelectMgr_SelectableObject::UpdateLocation ( ) [virtual]

Reimplemented from PrsMgr_PresentableObject.

Reimplemented in AIS_ConnectedInteractive.

virtual void SelectMgr_SelectableObject::UpdateLocation ( const Handle< SelectMgr_Selection > &  aSelection) [protected, virtual]

Reimplemented in AIS_ConnectedInteractive.

void SelectMgr_SelectableObject::UpdateSelection ( )
void SelectMgr_SelectableObject::UpdateSelection ( const Standard_Integer  aMode)

Field Documentation


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines