Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom.git into Dev_1.1.0
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Parallel.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        SketcherPrs_Parallel.h
4 // Created:     16 February 2015
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef SketcherPrs_Parallel_H
8 #define SketcherPrs_Parallel_H
9
10 #include "SketcherPrs_SymbolPrs.h"
11
12 class SketchPlugin_Constraint;
13 class SketchPlugin_Sketch;
14
15
16 DEFINE_STANDARD_HANDLE(SketcherPrs_Parallel, SketcherPrs_SymbolPrs)
17
18 /**
19 * \ingroup GUI
20 * A redefinition of standard AIS Interactive Object in order to provide  
21 * presentation of parallel constraint
22 */
23 class SketcherPrs_Parallel: public SketcherPrs_SymbolPrs
24 {
25 public:
26   /// Constructor
27   /// \param theConstraint a constraint feature
28   /// \param thePlane a coordinate plane of current sketch
29   Standard_EXPORT SketcherPrs_Parallel(SketchPlugin_Constraint* theConstraint, 
30                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
31
32   //! Method which draws selected owners ( for fast presentation draw )
33   Standard_EXPORT virtual void HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM, 
34                                                const SelectMgr_SequenceOfOwner& theOwners);
35   
36   //! Method which hilight an owner belonging to
37   //! this selectable object  ( for fast presentation draw )
38   Standard_EXPORT virtual void HilightOwnerWithColor(const Handle(PrsMgr_PresentationManager3d)& thePM, 
39                                                      const Quantity_NameOfColor theColor, const Handle(SelectMgr_EntityOwner)& theOwner);
40
41   DEFINE_STANDARD_RTTI(SketcherPrs_Parallel)
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 "parallel.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