Salome HOME
Merge branch 'master' of newgeom:newgeom
[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_H_
6 #define GeomAPI_AISObject_H_
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   static int COLOR_RED;
22   static int COLOR_GREEN;
23   static int COLOR_BLUE;
24 };
25
26 /** \class GeomAPI_AISObject
27  *  \ingroup DataModel
28  *  \brief Interface for AIS_InteractiveObject
29  */
30
31 class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface
32 {
33 public:
34   /// \brief Creation of empty AIS object
35   GeomAPI_AISObject();
36
37   /// \brief Creates AIS_Shape object using specified shape
38   void createShape(boost::shared_ptr<GeomAPI_Shape> theShape);
39
40   /** \brief Creates AIS_LengthDimension object
41    *  \param[in] theStartPoint  first point for dimension
42    *  \param[in] theEndPoint    second point for dimension
43    *  \param[in] theFlyoutPoint the flyout of dimension relative to the measured line
44    *  \param[in] thePlane       the plane which contains all points above
45    *  \param[in] theDistance    value of the distance to be shown
46    */
47   void createDistance(boost::shared_ptr<GeomAPI_Pnt> theStartPoint,
48                       boost::shared_ptr<GeomAPI_Pnt> theEndPoint,
49                       boost::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
50                       boost::shared_ptr<GeomAPI_Pln> thePlane,
51                       double                         theDistance);
52
53   /** \brief Creates AIS_RadiusDimension object
54    *  \param[in] theCircle      the radius is created for this circle
55    *  \param[in] theFlyoutPoint the flyout of dimension
56    *  \param[in] theRadius      value of the radius to be shown
57    */
58   void createRadius(boost::shared_ptr<GeomAPI_Circ> theCircle,
59                     boost::shared_ptr<GeomAPI_Pnt>  theFlyoutPoint,
60                     double                          theRadius);
61
62   /** \brief Creates AIS_ParallelRelation object for two lines
63    *  \param[in] theLine1       first parallel line
64    *  \param[in] theLine2       second parallel line
65    *  \param[in] theFlyoutPoint the flyout point for relation
66    *  \param[in] thePlane       the plane which contains the lines
67    */
68   void createParallel(boost::shared_ptr<GeomAPI_Shape> theLine1,
69                       boost::shared_ptr<GeomAPI_Shape> theLine2,
70                       boost::shared_ptr<GeomAPI_Pnt>   theFlyoutPoint,
71                       boost::shared_ptr<GeomAPI_Pln>   thePlane);
72
73   /** \brief Creates AIS_PerpendicularRelation object for two lines
74    *  \param[in] theLine1       first parallel line
75    *  \param[in] theLine2       second parallel line
76    *  \param[in] thePlane       the plane which contains the lines
77    */
78   void createPerpendicular(boost::shared_ptr<GeomAPI_Shape> theLine1,
79                            boost::shared_ptr<GeomAPI_Shape> theLine2,
80                            boost::shared_ptr<GeomAPI_Pln>   thePlane);
81
82   /** \brief Assigns the color for the shape
83    *  \param[in] theColor index of the color
84    */
85   void setColor(const int& theColor);
86
87   /** \brief Assigns the color for the shape
88    *  \param[in] theR value of the red component
89    *  \param[in] theG value of the green component
90    *  \param[in] theB value of the blue component
91    */
92   void setColor(int theR, int theG, int theB);
93
94   /// \brief Assigns the width of the lines of shape
95   void setWidth(const double& theWidth);
96
97   /// \brief Checks if the object is empty
98   bool empty() const;
99 };
100
101 #endif
102