1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_XYZ.hxx
4 // Created: 23 Apr 2014
5 // Author: Mikhail PONIKAROV
10 #include <GeomAPI_Interface.h>
15 * \brief 3 coordinates: they may represent vector or point or something else
18 class GeomAPI_XYZ : public GeomAPI_Interface
21 /// Creation by coordinates
23 GeomAPI_XYZ(const double theX, const double theY, const double theZ);
25 /// returns X coordinate
28 /// returns Y coordinate
31 /// returns Z coordinate
37 void setX(const double theX);
40 void setY(const double theY);
43 void setZ(const double theZ);
45 /// result is sum of coordinates of this and the given argument
47 const std::shared_ptr<GeomAPI_XYZ> added(const std::shared_ptr<GeomAPI_XYZ>& theArg);
48 /// result is difference between coordinates of this and the given argument
50 const std::shared_ptr<GeomAPI_XYZ> decreased(const std::shared_ptr<GeomAPI_XYZ>& theArg);
51 /// result is coordinates multiplied by the argument
53 const std::shared_ptr<GeomAPI_XYZ> multiplied(const double theArg);
55 /// result is a scalar product of two triplets
57 double dot(const std::shared_ptr<GeomAPI_XYZ>& theArg) const;
58 /// result is a cross product of two triplets
60 const std::shared_ptr<GeomAPI_XYZ> cross(const std::shared_ptr<GeomAPI_XYZ>& theArg) const;
62 /// Distance between two triplets
64 double distance(const std::shared_ptr<GeomAPI_XYZ>& theOther) const;