Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom.git into Dev_0.7.1
[modules/shaper.git] / src / ModuleBase / ModuleBase_ResultPrs.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModuleBase_ResultPrs.h
4 // Created:     21 October 2014
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef ModuleBase_ResultPrs_H
8 #define ModuleBase_ResultPrs_H
9
10 #include "ModuleBase.h"
11
12 #include <ModelAPI_Result.h>
13
14 #include <AIS_Shape.hxx>
15 #include <Standard_DefineHandle.hxx>
16
17 DEFINE_STANDARD_HANDLE(ModuleBase_ResultPrs, AIS_Shape)
18
19 /**
20 * \ingroup GUI
21 * A redefinition of standard AIS Interactive Object in order to provide specific behaviour 
22 * for wire presentations based in a one plane
23 */
24 class ModuleBase_ResultPrs: public AIS_Shape
25 {
26 public:
27   /// Constructor
28   /// \param theResult a result object
29   Standard_EXPORT ModuleBase_ResultPrs(ResultPtr theResult);
30
31   /// Returns result object
32   Standard_EXPORT ResultPtr getResult() const { return myResult; }
33
34   /// Returns True if the presentation is in sketch mode
35   Standard_EXPORT bool isSketchMode() const { return myIsSketchMode; }
36
37   DEFINE_STANDARD_RTTI(ModuleBase_ResultPrs)
38 protected:
39   /// Redefinition of virtual function
40   Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
41     const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0);
42
43   /// Redefinition of virtual function
44   Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
45     const Standard_Integer aMode) ;
46
47 private:
48   /// Reference to result object
49   ResultPtr myResult;
50
51   /// A sketch mode flag
52   bool myIsSketchMode;
53
54   /// Original shape of the result object
55   TopoDS_Shape myOriginalShape;
56
57   /// List of faces
58   std::list<std::shared_ptr<GeomAPI_Shape> > myFacesList;
59 };
60
61
62 #endif