Salome HOME
Merge remote-tracking branch 'remotes/origin/master' into SketchSolver
[modules/shaper.git] / src / GeomAPI / GeomAPI_AISObject.h
1 // File:        GeomAPI_AISObject.hxx
2 // Created:     25 Jun 2014
3 // Author:      Artem ZHIDKOV
4
5 #ifndef GeomAPI_AISObject_HeaderFile
6 #define GeomAPI_AISObject_HeaderFile
7
8 #include <GeomAPI_Interface.h>
9
10 #include <boost/shared_ptr.hpp>
11
12 class GeomAPI_Circ;
13 class GeomAPI_Lin;
14 class GeomAPI_Pln;
15 class GeomAPI_Pnt;
16 class GeomAPI_Shape;
17
18 struct GEOMAPI_EXPORT Colors
19 {
20   static int COLOR_BROWN;
21 };
22
23 /** \class GeomAPI_AISObject
24  *  \ingroup DataModel
25  *  \brief Interface for AIS_InteractiveObject
26  */
27
28 class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface
29 {
30 public:
31   /// \brief Creation of empty AIS object
32   GeomAPI_AISObject();
33
34   /// \brief Creates AIS_Shape object using specified shape
35   void createShape(boost::shared_ptr<GeomAPI_Shape> theShape);
36
37   /** \brief Creates AIS_LengthDimension object
38    *  \param[in] theStartPoint  first point for dimension
39    *  \param[in] theEndPoint    second point for dimension
40    *  \param[in] theFlyoutPoint the flyout of dimension relative to the measured line
41    *  \param[in] thePlane       the plane which contains all points above
42    *  \param[in] theDistance    value of the distance to be shown
43    */
44   void createDistance(boost::shared_ptr<GeomAPI_Pnt> theStartPoint,
45                       boost::shared_ptr<GeomAPI_Pnt> theEndPoint,
46                       boost::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
47                       boost::shared_ptr<GeomAPI_Pln> thePlane,
48                       double                         theDistance);
49
50   /** \brief Creates AIS_RadiusDimension object
51    *  \param[in] theCircle      the radius is created for this circle
52    *  \param[in] theFlyoutPoint the flyout of dimension
53    *  \param[in] theRadius      value of the radius to be shown
54    */
55   void createRadius(boost::shared_ptr<GeomAPI_Circ> theCircle,
56                     boost::shared_ptr<GeomAPI_Pnt>  theFlyoutPoint,
57                     double                          theRadius);
58
59   /** \brief Creates AIS_ParallelRelation object for two lines
60    *  \param[in] theLine1       first parallel line
61    *  \param[in] theLine2       second parallel line
62    *  \param[in] theFlyoutPoint the flyout point for relation
63    *  \param[in] thePlane       the plane which contains the lines
64    */
65   void createParallel(boost::shared_ptr<GeomAPI_Shape> theLine1,
66                       boost::shared_ptr<GeomAPI_Shape> theLine2,
67                       boost::shared_ptr<GeomAPI_Pnt>   theFlyoutPoint,
68                       boost::shared_ptr<GeomAPI_Pln>   thePlane);
69
70   /** \brief Creates AIS_PerpendicularRelation object for two lines
71    *  \param[in] theLine1       first parallel line
72    *  \param[in] theLine2       second parallel line
73    *  \param[in] thePlane       the plane which contains the lines
74    */
75   void createPerpendicular(boost::shared_ptr<GeomAPI_Shape> theLine1,
76                            boost::shared_ptr<GeomAPI_Shape> theLine2,
77                            boost::shared_ptr<GeomAPI_Pln>   thePlane);
78
79   /** \brief Assigns the color for the shape
80    *  \param[in] theColor index of the color
81    */
82   void setColor(const int& theColor);
83
84   /// \brief Assigns the width of the lines of shape
85   void setWidth(const double& theWidth);
86
87   /// \brief Checks if the object is empty
88   bool empty() const;
89 };
90
91 #endif
92