Salome HOME
Merge branch 'Dev_2.8.0'
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Sphere.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_Sphere.h
4 // Created:     16 Mar 2017
5 // Author:      Clarisse Genrault (CEA)
6
7 #ifndef GEOMALGOAPI_SPHERE_H_
8 #define GEOMALGOAPI_SPHERE_H_
9
10 #include <GeomAlgoAPI_MakeShape.h>
11
12 #include <GeomAPI_Pnt.h>
13
14 /**\class GeomAlgoAPI_Sphere
15  * \ingroup DataAlgo
16  * \brief Allows to create Sphere Primitives
17  */
18 class GeomAlgoAPI_Sphere : public GeomAlgoAPI_MakeShape
19 {
20  public:
21   GEOMALGOAPI_EXPORT GeomAlgoAPI_Sphere();
22
23   /// Creates a sphere.
24   /// \param theCenterPoint The center point of the sphere
25   /// \param theRadius The radius of the sphere
26   GEOMALGOAPI_EXPORT GeomAlgoAPI_Sphere(std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
27                                         const double theRadius);
28
29   /// Checks if data for the sphere construction is OK.
30   GEOMALGOAPI_EXPORT bool check();
31
32   /// Builds the sphere.
33   GEOMALGOAPI_EXPORT void build();
34
35  private:
36   std::shared_ptr<GeomAPI_Pnt> myCenterPoint; /// Center of the sphere.
37   double myRadius;
38 };
39
40 #endif // GEOMALGOAPI_SPHERE_H_