Salome HOME
Parallel constraint presentation created.
[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 <GeomAPI_Ax3.h>
11 #include <GeomAPI_Edge.h>
12
13 #include <AIS_InteractiveObject.hxx>
14 #include <Graphic3d_ArrayOfPoints.hxx>
15 #include <Graphic3d_AspectMarker3d.hxx>
16 #include <Standard_DefineHandle.hxx>
17
18 class SketchPlugin_Constraint;
19 class SketchPlugin_Sketch;
20
21
22 DEFINE_STANDARD_HANDLE(SketcherPrs_Parallel, AIS_InteractiveObject)
23
24 /**
25 * \ingroup GUI
26 * A redefinition of standard AIS Interactive Object in order to provide  
27 * presentation of coincident constraint
28 */
29 class SketcherPrs_Parallel: public AIS_InteractiveObject
30 {
31 public:
32   /// Constructor
33   /// \param theResult a result object
34   Standard_EXPORT SketcherPrs_Parallel(SketchPlugin_Constraint* theConstraint, 
35                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
36
37   //! Method which draws selected owners ( for fast presentation draw )
38   Standard_EXPORT virtual void HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM, 
39                                                const SelectMgr_SequenceOfOwner& theOwners);
40   
41   //! Method which hilight an owner belonging to
42   //! this selectable object  ( for fast presentation draw )
43   Standard_EXPORT virtual void HilightOwnerWithColor(const Handle(PrsMgr_PresentationManager3d)& thePM, 
44                                                      const Quantity_NameOfColor theColor, const Handle(SelectMgr_EntityOwner)& theOwner);
45
46   //! Method which clear all selected owners belonging
47   //! to this selectable object ( for fast presentation draw )
48   Standard_EXPORT virtual void ClearSelected();
49
50   DEFINE_STANDARD_RTTI(SketcherPrs_Parallel)
51 protected:
52   /// Redefinition of virtual function
53   Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
54     const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0);
55
56   /// Redefinition of virtual function
57   Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
58     const Standard_Integer aMode) ;
59
60 private:
61
62   void drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const;
63
64   SketchPlugin_Constraint* myConstraint;
65   std::shared_ptr<GeomAPI_Ax3> myPlane;
66   Handle(Graphic3d_AspectMarker3d) myAspect;
67   Handle(Graphic3d_ArrayOfPoints) myPntArray;
68 };
69
70 #endif