1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)

This commit is contained in:
DBV
2011-12-16 08:50:03 +00:00
committed by bugmaster
parent bc650d4170
commit c6541a0c86
438 changed files with 2142 additions and 2188 deletions

View File

@@ -30,13 +30,13 @@ inline void gp_Circ::SetRadius (const Standard_Real R)
}
inline Standard_Real gp_Circ::Area() const
{ return Standard_PI*radius*radius; }
{ return M_PI * radius * radius; }
inline const gp_Ax1& gp_Circ::Axis () const
{ return pos.Axis(); }
inline Standard_Real gp_Circ::Length() const
{ return 2.*Standard_PI*radius; }
{ return 2. * M_PI * radius; }
inline const gp_Pnt& gp_Circ::Location () const
{ return pos.Location(); }

View File

@@ -38,7 +38,7 @@ inline void gp_Circ2d::SetRadius (const Standard_Real Radius)
}
inline Standard_Real gp_Circ2d::Area() const
{ return Standard_PI*radius*radius; }
{ return M_PI * radius * radius; }
inline void gp_Circ2d::Coefficients (Standard_Real& A,
Standard_Real& B,
@@ -80,7 +80,7 @@ inline Standard_Real gp_Circ2d::SquareDistance (const gp_Pnt2d& P) const
}
inline Standard_Real gp_Circ2d::Length() const
{ return 2.*Standard_PI*radius; }
{ return 2. * M_PI * radius; }
inline const gp_Pnt2d& gp_Circ2d::Location () const
{return pos.Location(); }

View File

@@ -5,7 +5,7 @@
inline gp_Cone::gp_Cone () :
radius (RealLast()),
semiAngle (Standard_PI * 0.25)
semiAngle (M_PI * 0.25)
{ }
inline gp_Cone::gp_Cone (const gp_Ax3& A3,
@@ -20,7 +20,7 @@ inline gp_Cone::gp_Cone (const gp_Ax3& A3,
Standard_ConstructionError_Raise_if
(radius < 0. ||
val <= gp::Resolution() ||
Standard_PI * 0.5 - val <= gp::Resolution(), "");
M_PI * 0.5 - val <= gp::Resolution(), "");
}
inline void gp_Cone::SetAxis (const gp_Ax1& A1)
@@ -45,7 +45,7 @@ inline void gp_Cone::SetSemiAngle (const Standard_Real Ang)
if (val < 0) val = - val;
Standard_ConstructionError_Raise_if
(val <= gp::Resolution() ||
Standard_PI * 0.5 - val <= gp::Resolution(),"");
M_PI * 0.5 - val <= gp::Resolution(),"");
semiAngle = Ang;
}

View File

@@ -18,7 +18,7 @@ Standard_Real gp_Dir::Angle (const gp_Dir& Other) const
return acos (Cosinus);
else {
Standard_Real Sinus = (coord.Crossed (Other.coord)).Modulus ();
if(Cosinus < 0.0) return Standard_PI - asin (Sinus);
if(Cosinus < 0.0) return M_PI - asin (Sinus);
else return asin (Sinus);
}
}
@@ -33,7 +33,7 @@ Standard_Real gp_Dir::AngleWithRef (const gp_Dir& Other,
if (Cosinus > -0.70710678118655 && Cosinus < 0.70710678118655)
Ang = acos (Cosinus);
else {
if(Cosinus < 0.0) Ang = Standard_PI - asin (Sinus);
if(Cosinus < 0.0) Ang = M_PI - asin (Sinus);
else Ang = asin (Sinus);
}
if (XYZ.Dot (Vref.coord) >= 0.0) return Ang;

View File

@@ -146,7 +146,7 @@ inline Standard_Boolean gp_Dir::IsNormal
(const gp_Dir& Other,
const Standard_Real AngularTolerance) const
{
Standard_Real Ang = Standard_PI / 2.0 - Angle (Other);
Standard_Real Ang = M_PI / 2.0 - Angle (Other);
if (Ang < 0) Ang = - Ang;
return Ang <= AngularTolerance;
}
@@ -154,14 +154,14 @@ inline Standard_Boolean gp_Dir::IsNormal
inline Standard_Boolean gp_Dir::IsOpposite
(const gp_Dir& Other,
const Standard_Real AngularTolerance) const
{ return Standard_PI - Angle (Other) <= AngularTolerance; }
{ return M_PI - Angle (Other) <= AngularTolerance; }
inline Standard_Boolean gp_Dir::IsParallel
(const gp_Dir& Other,
const Standard_Real AngularTolerance) const
{
Standard_Real Ang = Angle (Other);
return Ang <= AngularTolerance || Standard_PI - Ang <= AngularTolerance;
return Ang <= AngularTolerance || M_PI - Ang <= AngularTolerance;
}
inline void gp_Dir::Cross (const gp_Dir& Right)

View File

@@ -20,8 +20,8 @@ Standard_Real gp_Dir2d::Angle (const gp_Dir2d& Other) const
else {
if (Cosinus > 0.0) return asin (Sinus);
else {
if (Sinus > 0.0) return Standard_PI - asin (Sinus);
else return -Standard_PI - asin (Sinus);
if (Sinus > 0.0) return M_PI - asin (Sinus);
else return -M_PI - asin (Sinus);
}
}
}

