1 // File: GeomAPI_AISObject.hxx
2 // Created: 25 Jun 2014
3 // Author: Artem ZHIDKOV
5 #ifndef GeomAPI_AISObject_H_
6 #define GeomAPI_AISObject_H_
8 #include <GeomAPI_Interface.h>
10 #include <boost/shared_ptr.hpp>
18 struct GEOMAPI_EXPORT Colors
20 static int COLOR_BROWN;
22 static int COLOR_GREEN;
23 static int COLOR_BLUE;
26 /** \class GeomAPI_AISObject
28 * \brief Interface for AIS_InteractiveObject
31 class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface
34 /// \brief Creation of empty AIS object
37 /// \brief Creates AIS_Shape object using specified shape
38 void createShape(boost::shared_ptr<GeomAPI_Shape> theShape);
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
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, double theDistance);
52 /** \brief Creates AIS_RadiusDimension object
53 * \param[in] theCircle the radius is created for this circle
54 * \param[in] theFlyoutPoint the flyout of dimension
55 * \param[in] theRadius value of the radius to be shown
57 void createRadius(boost::shared_ptr<GeomAPI_Circ> theCircle,
58 boost::shared_ptr<GeomAPI_Pnt> theFlyoutPoint, double theRadius);
60 /** \brief Creates AIS_ParallelRelation object for two lines
61 * \param[in] theLine1 first parallel line
62 * \param[in] theLine2 second parallel line
63 * \param[in] theFlyoutPoint the flyout point for relation
64 * \param[in] thePlane the plane which contains the lines
66 void createParallel(boost::shared_ptr<GeomAPI_Shape> theLine1,
67 boost::shared_ptr<GeomAPI_Shape> theLine2,
68 boost::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
69 boost::shared_ptr<GeomAPI_Pln> thePlane);
71 /** \brief Creates AIS_PerpendicularRelation object for two lines
72 * \param[in] theLine1 first parallel line
73 * \param[in] theLine2 second parallel line
74 * \param[in] thePlane the plane which contains the lines
76 void createPerpendicular(boost::shared_ptr<GeomAPI_Shape> theLine1,
77 boost::shared_ptr<GeomAPI_Shape> theLine2,
78 boost::shared_ptr<GeomAPI_Pln> thePlane);
80 /** \brief Assigns the color for the shape
81 * \param[in] theColor index of the color
83 void setColor(const int& theColor);
85 /** \brief Assigns the color for the shape
86 * \param[in] theR value of the red component
87 * \param[in] theG value of the green component
88 * \param[in] theB value of the blue component
90 void setColor(int theR, int theG, int theB);
92 /// \brief Assigns the width of the lines of shape
93 void setWidth(const double& theWidth);
95 /// \brief Checks if the object is empty
99 //! Pointer on attribute object
100 typedef boost::shared_ptr<GeomAPI_AISObject> AISObjectPtr;