1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #ifndef GEOMAPI_AX3_H_
22 #define GEOMAPI_AX3_H_
25 #include "GeomAPI_Pnt.h"
26 #include "GeomAPI_Dir.h"
30 * \brief The class represents a coordinate plane which is 2d plane with X and Y directions
33 class GeomAPI_Ax3 : public GeomAPI_Interface
36 /// Default constructor
41 /// \param theOrigin point of origin
42 /// \param theDirX direction of X axis
43 /// \param theNorm direction of normal vector
45 GeomAPI_Ax3(std::shared_ptr<GeomAPI_Pnt> theOrigin,
46 std::shared_ptr<GeomAPI_Dir> theDirX,
47 std::shared_ptr<GeomAPI_Dir> theNorm);
51 void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
53 /// Returns the plane origin point
55 std::shared_ptr<GeomAPI_Pnt> origin() const;
57 /// Sets X direction vector
59 void setDirX(const std::shared_ptr<GeomAPI_Dir>& theDirX);
61 /// Returns X direction vector
63 std::shared_ptr<GeomAPI_Dir> dirX() const;
65 /// Sets Y direction vector
67 void setDirY(const std::shared_ptr<GeomAPI_Dir>& theDirY);
69 /// Returns Y direction vector
71 std::shared_ptr<GeomAPI_Dir> dirY() const;
73 /// Sets Z direction vector
75 void setNormal(const std::shared_ptr<GeomAPI_Dir>& theNorm);
77 /// Returns Z direction vector
79 std::shared_ptr<GeomAPI_Dir> normal() const;
81 /// Converts 2d coordinates from the plane to 3d space point
82 /// \param theX X coordinate
83 /// \param theY Y coordinate
85 std::shared_ptr<GeomAPI_Pnt> to3D(double theX, double theY) const;
87 /// Converts 3d to 2d coordinates of the plane
88 /// \param theX X coordinate
89 /// \param theY Y coordinate
90 /// \param theZ Z coordinate
92 std::shared_ptr<GeomAPI_Pnt2d> to2D(double theX, double theY, double theZ) const;
97 //! Pointer on the object
98 typedef std::shared_ptr<GeomAPI_Ax3> GeomAx3Ptr;