mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
129 lines
3.3 KiB
Plaintext
Executable File
129 lines
3.3 KiB
Plaintext
Executable File
// Copyright (c) 1995-1999 Matra Datavision
|
|
// Copyright (c) 1999-2012 OPEN CASCADE SAS
|
|
//
|
|
// The content of this file is subject to the Open CASCADE Technology Public
|
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
|
// except in compliance with the License. Please obtain a copy of the License
|
|
// at http://www.opencascade.org and read it completely before using this file.
|
|
//
|
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
|
//
|
|
// The Original Code and all software distributed under the License is
|
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
|
// Initial Developer hereby disclaims all such warranties, including without
|
|
// limitation, any warranties of merchantability, fitness for a particular
|
|
// purpose or non-infringement. Please see the License for the specific terms
|
|
// and conditions governing the rights and limitations under the License.
|
|
|
|
// Modif jcv 08/01/1991
|
|
// JCV, LPA 07/92
|
|
|
|
#include <gp_Ax2d.hxx>
|
|
|
|
inline gp_Ax2d::gp_Ax2d() : loc(0.,0.), vdir(1.,0.)
|
|
{ }
|
|
|
|
inline gp_Ax2d::gp_Ax2d (const gp_Pnt2d& P,
|
|
const gp_Dir2d& V) : loc(P), vdir(V)
|
|
{ }
|
|
|
|
inline void gp_Ax2d::SetLocation(const gp_Pnt2d& P)
|
|
{ loc = P; }
|
|
|
|
inline void gp_Ax2d::SetDirection(const gp_Dir2d& V)
|
|
{ vdir = V; }
|
|
|
|
inline const gp_Pnt2d& gp_Ax2d::Location () const
|
|
{ return loc; }
|
|
|
|
inline const gp_Dir2d& gp_Ax2d::Direction () const
|
|
{ return vdir; }
|
|
|
|
inline Standard_Boolean gp_Ax2d::IsNormal
|
|
(const gp_Ax2d& Other,
|
|
const Standard_Real AngularTolerance) const
|
|
{ return vdir.IsNormal(Other.vdir, AngularTolerance); }
|
|
|
|
inline Standard_Boolean gp_Ax2d::IsOpposite
|
|
(const gp_Ax2d& Other,
|
|
const Standard_Real AngularTolerance) const
|
|
{ return vdir.IsOpposite (Other.vdir, AngularTolerance); }
|
|
|
|
inline Standard_Boolean gp_Ax2d::IsParallel
|
|
(const gp_Ax2d& Other,
|
|
const Standard_Real AngularTolerance) const
|
|
{ return vdir.IsParallel(Other.vdir, AngularTolerance); }
|
|
|
|
inline Standard_Real gp_Ax2d::Angle (const gp_Ax2d& Other) const
|
|
{ return vdir.Angle (Other.vdir); }
|
|
|
|
inline void gp_Ax2d::Reverse()
|
|
{ vdir.Reverse(); }
|
|
|
|
inline gp_Ax2d gp_Ax2d::Reversed() const
|
|
{
|
|
gp_Ax2d Temp = *this;
|
|
Temp.Reverse ();
|
|
return Temp;
|
|
}
|
|
|
|
inline void gp_Ax2d::Rotate (const gp_Pnt2d& P,
|
|
const Standard_Real Ang)
|
|
{
|
|
loc.Rotate (P, Ang);
|
|
vdir.Rotate (Ang);
|
|
}
|
|
|
|
inline gp_Ax2d gp_Ax2d::Rotated (const gp_Pnt2d& P,
|
|
const Standard_Real Ang) const
|
|
{
|
|
gp_Ax2d A = *this;
|
|
A.Rotate (P, Ang);
|
|
return A;
|
|
}
|
|
|
|
inline gp_Ax2d gp_Ax2d::Scaled (const gp_Pnt2d& P,
|
|
const Standard_Real S) const
|
|
{
|
|
gp_Ax2d A = *this;
|
|
A.Scale (P, S);
|
|
return A;
|
|
}
|
|
|
|
inline void gp_Ax2d::Transform (const gp_Trsf2d& T)
|
|
{
|
|
loc.Transform (T);
|
|
vdir.Transform (T);
|
|
}
|
|
|
|
inline gp_Ax2d gp_Ax2d::Transformed (const gp_Trsf2d& T) const
|
|
{
|
|
gp_Ax2d A = *this;
|
|
A.Transform (T);
|
|
return A;
|
|
}
|
|
|
|
inline void gp_Ax2d::Translate (const gp_Vec2d& V)
|
|
{ loc.Translate (V); }
|
|
|
|
inline gp_Ax2d gp_Ax2d::Translated (const gp_Vec2d& V) const
|
|
{
|
|
gp_Ax2d A = *this;
|
|
(A.loc).Translate (V);
|
|
return A;
|
|
}
|
|
|
|
inline void gp_Ax2d::Translate (const gp_Pnt2d& P1,
|
|
const gp_Pnt2d& P2)
|
|
{ loc.Translate (P1,P2); }
|
|
|
|
inline gp_Ax2d gp_Ax2d::Translated (const gp_Pnt2d& P1,
|
|
const gp_Pnt2d& P2) const
|
|
{
|
|
gp_Ax2d A = *this;
|
|
(A.loc).Translate( gp_Vec2d (P1, P2));
|
|
return A;
|
|
}
|
|
|