23 #include <gp_Trsf.hxx>
24 #include <TopAbs_Orientation.hxx>
26 class TColgp_Array1OfPnt;
33 static gp_Trsf displacement(
const gp_Ax3& srcSys,
const gp_Ax3& dstSys);
34 static gp_Trsf transformation(
const gp_Ax3& srcSys,
const gp_Ax3& dstSys);
35 static gp_Trsf transformation(
const gp_Ax3& dstSys);
36 static gp_Trsf transformation(
const gp_Quaternion& q,
const gp_Vec& vec);
38 static gp_Pnt projectPointOnPlane(
const gp_Pnt& p,
const gp_Vec& n);
39 static std::pair<gp_Pnt, bool> projectPointOnTriangle(
41 const gp_Pnt& v0,
const gp_Pnt& v1,
const gp_Pnt& v2);
43 static Standard_Real euclideanNorm(
const gp_Vec& vec);
44 static Standard_Real squaredEuclideanNorm(
const gp_Vec& vec);
45 static Standard_Real manhattanNorm(
const gp_Vec& vec);
46 static Standard_Real maximumNorm(
const gp_Vec& vec);
48 template<
typename NORM>
49 static bool isNull(
const gp_Vec& vec,
const NORM& norm);
51 static gp_Vec triangleNormal(
52 const TColgp_Array1OfPnt& nodes,
53 const Poly_Triangle& triangle,
54 TopAbs_Orientation ori = TopAbs_FORWARD);
56 template<
typename OCC_PNT_VEC,
typename TEXT_STREAM>
57 static TEXT_STREAM& printOccPntVec(TEXT_STREAM& ts,
const OCC_PNT_VEC& v);
61 const gp_Dir2d
xDir2d(1, 0);
62 const gp_Dir2d
yDir2d(0, 1);
65 const gp_Dir
xDir3d(1, 0, 0);
66 const gp_Dir
yDir3d(0, 1, 0);
67 const gp_Dir
zDir3d(0, 0, 1);
75 template<
typename TEXT_STREAM>
76 TEXT_STREAM&
operator<<(TEXT_STREAM& ts,
const gp_Pnt& p);
78 template<
typename TEXT_STREAM>
79 TEXT_STREAM&
operator<<(TEXT_STREAM& ts,
const gp_Vec& v);
81 template<
typename TEXT_STREAM>
82 TEXT_STREAM&
operator<<(TEXT_STREAM& ts,
const gp_Dir& d);
88 template<
typename NORM>
91 return norm(vec) <= 0.000000000001;
94 template<
typename OCC_PNT_VEC,
typename TEXT_STREAM>
97 return ts <<
"(" << v.X() <<
", " << v.Y() <<
", " << v.Z() <<
")";
101 template<
typename TEXT_STREAM>
108 template<
typename TEXT_STREAM>
115 template<
typename TEXT_STREAM>
const gp_Dir2d yDir2d(0, 1)
TEXT_STREAM & operator<<(TEXT_STREAM &ts, const gp_Pnt &p)
Print (dump) in the text stream ts the point p.
Definition: math_utils.h:102
TEXT_STREAM & operator<<(TEXT_STREAM &os, const FixedArray< T, S > &coords)
Definition: fixed_array.h:201
const gp_Dir yDir3d(0, 1, 0)
const gp_Pnt origin3d(0, 0, 0)
static bool isNull(const gp_Vec &vec, const NORM &norm)
Definition: math_utils.h:89
Collection of tools for the Math toolkit.
Definition: math_utils.h:30
const gp_Dir zDir3d(0, 0, 1)
const gp_Pnt2d origin2d(0, 0)
static TEXT_STREAM & printOccPntVec(TEXT_STREAM &ts, const OCC_PNT_VEC &v)
Definition: math_utils.h:95
const Quantity< NUMERIC_TRAITS, TRAIT > operator-(const Quantity< NUMERIC_TRAITS, TRAIT > &lhs, const Quantity< NUMERIC_TRAITS, TRAIT > &rhs)
Definition: quantity.h:315
Definition: ais_text.cpp:31
const Quantity< NUMERIC_TRAITS, TRAIT > operator+(const Quantity< NUMERIC_TRAITS, TRAIT > &lhs, const Quantity< NUMERIC_TRAITS, TRAIT > &rhs)
Definition: quantity.h:286
const gp_Dir xDir3d(1, 0, 0)
const gp_Dir2d xDir2d(1, 0)