Salome HOME
Porting to SALOME_8.2.0
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Tangent.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        SketcherPrs_Tangent.h
4 // Created:     16 February 2015
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef SketcherPrs_Tangent_H
8 #define SketcherPrs_Tangent_H
9
10 #include "SketcherPrs_SymbolPrs.h"
11 #include <ModelAPI_Feature.h>
12
13
14 DEFINE_STANDARD_HANDLE(SketcherPrs_Tangent, SketcherPrs_SymbolPrs)
15
16 /**
17 * \ingroup GUI
18 * A redefinition of standard AIS Interactive Object in order to provide  
19 * presentation of tangent constraint
20 */
21 class SketcherPrs_Tangent: public SketcherPrs_SymbolPrs
22 {
23 public:
24   /// Constructor
25   /// \param theConstraint a constraint feature
26   /// \param thePlane a coordinate plane of current sketch
27   Standard_EXPORT SketcherPrs_Tangent(ModelAPI_Feature* theConstraint,
28                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
29
30   DEFINE_STANDARD_RTTIEXT(SketcherPrs_Tangent, SketcherPrs_SymbolPrs)
31
32   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
33   /// \param theConstraint a constraint feature
34   /// \param thePlane a coordinate plane of current sketch
35   /// \return boolean result value
36   static bool IsReadyToDisplay(ModelAPI_Feature* theConstraint,
37                                const std::shared_ptr<GeomAPI_Ax3>& thePlane);
38 protected:
39
40   virtual const char* iconName() const { return "tangent.png"; }
41
42   virtual void drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const;
43
44   /// Update myPntArray according to presentation positions
45   /// \return true in case of success
46   virtual bool updateIfReadyToDisplay(double theStep) const;
47 };
48
49 #endif