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_EXPORT GeomAPI_XYZ : public GeomAPI_Interface
21 /// Creation by coordinates
22 GeomAPI_XYZ(const double theX, const double theY, const double theZ);
24 /// returns X coordinate
26 /// returns Y coordinate
28 /// returns Z coordinate
32 void setX(const double theX);
34 void setY(const double theY);
36 void setZ(const double theZ);
38 /// result is sum of coordinates of this and the given argument
39 const std::shared_ptr<GeomAPI_XYZ> added(const std::shared_ptr<GeomAPI_XYZ>& theArg);
40 /// result is difference between coordinates of this and the given argument
41 const std::shared_ptr<GeomAPI_XYZ> decreased(const std::shared_ptr<GeomAPI_XYZ>& theArg);
42 /// result is coordinates multiplied by the argument
43 const std::shared_ptr<GeomAPI_XYZ> multiplied(const double theArg);
45 /// result is a scalar product of two triplets
46 double dot(const std::shared_ptr<GeomAPI_XYZ>& theArg) const;
47 /// result is a cross product of two triplets
48 const std::shared_ptr<GeomAPI_XYZ> cross(const std::shared_ptr<GeomAPI_XYZ>& theArg) const;
50 /// Distance between two triplets
51 double distance(const std::shared_ptr<GeomAPI_XYZ>& theOther) const;