X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Dir.cpp;h=6f57e76815be685afaf7de7fdd399aaceead0348;hb=73502ac782ffc45a3acf665ded34f582b07ec4d5;hp=c81efd26e98b61f382454d744fe0171bf63d5e1d;hpb=35a88fdd724349275bbff32b9596a44e7cd422e2;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Dir.cpp b/src/GeomAPI/GeomAPI_Dir.cpp index c81efd26e..6f57e7681 100644 --- a/src/GeomAPI/GeomAPI_Dir.cpp +++ b/src/GeomAPI/GeomAPI_Dir.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: GeomAPI_Dir.cpp // Created: 23 Apr 2014 // Author: Mikhail PONIKAROV @@ -7,7 +9,7 @@ #include -#define MY_DIR static_cast(myImpl) +#define MY_DIR implPtr() GeomAPI_Dir::GeomAPI_Dir(const double theX, const double theY, const double theZ) : GeomAPI_Interface(new gp_Dir(theX, theY, theZ)) @@ -39,6 +41,11 @@ const std::shared_ptr GeomAPI_Dir::xyz() return std::shared_ptr(new GeomAPI_XYZ(MY_DIR->X(), MY_DIR->Y(), MY_DIR->Z())); } +void GeomAPI_Dir::reverse() +{ + MY_DIR->Reverse(); +} + double GeomAPI_Dir::dot(const std::shared_ptr& theArg) const { return MY_DIR->Dot(theArg->impl()); @@ -51,3 +58,8 @@ const std::shared_ptr GeomAPI_Dir::cross( return std::shared_ptr(new GeomAPI_XYZ(aResult.X(), aResult.Y(), aResult.Z())); } +double GeomAPI_Dir::angle(const std::shared_ptr& theArg) const +{ + return MY_DIR->Angle(theArg->impl()); +} +