View File

@@ -122,7 +122,7 @@ inline Standard_Boolean gp_Dir2d::IsNormal
{
Standard_Real Ang = Angle(Other);
if (Ang < 0) Ang = - Ang;
Ang = Standard_PI / 2.0 - Ang;
Ang = M_PI / 2.0 - Ang;
if (Ang < 0) Ang = - Ang;
return Ang <= AngularTolerance;
}
@@ -133,7 +133,7 @@ inline Standard_Boolean gp_Dir2d::IsOpposite
{
Standard_Real Ang = Angle(Other);
if (Ang < 0) Ang = - Ang;
return Standard_PI - Ang <= AngularTolerance;
return M_PI - Ang <= AngularTolerance;
}
inline Standard_Boolean gp_Dir2d::IsParallel
@@ -142,7 +142,7 @@ inline Standard_Boolean gp_Dir2d::IsParallel
{
Standard_Real Ang = Angle(Other);
if (Ang < 0) Ang = - Ang;
return Ang <= AngularTolerance || Standard_PI - Ang <= AngularTolerance;
return Ang <= AngularTolerance || M_PI - Ang <= AngularTolerance;
}
inline Standard_Real gp_Dir2d::Crossed (const gp_Dir2d& Right) const

View File

@@ -23,7 +23,7 @@ inline gp_Elips::gp_Elips (const gp_Ax2& A2,
}
inline Standard_Real gp_Elips::Area() const
{ return Standard_PI * majorRadius * minorRadius; }
{ return M_PI * majorRadius * minorRadius; }
inline Standard_Real gp_Elips::MajorRadius() const
{ return majorRadius; }

View File

@@ -58,7 +58,7 @@ inline void gp_Elips2d::SetYAxis (const gp_Ax2d& A)
{ pos.SetYAxis(A); }
inline Standard_Real gp_Elips2d::Area() const
{ return Standard_PI * majorRadius * minorRadius; }
{ return M_PI * majorRadius * minorRadius; }
inline gp_Ax2d gp_Elips2d::Directrix1() const
{

View File

@@ -22,7 +22,7 @@ inline void gp_Sphere::SetRadius (const Standard_Real R)
}
inline Standard_Real gp_Sphere::Area () const
{ return 4.0 * Standard_PI * radius * radius; }
{ return 4.0 * M_PI * radius * radius; }
inline void gp_Sphere::UReverse()
{ pos.YReverse(); }
@@ -43,7 +43,7 @@ inline Standard_Real gp_Sphere::Radius () const
{ return radius; }
inline Standard_Real gp_Sphere::Volume () const
{ return (4.0 * Standard_PI * radius * radius * radius) / 3.0; }
{ return (4.0 * M_PI * radius * radius * radius) / 3.0; }
inline gp_Ax1 gp_Sphere::XAxis () const
{ return gp_Ax1(pos.Location(), pos.XDirection()); }

