The improvement is concluded in replacement of calls to gp_Dir2d(1,0) with calls to gp_Dir2d(void).
Thus we avoid sqrt() that is called from within gp_Dir2d(double,double). The same is with direction in 3D space.
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <gp.hxx>
-#include <gp_Ax1.hxx>
#include <Precision.hxx>
-inline gp_Ax2::gp_Ax2() : vydir(0.,1.,0.), vxdir(1.,0.,0.)
+inline gp_Ax2::gp_Ax2()
+ :
+ vydir(0.,1.,0.)
+ // vxdir(1.,0.,0.) use default ctor of gp_Dir, as it creates the same dir(1,0,0)
{ }
inline gp_Ax2::gp_Ax2(const gp_Pnt& P,
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-inline gp_Ax22d::gp_Ax22d() : vydir(0.,1.), vxdir(1.,0.)
+inline gp_Ax22d::gp_Ax22d()
+ :
+ vydir(0.,1.)
+ // vxdir(1.,0.) use default ctor of gp_Dir2d, as it creates the same dir(1, 0)
{}
inline gp_Ax22d::gp_Ax22d(const gp_Pnt2d& P ,
#include <gp_Ax2d.hxx>
-inline gp_Ax2d::gp_Ax2d() : loc(0.,0.), vdir(1.,0.)
+inline gp_Ax2d::gp_Ax2d()
+ :
+ loc(0.,0.)
+ //vdir(1.,0.) use default ctor of gp_Dir2d, as it creates the same dir (1,0)
{ }
inline gp_Ax2d::gp_Ax2d (const gp_Pnt2d& P,
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <gp.hxx>
#include <gp_Ax2.hxx>
-#include <gp_Ax1.hxx>
-inline gp_Ax3::gp_Ax3() : vydir(0.,1.,0.), vxdir(1.,0.,0.)
+inline gp_Ax3::gp_Ax3()
+ :
+ vydir(0.,1.,0.)
+ // vxdir(1.,0.,0.) use default ctor of gp_Dir, as it creates the same dir(1,0,0)
{ }
inline gp_Ax3::gp_Ax3(const gp_Ax2& A) :