]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketcherPrs/SketcherPrs_Perpendicular.h
Salome HOME
Perpendicular constraint presentation created
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Perpendicular.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        SketcherPrs_Perpendicular.h
4 // Created:     12 March 2015
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef SketcherPrs_Perpendicular_H
8 #define SketcherPrs_Perpendicular_H
9
10 #include "SketcherPrs_SymbolPrs.h"
11
12 class SketchPlugin_Sketch;
13
14
15 DEFINE_STANDARD_HANDLE(SketcherPrs_Perpendicular, SketcherPrs_SymbolPrs)
16
17 /**
18 * \ingroup GUI
19 * A redefinition of standard AIS Interactive Object in order to provide  
20 * presentation of perpendicular constraint
21 */
22 class SketcherPrs_Perpendicular: public SketcherPrs_SymbolPrs
23 {
24 public:
25   /// Constructor
26   /// \param theConstraint a constraint feature
27   /// \param thePlane a coordinate plane of current sketch
28   Standard_EXPORT SketcherPrs_Perpendicular(SketchPlugin_Constraint* theConstraint, 
29                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
30
31   //! Method which draws selected owners ( for fast presentation draw )
32   Standard_EXPORT virtual void HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM, 
33                                                const SelectMgr_SequenceOfOwner& theOwners);
34   
35   //! Method which hilight an owner belonging to
36   //! this selectable object  ( for fast presentation draw )
37   Standard_EXPORT virtual void HilightOwnerWithColor(const Handle(PrsMgr_PresentationManager3d)& thePM, 
38                                                      const Quantity_NameOfColor theColor, const Handle(SelectMgr_EntityOwner)& theOwner);
39
40
41   DEFINE_STANDARD_RTTI(SketcherPrs_Perpendicular)
42 protected:
43   /// Redefinition of virtual function
44   Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
45     const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0);
46
47   /// Redefinition of virtual function
48   Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
49     const Standard_Integer aMode) ;
50
51   virtual const char* iconName() const { return "perpendicular.png"; }
52
53 private:
54
55   void drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const;
56
57   Handle(Graphic3d_ArrayOfPoints) myPntArray;
58 };
59
60 #endif