View File

@@ -40,7 +40,7 @@ inline void gp_Torus::SetPosition (const gp_Ax3& A3)
{ pos = A3; }
inline Standard_Real gp_Torus::Area () const
{ return 4.0 * Standard_PI * Standard_PI * minorRadius * majorRadius; }
{ return 4.0 * M_PI * M_PI * minorRadius * majorRadius; }
inline void gp_Torus::UReverse()
{ pos.YReverse(); }
@@ -67,7 +67,7 @@ inline Standard_Real gp_Torus::MinorRadius () const
{ return minorRadius; }
inline Standard_Real gp_Torus::Volume () const
{ return (Standard_PI * minorRadius * minorRadius) * (2.0 * Standard_PI * majorRadius); }
{ return (M_PI * minorRadius * minorRadius) * (2.0 * M_PI * majorRadius); }
inline gp_Ax1 gp_Torus::XAxis () const
{ return gp_Ax1(pos.Location(), pos.XDirection()); }

View File

@@ -77,7 +77,7 @@ inline Standard_Boolean gp_Vec::IsNormal
(const gp_Vec& Other,
const Standard_Real AngularTolerance) const
{
Standard_Real Ang = Standard_PI / 2.0 - Angle(Other);
Standard_Real Ang = M_PI / 2.0 - Angle(Other);
if (Ang < 0) Ang = - Ang;
return Ang <= AngularTolerance;
}
@@ -86,7 +86,7 @@ inline Standard_Boolean gp_Vec::IsOpposite
(const gp_Vec& Other,
const Standard_Real AngularTolerance) const
{
Standard_Real Ang = Standard_PI - Angle(Other);
Standard_Real Ang = M_PI - Angle(Other);
return Ang <= AngularTolerance;
}
@@ -95,7 +95,7 @@ inline Standard_Boolean gp_Vec::IsParallel
const Standard_Real AngularTolerance) const
{
Standard_Real Ang = Angle (Other);
return Ang <= AngularTolerance || Standard_PI - Ang <= AngularTolerance;
return Ang <= AngularTolerance || M_PI - Ang <= AngularTolerance;
}
inline Standard_Real gp_Vec::Angle (const gp_Vec& Other) const

View File

@@ -56,8 +56,8 @@ Standard_Real gp_Vec2d::Angle (const gp_Vec2d& Other) const
if (Cosinus > 0.0) return asin (Sinus);
else
{
if (Sinus > 0.0) return PI - asin (Sinus);
else return - PI - asin (Sinus);
if (Sinus > 0.0) return M_PI - asin (Sinus);
else return - M_PI - asin (Sinus);
}
}
}

View File

@@ -62,7 +62,7 @@ inline Standard_Boolean gp_Vec2d::IsNormal
{
Standard_Real Ang = Angle(Other);
if (Ang < 0) Ang = - Ang;
Ang = Standard_PI / 2.0 - Angle(Other);
Ang = M_PI / 2.0 - Angle(Other);
if (Ang < 0) Ang = - Ang;
return Ang <= AngularTolerance;
}
@@ -73,7 +73,7 @@ inline Standard_Boolean gp_Vec2d::IsOpposite
{
Standard_Real Ang = Angle(Other);
if (Ang < 0) Ang = - Ang;
return Standard_PI - Ang <= AngularTolerance;
return M_PI - Ang <= AngularTolerance;
}
inline Standard_Boolean gp_Vec2d::IsParallel
@@ -82,7 +82,7 @@ inline Standard_Boolean gp_Vec2d::IsParallel
{
Standard_Real Ang = Angle(Other);
if (Ang < 0) Ang = - Ang;
return Ang <= AngularTolerance || Standard_PI - Ang <= AngularTolerance;
return Ang <= AngularTolerance || M_PI - Ang <= AngularTolerance;
}
inline Standard_Real gp_Vec2d::Magnitude() const