OCC Main Page | Visualization | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

Visualization
TKV3d
SelectMgr


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_EXPORT Standard_Integer NbPossibleSelection () const
 defines the number of different modes of selection
(or decomposition) for an Object.

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

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

Standard_EXPORT void AddSelection (const Handle(SelectMgr_Selection)&aSelection, const Standard_Integer aMode)
 Adds the selection aSelection with the selection mode
index aMode to this framework.
.
Standard_EXPORT 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.
.
Standard_EXPORT const Handle_SelectMgr_Selection & Selection (const Standard_Integer aMode) const
 Returns the selection Selection having the selection mode aMode.
.
Standard_EXPORT 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.
.
Standard_EXPORT void ResetLocation ()
virtual Standard_EXPORT void UpdateLocation ()
 Recomputes the location of the selection aSelection.
.
virtual Standard_EXPORT void HilightSelected (const Handle(PrsMgr_PresentationManager3d)&PM, const SelectMgr_SequenceOfOwner &Seq)
 Method which draws selected owners ( for fast presentation draw )
.
virtual Standard_EXPORT void ClearSelected ()
 Method which clear all selected owners belonging
to this selectable object ( for fast presentation draw )
.
virtual Standard_EXPORT 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_EXPORT 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 Standard_EXPORT void SetAutoHilight (const Standard_Boolean newAutoHilight)
 Set AutoHilight property to true or false
//! Sets up Transform Persistence Mode for this object
.
Standard_EXPORT Handle_Prs3d_Presentation GetHilightPresentation (const Handle(PrsMgr_PresentationManager3d)&TheMgr)
Standard_EXPORT Handle_Prs3d_Presentation GetSelectPresentation (const Handle(PrsMgr_PresentationManager3d)&TheMgr)
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Protected Member Functions

Standard_EXPORT SelectMgr_SelectableObject (const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d=PrsMgr_TOP_AllView)
virtual Standard_EXPORT 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

Private Member Functions

virtual Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)&aSelection, const Standard_Integer aMode)=0
 Recovers and calculates any sensitive primitive,
aSelection, available in Shape mode, specified by
aMode. As a rule, these are sensitive faces.
This method is defined as virtual. This enables you to
implement it in the creation of a new class of AIS
Interactive Object. You need to do this and in so
doing, redefine this method, if you create a class
which enriches the list of signatures and types.
.

Private Attributes

Standard_Integer mycurrent
Standard_Boolean myAutoHilight
Handle_Prs3d_Presentation mySelectionPrs
Handle_Prs3d_Presentation myHilightPrs

Constructor & Destructor Documentation

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


Member Function Documentation

Standard_EXPORT void SelectMgr_SelectableObject::AddSelection const Handle(SelectMgr_Selection)&  aSelection,
const Standard_Integer  aMode
 

virtual Standard_EXPORT void SelectMgr_SelectableObject::ClearSelected  )  [virtual]
 

Reimplemented in MeshVS_Mesh.

Standard_EXPORT void SelectMgr_SelectableObject::ClearSelections const Standard_Boolean  update = Standard_False  ) 
 

virtual Standard_EXPORT void SelectMgr_SelectableObject::ComputeSelection const Handle(SelectMgr_Selection)&  aSelection,
const Standard_Integer  aMode
[private, pure virtual]
 

Implemented in AIS_AngleDimension, AIS_Axis, AIS_Chamf2dDimension, AIS_Chamf3dDimension, AIS_Circle, AIS_ConcentricRelation, AIS_ConnectedInteractive, AIS_ConnectedShape, AIS_DiameterDimension, AIS_EqualDistanceRelation, AIS_EqualRadiusRelation, AIS_FixRelation, AIS_IdenticRelation, AIS_LengthDimension, AIS_Line, AIS_MaxRadiusDimension, AIS_MidPointRelation, AIS_MinRadiusDimension, AIS_MultipleConnectedInteractive, AIS_MultipleConnectedShape, AIS_OffsetDimension, AIS_ParallelRelation, AIS_PerpendicularRelation, AIS_Plane, AIS_PlaneTrihedron, AIS_Point, AIS_RadiusDimension, AIS_Shape, AIS_SymmetricRelation, AIS_TangentRelation, AIS_Trihedron, MeshVS_Mesh, and Voxel_Prs.

