mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
This commit is contained in:
@@ -89,7 +89,7 @@ void Draw_Display::DrawMarker (const gp_Pnt2d& pt,
|
||||
// gp_Circ2d C;
|
||||
C.SetRadius(ISize);
|
||||
C.SetLocation(pt);
|
||||
Draw(C, 0, 2*PI, Standard_False);
|
||||
Draw(C, 0, 2*M_PI, Standard_False);
|
||||
break;
|
||||
#ifndef DEB
|
||||
default:
|
||||
@@ -144,7 +144,7 @@ void Draw_Display::DrawMarker (const gp_Pnt2d& pt,
|
||||
// if the circus is too small, a "plus" is drawn to mark the point
|
||||
Standard_Boolean b = (R * Zoom()) > 2;
|
||||
if(b)
|
||||
Draw(C, 0, 2*PI);
|
||||
Draw(C, 0, 2*M_PI);
|
||||
else
|
||||
DrawMarker(pt, Draw_Plus);
|
||||
}
|
||||
@@ -164,7 +164,7 @@ void Draw_Display::Draw(const gp_Circ& C, const Standard_Real A1,const Standard_
|
||||
const Standard_Boolean ModifyWithZoom)
|
||||
{
|
||||
Standard_Real A2 = A3;
|
||||
while (A2 < A1) A2 += 2*PI;
|
||||
while (A2 < A1) A2 += 2*M_PI;
|
||||
|
||||
Standard_Real angle = DEFLECTION / (C.Radius() * Zoom());
|
||||
Standard_Integer n = (Standard_Integer )( (A2 - A1) / angle);
|
||||
@@ -213,7 +213,7 @@ void Draw_Display::Draw(const gp_Circ2d& C, const Standard_Real A1, const Standa
|
||||
const Standard_Boolean ModifyWithZoom)
|
||||
{
|
||||
Standard_Real A2 = A3;
|
||||
while (A2 < A1) A2 += 2*PI;
|
||||
while (A2 < A1) A2 += 2*M_PI;
|
||||
|
||||
Standard_Real angle = DEFLECTION / (C.Radius() * Zoom());
|
||||
Standard_Integer n = (Standard_Integer )( (A2 - A1) / angle);
|
||||
|
@@ -33,7 +33,7 @@ extern Standard_Boolean Draw_Batch;
|
||||
extern Standard_Boolean Draw_BlackBackGround;
|
||||
|
||||
|
||||
#define DEFROTATE (5 * PI/ 180.)
|
||||
#define DEFROTATE (5 * M_PI/ 180.)
|
||||
#define DEFMAGNIFY 1.1
|
||||
#define DEFPANNING 0.1
|
||||
#define DEFFOCAL 1.1
|
||||
|
@@ -1193,7 +1193,7 @@ void Draw::VariableCommands(Draw_Interpretor& theCommands)
|
||||
theAxes2d->Protected(Standard_True);
|
||||
|
||||
n = "pi";
|
||||
Draw::Set(n,PI);
|
||||
Draw::Set(n,M_PI);
|
||||
Draw::Get(n)->Protected(Standard_True);
|
||||
|
||||
n = "pinf";
|
||||
|
@@ -180,135 +180,135 @@ Standard_Boolean Draw_View::Init (const char* typ)
|
||||
}
|
||||
else if (!strcmp("-Y+X",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),M_PI/2);
|
||||
}
|
||||
else if (!strcmp("-X-Y",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),PI);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),M_PI);
|
||||
}
|
||||
else if (!strcmp("+Y-X",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-M_PI/2);
|
||||
}
|
||||
else if (!strcmp("+Y+X",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("-X+Y",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI);
|
||||
}
|
||||
else if (!strcmp("-Y-X",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("+X-Y",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI);
|
||||
}
|
||||
else if (!strcmp("+X+Z",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/2);
|
||||
}
|
||||
else if (!strcmp("-Z+X",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI/2);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("-X-Z",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("+Z-X",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI/2);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("+Z+X",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI/2);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("-X+Z",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("-Z-X",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI/2);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("+X-Z",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI/2);
|
||||
}
|
||||
else if (!strcmp("+Y+Z",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/2);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("-Z+Y",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI/2);
|
||||
}
|
||||
else if (!strcmp("-Y-Z",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI/2);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("+Z-Y",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),-M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("+Z+Y",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI/2);
|
||||
}
|
||||
else if (!strcmp("-Y+Z",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/2);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("-Z-Y",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("+Y-Z",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),PI/2);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(0,1,0)),M_PI/2);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),M_PI/2);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("AXON",typ))
|
||||
{
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/4);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-PI/4);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/4);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-M_PI/4);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else if (!strcmp("PERS",typ))
|
||||
{
|
||||
FlagPers =1;
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-PI/4);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-PI/4);
|
||||
Matrix.SetRotation(gp_Ax1(Pvise,gp_Dir(1,0,0)),-M_PI/4);
|
||||
T.SetRotation(gp_Ax1(Pvise,gp_Dir(0,0,1)),-M_PI/4);
|
||||
Matrix.Multiply(T);
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user