From: nds Date: Wed, 4 Jun 2014 09:09:22 +0000 (+0400) Subject: Merge branch 'master' of newgeom:newgeom X-Git-Tag: V_0.4.4~327 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ab7e36f907fed886b8c4302911a1a42aef13b62d;hp=56e04b3cef94fcf153206f5a2798c22c0d4d65e9;p=modules%2Fshaper.git Merge branch 'master' of newgeom:newgeom --- diff --git a/src/GeomAPI/GeomAPI_Dir.cpp b/src/GeomAPI/GeomAPI_Dir.cpp index abe357b2b..e3badb440 100644 --- a/src/GeomAPI/GeomAPI_Dir.cpp +++ b/src/GeomAPI/GeomAPI_Dir.cpp @@ -41,3 +41,10 @@ double GeomAPI_Dir::dot(const boost::shared_ptr& theArg) const { return MY_DIR->Dot(theArg->impl()); } + +const boost::shared_ptr GeomAPI_Dir::cross(const boost::shared_ptr& theArg) const +{ + gp_XYZ aResult = MY_DIR->XYZ().Crossed(theArg->impl().XYZ()); + return boost::shared_ptr(new GeomAPI_XYZ(aResult.X(), aResult.Y(), aResult.Z())); +} + diff --git a/src/GeomAPI/GeomAPI_Dir.h b/src/GeomAPI/GeomAPI_Dir.h index 6ab0f1dd2..181c4672e 100644 --- a/src/GeomAPI/GeomAPI_Dir.h +++ b/src/GeomAPI/GeomAPI_Dir.h @@ -35,6 +35,8 @@ public: /// result is a scalar product of directions double dot(const boost::shared_ptr& theArg) const; + /// result is a cross product of two directions + const boost::shared_ptr cross(const boost::shared_ptr& theArg) const; }; #endif