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