/usr/include/oce/SelectMgr_SelectableObject.hxx is in liboce-visualization-dev 0.18.2-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | // This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _SelectMgr_SelectableObject_HeaderFile
#define _SelectMgr_SelectableObject_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineHandle.hxx>
#include <Handle_SelectMgr_SelectableObject.hxx>
#include <SelectMgr_SequenceOfSelection.hxx>
#include <Prs3d_Drawer.hxx>
#include <Handle_SelectMgr_EntityOwner.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <Handle_Prs3d_Presentation.hxx>
#include <PrsMgr_PresentableObject.hxx>
#include <PrsMgr_TypeOfPresentation3d.hxx>
#include <SelectMgr_Selection.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <Quantity_NameOfColor.hxx>
#include <Graphic3d_ZLayerId.hxx>
#include <SelectMgr_IndexedMapOfOwner.hxx>
class SelectMgr_EntityOwner;
class Prs3d_Presentation;
class Standard_NotImplemented;
class SelectMgr_SelectionManager;
class SelectMgr_SequenceOfOwner;
class Bnd_Box;
//! 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.
class SelectMgr_SelectableObject : public PrsMgr_PresentableObject
{
public:
//! 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.
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) = 0;
//! Re-computes the sensitive primitives for all modes. IMPORTANT: Do not use
//! this method to update selection primitives except implementing custom selection manager!
//! This method does not take into account necessary BVH updates, but may invalidate the pointers
//! it refers to. TO UPDATE SELECTION properly from outside classes, use method UpdateSelection.
Standard_EXPORT void RecomputePrimitives() ;
//! Re-computes the sensitive primitives which correspond to the <theMode>th selection mode.
//! IMPORTANT: Do not use this method to update selection primitives except implementing custom selection manager!
//! selection manager! This method does not take into account necessary BVH updates, but may invalidate
//! the pointers it refers to. TO UPDATE SELECTION properly from outside classes, use method UpdateSelection.
Standard_EXPORT void RecomputePrimitives (const Standard_Integer theMode) ;
//! Adds the selection aSelection with the selection mode
//! index aMode to this framework.
Standard_EXPORT void AddSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) ;
//! 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 void ClearSelections (const Standard_Boolean update = Standard_False) ;
//! Returns the selection Selection having the selection mode aMode.
Standard_EXPORT const Handle(SelectMgr_Selection)& Selection (const Standard_Integer aMode) const;
//! Returns true if a selection corresponding to the
//! selection mode aMode is present in this framework.
Standard_EXPORT Standard_Boolean HasSelection (const Standard_Integer aMode) const;
//! Begins the iteration scanning for sensitive primitives.
void Init() ;
//! Continues the iteration scanning for sensitive primitives.
Standard_Boolean More() const;
//! Continues the iteration scanning for sensitive primitives.
void Next() ;
//! Returns the current selection in this framework.
const Handle(SelectMgr_Selection)& CurrentSelection() const;
Standard_EXPORT void ResetTransformation() ;
//! Recomputes the location of the selection aSelection.
Standard_EXPORT virtual void UpdateTransformation() ;
//! Updates locations in all sensitive entities from <aSelection>
//! and in corresponding entity owners.
Standard_EXPORT virtual void UpdateTransformations (const Handle(SelectMgr_Selection)& aSelection) ;
//! Method which draws selected owners ( for fast presentation draw )
Standard_EXPORT virtual void HilightSelected (const Handle(PrsMgr_PresentationManager3d)& PM, const SelectMgr_SequenceOfOwner& Seq) ;
//! Method which clear all selected owners belonging
//! to this selectable object ( for fast presentation draw )
Standard_EXPORT virtual void ClearSelected() ;
//! Method which hilight an owner belonging to
//! this selectable object ( for fast presentation draw )
Standard_EXPORT virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM, const Quantity_NameOfColor theColor, const Handle(SelectMgr_EntityOwner)& theOwner) ;
//! 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.
Standard_EXPORT virtual Standard_Boolean IsAutoHilight() const;
//! Set AutoHilight property to true or false
//! Sets up Transform Persistence Mode for this object
Standard_EXPORT virtual void SetAutoHilight (const Standard_Boolean newAutoHilight) ;
Standard_EXPORT Handle(Prs3d_Presentation) GetHilightPresentation (const Handle(PrsMgr_PresentationManager3d)& TheMgr) ;
Standard_EXPORT Handle(Prs3d_Presentation) GetSelectPresentation (const Handle(PrsMgr_PresentationManager3d)& TheMgr) ;
//! Set Z layer ID and update all presentations of the selectable object.
//! The layers mechanism allows drawing objects in higher layers in overlay of objects in lower layers.
Standard_EXPORT virtual void SetZLayer (const Graphic3d_ZLayerId theLayerId) ;
//! Sets update status FULL to selections of the object. Must be used as the only method of UpdateSelection
//! from outer classes to prevent BVH structures from being outdated.
Standard_EXPORT void UpdateSelection (const Standard_Integer theMode = -1) ;
//! Returns bounding box of selectable object
//! by storing its minimum and maximum 3d coordinates
//! to output parameters
Standard_EXPORT virtual void BoundingBox (Bnd_Box& theBndBox) = 0;
//! Initializes the drawing tool theDrawer.
Standard_EXPORT virtual void SetAttributes (const Handle(Prs3d_Drawer)& theDrawer) ;
//! Returns the attributes settings.
const Handle(Prs3d_Drawer)& Attributes() const;
//! Clears settings provided by the drawing tool theDrawer.
Standard_EXPORT virtual void UnsetAttributes() ;
//! Initializes the hilight drawing tool theDrawer.
Standard_EXPORT virtual void SetHilightAttributes (const Handle(Prs3d_Drawer)& theDrawer) ;
//! Returns the hilight attributes settings.
const Handle(Prs3d_Drawer)& HilightAttributes() const;
//! Clears settings provided by the hilight drawing tool theDrawer.
Standard_EXPORT virtual void UnsetHilightAttributes() ;
//! Initializes theDrawer by default hilight settings.
Standard_EXPORT static void InitDefaultHilightAttributes (const Handle(Prs3d_Drawer)& theDrawer) ;
//! Sets common entity owner for assembly sensitive object entities
Standard_EXPORT void SetAssemblyOwner (const Handle(SelectMgr_EntityOwner)& theOwner, const Standard_Integer theMode = -1) ;
//! Returns common entity owner if the object is an assembly
Standard_EXPORT const Handle(SelectMgr_EntityOwner)& GetAssemblyOwner() const;
//! Returns a bounding box of sensitive entities with the owners given
//! if they are a part of activated selection
Standard_EXPORT Bnd_Box BndBoxOfSelected (Handle(SelectMgr_IndexedMapOfOwner)& theOwners) ;
friend class SelectMgr_SelectionManager;
DEFINE_STANDARD_RTTI(SelectMgr_SelectableObject)
protected:
Standard_EXPORT SelectMgr_SelectableObject(const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d = PrsMgr_TOP_AllView);
SelectMgr_SequenceOfSelection myselections;
Handle(Prs3d_Drawer) myDrawer;
Handle(Prs3d_Drawer) myHilightDrawer;
Handle(SelectMgr_EntityOwner) myAssemblyOwner;
private:
Standard_Integer mycurrent;
Standard_Boolean myAutoHilight;
Handle(Prs3d_Presentation) mySelectionPrs;
Handle(Prs3d_Presentation) myHilightPrs;
};
#include <SelectMgr_SelectableObject.lxx>
#endif // _SelectMgr_SelectableObject_HeaderFile
|