Salome HOME
Issue #1860: fix end lines with spaces
[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 #include <ModelAPI_Object.h>
12 #include <ModelAPI_Feature.h>
13
14
15 DEFINE_STANDARD_HANDLE(SketcherPrs_Rigid, SketcherPrs_SymbolPrs)
16
17 /**
18 * \ingroup GUI
19 * A redefinition of standard AIS Interactive Object in order to provide  
20 * presentation of parallel constraint
21 */
22 class SketcherPrs_Rigid: 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_Rigid(ModelAPI_Feature* theConstraint,
29                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
30
31
32   DEFINE_STANDARD_RTTI(SketcherPrs_Rigid)
33
34   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
35   /// \param theConstraint a constraint feature
36   /// \param thePlane a coordinate plane of current sketch
37   /// \return boolean result value
38   static bool IsReadyToDisplay(ModelAPI_Feature* theConstraint,
39                                const std::shared_ptr<GeomAPI_Ax3>& thePlane);
40 protected:
41   virtual const char* iconName() const { return "anchor.png"; }
42
43   /// Redefine this function in order to add additiona lines of constraint base
44   /// \param thePrs a presentation
45   /// \param theColor a color of additiona lines
46   virtual void drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const;
47
48   /// Update myPntArray according to presentation positions
49   /// \return true in case of success
50   virtual bool updateIfReadyToDisplay(double theStep) const;
51
52 };
53
54 #endif