const Handle_SelectMgr_Selection& SelectMgr_SelectableObject::CurrentSelection  )  const
 

Standard_EXPORT Handle_Prs3d_Presentation SelectMgr_SelectableObject::GetHilightPresentation const Handle(PrsMgr_PresentationManager3d)&  TheMgr  ) 
 

Standard_EXPORT Handle_Prs3d_Presentation SelectMgr_SelectableObject::GetSelectPresentation const Handle(PrsMgr_PresentationManager3d)&  TheMgr  ) 
 

Standard_EXPORT const SelectMgr_SelectableObject::Handle Standard_Type   )  const
 

Reimplemented from PrsMgr_PresentableObject.

Reimplemented in AIS_AngleDimension, AIS_Axis, AIS_Chamf2dDimension, AIS_Chamf3dDimension, AIS_Circle, AIS_ConcentricRelation, AIS_ConnectedInteractive, AIS_ConnectedShape, AIS_DiameterDimension, AIS_EllipseRadiusDimension, AIS_EqualDistanceRelation, AIS_EqualRadiusRelation, AIS_FixRelation, AIS_IdenticRelation, AIS_InteractiveObject, AIS_LengthDimension, AIS_Line, AIS_MaxRadiusDimension, AIS_MidPointRelation, AIS_MinRadiusDimension, AIS_MultipleConnectedInteractive, AIS_MultipleConnectedShape, AIS_OffsetDimension, AIS_ParallelRelation, AIS_PerpendicularRelation, AIS_Plane, AIS_PlaneTrihedron, AIS_Point, AIS_RadiusDimension, AIS_Relation, AIS_Shape, AIS_SymmetricRelation, AIS_TangentRelation, AIS_TexturedShape, AIS_Trihedron, MeshVS_Mesh, and Voxel_Prs.

Standard_EXPORT Standard_Boolean SelectMgr_SelectableObject::HasSelection const Standard_Integer  aMode  )  const
 

virtual Standard_EXPORT void SelectMgr_SelectableObject::HilightOwnerWithColor const Handle(PrsMgr_PresentationManager3d)&  thePM,
const Quantity_NameOfColor  theColor,
const Handle(SelectMgr_EntityOwner)&  theOwner
[virtual]
 

Reimplemented in MeshVS_Mesh.

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

Reimplemented in MeshVS_Mesh.

void SelectMgr_SelectableObject::Init  )  [inline]
 

virtual Standard_EXPORT Standard_Boolean SelectMgr_SelectableObject::IsAutoHilight  )  const [virtual]
 

Standard_Boolean SelectMgr_SelectableObject::More  )  const [inline]
 

virtual Standard_EXPORT Standard_Integer SelectMgr_SelectableObject::NbPossibleSelection  )  const [virtual]
 

void SelectMgr_SelectableObject::Next  )  [inline]
 

Standard_EXPORT void SelectMgr_SelectableObject::ResetLocation  )  [virtual]
 

Reimplemented from PrsMgr_PresentableObject.

Standard_EXPORT const Handle_SelectMgr_Selection& SelectMgr_SelectableObject::Selection const Standard_Integer  aMode  )  const
 

virtual Standard_EXPORT void SelectMgr_SelectableObject::SetAutoHilight const Standard_Boolean  newAutoHilight  )  [virtual]
 

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

Reimplemented in AIS_ConnectedInteractive.

virtual Standard_EXPORT void SelectMgr_SelectableObject::UpdateLocation  )  [virtual]
 

Reimplemented from PrsMgr_PresentableObject.

Reimplemented in AIS_ConnectedInteractive.

Standard_EXPORT void SelectMgr_SelectableObject::UpdateSelection const Standard_Integer  aMode  ) 
 

Standard_EXPORT void SelectMgr_SelectableObject::UpdateSelection  ) 
 


Field Documentation

Standard_Boolean SelectMgr_SelectableObject::myAutoHilight [private]
 

Standard_Integer SelectMgr_SelectableObject::mycurrent [private]
 

Handle_Prs3d_Presentation SelectMgr_SelectableObject::myHilightPrs [private]
 

Handle_Prs3d_Presentation SelectMgr_SelectableObject::mySelectionPrs [private]
 

SelectMgr_SequenceOfSelection SelectMgr_SelectableObject::myselections [protected]
 


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 13:56:16 2008 for OpenCASCADE by  doxygen 1.4.1