From: azv Date: Wed, 4 Jun 2014 09:08:48 +0000 (+0400) Subject: Changed GeomAPI_Dir to avoid compilation errors X-Git-Tag: V_0.4.4~327^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6bf733fe26c59377733cc530c7836cd333dc48c4;p=modules%2Fshaper.git Changed GeomAPI_Dir to avoid compilation errors --- 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