-// Copyright (C) 2005 OPEN CASCADE
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// Author : OPEN CASCADE
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// Author : OPEN CASCADE
// File: GLViewer_Tools.cxx
// Created: April, 2005
-
-//#include "GLViewerAfx.h"
+//
#include "GLViewer_Tools.h"
+#ifdef __APPLE__
+#include <OpenGL/gl.h>
+#else
#include <GL/gl.h>
+#endif
-#include <iostream.h>
+#include <iostream>
+#include <string.h>
/*!
Constructor
if( !myArray )
{
- cout << "Can't allocate memory: " << size << endl;
+ std::cout << "Can't allocate memory: " << size << std::endl;
myRealSize = 0;
}
else
*/
void GLViewer_LineList::print()
{
- cout << "MainCoord: " << myMainCoord <<" SIZE: " << myRealSize << " ENum: " << mySegmentNumber << " :::";
+ std::cout << "MainCoord: " << myMainCoord <<" SIZE: " << myRealSize << " ENum: " << mySegmentNumber << " :::";
for( int i = 0; i < mySegmentNumber; i++ )
- cout << " " << myArray[2*i] << " " << myArray[2*i+1] << " | ";
+ std::cout << " " << myArray[2*i] << " " << myArray[2*i+1] << " | ";
- cout << endl;
+ std::cout << std::endl;
}
/*!
*/
void GLViewer_LineField::print()
{
- cout << "My X matrix Number: " << myXSize << endl;
+ std::cout << "My X matrix Number: " << myXSize << std::endl;
for( int i = 0; i < myXSize; i++ )
myXLineArray[i]->print();
- cout << "My Y matrix Number: " << myYSize << endl;
+ std::cout << "My Y matrix Number: " << myYSize << std::endl;
for( int j = 0; j < myYSize; j++ )
myYLineArray[j]->print();
}
}
glEnd();
delete[] anArray;
- cout << "Show function" << endl;
+ std::cout << "Show function" << std::endl;
}
/*!
aCurArray[i].myLineIndex == myEndPoint.myXLineIndex &&
aCurArray[i].mySegmentindex == myEndPoint.myXSegmentIndex )
{
- cout << "Algorithm complete X!!!!!!!" << endl;
+ std::cout << "Algorithm complete X!!!!!!!" << std::endl;
myEndPoint.mySolveIndex = i;
return IS_SOLVED;
}
aCurArray[i].myLineIndex == myEndPoint.myYLineIndex &&
aCurArray[i].mySegmentindex == myEndPoint.myYSegmentIndex )
{
- cout << "Algorithm complete Y!!!!!!!" << endl;
+ std::cout << "Algorithm complete Y!!!!!!!" << std::endl;
myEndPoint.mySolveIndex = i;
return IS_SOLVED;
}
else
myCurArrayIndex = 0;
- cout << "Number of ways: " << count << endl;
+ std::cout << "Number of ways: " << count << std::endl;
if( count == 0 )
return IS_LOOP;
while( true )
{
- cout << "-----------Iteration #" << myCurCount << "-------------" << endl;
+ std::cout << "-----------Iteration #" << myCurCount << "-------------" << std::endl;
iteration();
IterationStatus is = checkComplete();