Salome HOME
Define rigid constraint symbol
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Rigid.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        SketcherPrs_Rigid.h
4 // Created:     16 February 2015
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef SketcherPrs_Rigid_H
8 #define SketcherPrs_Rigid_H
9
10 #include "SketcherPrs_SymbolPrs.h"
11
12 class SketchPlugin_Constraint;
13 class SketchPlugin_Sketch;
14
15
16 DEFINE_STANDARD_HANDLE(SketcherPrs_Rigid, 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_Rigid: 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_Rigid(SketchPlugin_Constraint* theConstraint, 
30                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
31
32   DEFINE_STANDARD_RTTI(SketcherPrs_Rigid)
33 protected:
34   /// Redefinition of virtual function
35   Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
36     const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0);
37
38   virtual const char* iconName() const { return "anchor.png"; }
39
40   /// Redefine this function in order to add additiona lines of constraint base
41   /// \param thePrs a presentation
42   /// \param theColor a color of additiona lines
43   virtual void drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const;
44 };
45
46 #endif