1 // File: GeomAPI_XYZ.hxx
2 // Created: 23 Apr 2014
3 // Author: Mikhail PONIKAROV
8 #include <GeomAPI_Interface.h>
9 #include <boost/shared_ptr.hpp>
13 * \brief 3 coordinates: they may represent vector or point or something else
16 class GEOMAPI_EXPORT GeomAPI_XYZ : public GeomAPI_Interface
19 /// Creation by coordinates
20 GeomAPI_XYZ(const double theX, const double theY, const double theZ);
22 /// returns X coordinate
24 /// returns Y coordinate
26 /// returns Z coordinate
30 void setX(const double theX);
32 void setY(const double theY);
34 void setZ(const double theZ);
36 /// result is sum of coordinates of this and the given argument
37 const boost::shared_ptr<GeomAPI_XYZ> added(const boost::shared_ptr<GeomAPI_XYZ>& theArg);
38 /// result is difference between coordinates of this and the given argument
39 const boost::shared_ptr<GeomAPI_XYZ> decreased(const boost::shared_ptr<GeomAPI_XYZ>& theArg);
40 /// result is coordinates multiplied by the argument
41 const boost::shared_ptr<GeomAPI_XYZ> multiplied(const double theArg);
43 /// result is a scalar product of two triplets
44 double dot(const boost::shared_ptr<GeomAPI_XYZ>& theArg) const;
45 /// result is a cross product of two triplets
46 const boost::shared_ptr<GeomAPI_XYZ> cross(const boost::shared_ptr<GeomAPI_XYZ>& theArg) const;
48 /// Distance between two triplets
49 double distance(const boost::shared_ptr<GeomAPI_XYZ>& theOther) const;