1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 // JCV 1/10/90 Changement de nom du package vgeom -> gp
16 // JCV 12/12/90 modif introduction des classes XYZ et Mat dans le package
17 // LPA, JCV 07/92 passage sur C1.
18 // JCV 07/92 Introduction de la method Dump
20 #define No_Standard_OutOfRange
28 #include <gp_Trsf.hxx>
30 #include <Standard_Dump.hxx>
32 Standard_Boolean gp_Ax1::IsCoaxial
34 const Standard_Real AngularTolerance,
35 const Standard_Real LinearTolerance) const
37 gp_XYZ XYZ1 = loc.XYZ();
38 XYZ1.Subtract (Other.loc.XYZ());
39 XYZ1.Cross (Other.vdir.XYZ());
40 Standard_Real D1 = XYZ1.Modulus();
41 gp_XYZ XYZ2 = Other.loc.XYZ();
42 XYZ2.Subtract (loc.XYZ());
43 XYZ2.Cross (vdir.XYZ());
44 Standard_Real D2 = XYZ2.Modulus();
45 return (vdir.IsEqual (Other.vdir, AngularTolerance) &&
46 D1 <= LinearTolerance && D2 <= LinearTolerance);
49 void gp_Ax1::Mirror (const gp_Pnt& P)
55 gp_Ax1 gp_Ax1::Mirrored (const gp_Pnt& P) const
62 void gp_Ax1::Mirror (const gp_Ax1& A1)
68 gp_Ax1 gp_Ax1::Mirrored (const gp_Ax1& A1) const
75 void gp_Ax1::Mirror (const gp_Ax2& A2)
81 gp_Ax1 gp_Ax1::Mirrored (const gp_Ax2& A2) const
88 void gp_Ax1::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
90 OCCT_DUMP_VECTOR_CLASS (theOStream, "Location", 3, loc.X(), loc.Y(), loc.Z())
91 OCCT_DUMP_VECTOR_CLASS (theOStream, "Direction", 3, vdir.X(), vdir.Y(), vdir.Z())