X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_AISObject.h;h=06bc2e9050705e5158656a341c5d1cbdf55627c2;hb=aa48919bb1ecb71f07d9ac5fcd1bad170e7ed547;hp=97b4688e02f289d43fd5c64d22cb82396c369431;hpb=9e869ede4d8c56262bb20534543c2bf56cd6a91b;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_AISObject.h b/src/GeomAPI/GeomAPI_AISObject.h index 97b4688e0..06bc2e905 100644 --- a/src/GeomAPI/GeomAPI_AISObject.h +++ b/src/GeomAPI/GeomAPI_AISObject.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: GeomAPI_AISObject.hxx // Created: 25 Jun 2014 // Author: Artem ZHIDKOV @@ -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 @@ -34,6 +28,8 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface /// \brief Creation of empty AIS object GeomAPI_AISObject(); + ~GeomAPI_AISObject(); + /// \brief Creates AIS_Shape object using specified shape void createShape(std::shared_ptr theShape); @@ -90,17 +86,42 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface 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 + * \returns true if the presentation color is changed + */ + bool setColor(int theR, int theG, int theB); + + /** \brief Returns 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); + void getColor(int& theR, int& theG, int& theB); /// \brief Assigns the width of the lines of shape - void setWidth(const double& theWidth); + bool 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 + /// \returns true if the object value differs from the current + bool setLineStyle(int theStyle); + + /// Set transparency of the presentation (theVal = 0 ... 1) + /// \returns true if the object value differs from the current + bool setTransparensy(double theVal); }; //! Pointer on attribute object