X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_AISObject.h;h=a76016bd6d738989f04238cb02037f5b291f17bb;hb=aeca03e919a402327655e3f9c133985d9223b873;hp=afd7ee95f0724d20d0cb23b1aa70732537ce768c;hpb=0c10db12692c21f2ce38b9eebd27981a8eee6b41;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_AISObject.h b/src/GeomAPI/GeomAPI_AISObject.h index afd7ee95f..a76016bd6 100644 --- a/src/GeomAPI/GeomAPI_AISObject.h +++ b/src/GeomAPI/GeomAPI_AISObject.h @@ -1,13 +1,15 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: GeomAPI_AISObject.hxx // Created: 25 Jun 2014 // Author: Artem ZHIDKOV -#ifndef GeomAPI_AISObject_HeaderFile -#define GeomAPI_AISObject_HeaderFile +#ifndef GeomAPI_AISObject_H_ +#define GeomAPI_AISObject_H_ #include -#include +#include class GeomAPI_Circ; class GeomAPI_Lin; @@ -15,14 +17,6 @@ class GeomAPI_Pln; class GeomAPI_Pnt; class GeomAPI_Shape; -struct GEOMAPI_EXPORT Colors -{ - static int COLOR_BROWN; - static int COLOR_RED; - static int COLOR_GREEN; - static int COLOR_BLUE; -}; - /** \class GeomAPI_AISObject * \ingroup DataModel * \brief Interface for AIS_InteractiveObject @@ -30,12 +24,12 @@ struct GEOMAPI_EXPORT Colors class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface { -public: + public: /// \brief Creation of empty AIS object GeomAPI_AISObject(); /// \brief Creates AIS_Shape object using specified shape - void createShape(boost::shared_ptr theShape); + void createShape(std::shared_ptr theShape); /** \brief Creates AIS_LengthDimension object * \param[in] theStartPoint first point for dimension @@ -44,20 +38,18 @@ public: * \param[in] thePlane the plane which contains all points above * \param[in] theDistance value of the distance to be shown */ - void createDistance(boost::shared_ptr theStartPoint, - boost::shared_ptr theEndPoint, - boost::shared_ptr theFlyoutPoint, - boost::shared_ptr thePlane, - double theDistance); + void createDistance(std::shared_ptr theStartPoint, + std::shared_ptr theEndPoint, + std::shared_ptr theFlyoutPoint, + std::shared_ptr thePlane, double theDistance); /** \brief Creates AIS_RadiusDimension object * \param[in] theCircle the radius is created for this circle * \param[in] theFlyoutPoint the flyout of dimension * \param[in] theRadius value of the radius to be shown */ - void createRadius(boost::shared_ptr theCircle, - boost::shared_ptr theFlyoutPoint, - double theRadius); + void createRadius(std::shared_ptr theCircle, + std::shared_ptr theFlyoutPoint, double theRadius); /** \brief Creates AIS_ParallelRelation object for two lines * \param[in] theLine1 first parallel line @@ -65,31 +57,63 @@ public: * \param[in] theFlyoutPoint the flyout point for relation * \param[in] thePlane the plane which contains the lines */ - void createParallel(boost::shared_ptr theLine1, - boost::shared_ptr theLine2, - boost::shared_ptr theFlyoutPoint, - boost::shared_ptr thePlane); + void createParallel(std::shared_ptr theLine1, + std::shared_ptr theLine2, + std::shared_ptr theFlyoutPoint, + std::shared_ptr thePlane); /** \brief Creates AIS_PerpendicularRelation object for two lines * \param[in] theLine1 first parallel line * \param[in] theLine2 second parallel line * \param[in] thePlane the plane which contains the lines */ - void createPerpendicular(boost::shared_ptr theLine1, - boost::shared_ptr theLine2, - boost::shared_ptr thePlane); + void createPerpendicular(std::shared_ptr theLine1, + std::shared_ptr theLine2, + std::shared_ptr thePlane); + + /** \brief Creates AIS_FixedRelation object for an object + * \param[in] theShape the object + * \param[in] thePlane the plane which contains the lines + */ + void createFixed(std::shared_ptr theShape, + std::shared_ptr thePlane); /** \brief Assigns the color for the shape * \param[in] theColor index of the color */ void setColor(const int& theColor); + /** \brief Assigns the color for the shape + * \param[in] theR value of the red component + * \param[in] theG value of the green component + * \param[in] theB value of the blue component + */ + void setColor(int theR, int theG, int theB); + /// \brief Assigns the width of the lines of shape void setWidth(const double& theWidth); /// \brief Checks if the object is empty bool empty() const; + + /// Return shape type according to TopAbs_ShapeEnum if the AIS is AIS_Shape + /// Otherwise returns -1 + int getShapeType() const; + + /// Sets marker type for vertex. + /// The type has to be defined according to Acpect_TypeOfMarker + void setPointMarker(int theType, double theScale); + + /// Set line type of edges + /// Has to be defined according to Aspect_TypeOfLine + void setLineStyle(int theStyle); + + /// Set transparency of the presentation (theVal = 0 ... 1) + void setTransparensy(double theVal); }; +//! Pointer on attribute object +typedef std::shared_ptr AISObjectPtr; + #endif