]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Changed GeomAPI_Dir to avoid compilation errors
authorazv <azv@opencascade.com>
Wed, 4 Jun 2014 09:08:48 +0000 (13:08 +0400)
committerazv <azv@opencascade.com>
Wed, 4 Jun 2014 09:08:48 +0000 (13:08 +0400)
src/GeomAPI/GeomAPI_Dir.cpp
src/GeomAPI/GeomAPI_Dir.h

index abe357b2bfc17e033ddd4af1644aa204ed3b3c5c..e3badb4401b41cdd0fc5a2f7f3bd3712ca172f08 100644 (file)
@@ -41,3 +41,10 @@ double GeomAPI_Dir::dot(const boost::shared_ptr<GeomAPI_Dir>& theArg) const
 {
   return MY_DIR->Dot(theArg->impl<gp_Dir>());
 }
+
+const boost::shared_ptr<GeomAPI_XYZ> GeomAPI_Dir::cross(const boost::shared_ptr<GeomAPI_Dir>& theArg) const
+{
+  gp_XYZ aResult = MY_DIR->XYZ().Crossed(theArg->impl<gp_Dir>().XYZ());
+  return boost::shared_ptr<GeomAPI_XYZ>(new GeomAPI_XYZ(aResult.X(), aResult.Y(), aResult.Z()));
+}
+
index 6ab0f1dd2baced7076eff6b372d6d477e4f1ca49..181c4672e283379cf4281c3a9f269db5b9a0544c 100644 (file)
@@ -35,6 +35,8 @@ public:
 
   /// result is a scalar product of directions
   double dot(const boost::shared_ptr<GeomAPI_Dir>& theArg) const;
+  /// result is a cross product of two directions
+  const boost::shared_ptr<GeomAPI_XYZ> cross(const boost::shared_ptr<GeomAPI_Dir>& theArg) const;
 };
 
 #endif