Salome HOME
updated copyright message
[modules/gui.git] / src / GLViewer / GLViewer_Geom.h
index 759daef1a570b47a85a951575f24560f1c5987ec..6de72a1b6cadb3ec9a8b3f80ec12de9d9b81ecc8 100644 (file)
@@ -1,39 +1,39 @@
-//  Copyright (C) 2005 OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// 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_Geom.h
 // Created:   November, 2004
-
+//
 #ifndef GLVIEWER_GEOM_H
 #define GLVIEWER_GEOM_H
 
 #include "GLViewer.h"
 
-#include <qrect.h>
-#include <qvaluelist.h>
-#include <qgl.h>
+#include <QRect>
+#include <QtOpenGL>
 #include <math.h>
 
-
-#ifdef WNT
+#ifdef WIN32
 #pragma warning( disable:4251 )
 #endif
 
@@ -59,7 +59,7 @@ private:
   GLfloat myY;
 };
 
-typedef QValueList<GLViewer_Pnt> GLViewer_PntList;
+typedef QList<GLViewer_Pnt> GLViewer_PntList;
 
 /*! Class  GLViewer_Rect
 *  Substitution of QRect for OpenGL
@@ -169,6 +169,9 @@ public:
   GLViewer_Poly( const GLViewer_PntList* thePoints );
   virtual ~GLViewer_Poly();
 
+  //! Adds point to polygon
+  void              AddPoint( GLViewer_Pnt& pnt ) { myPoints->append( pnt ); }
+
   //! Returns number of point
   int               Count() const { return myPoints->count(); }
 
@@ -184,12 +187,11 @@ public:
   // Returns true if intersection of this polygon with a segment or a ray not empty
   virtual bool      HasIntersection( const GLViewer_Segment& theSegment ) const;
 
-
 private:
   GLViewer_PntList* myPoints;
 };
 
-#ifdef WNT
+#ifdef WIN32
 #pragma warning ( default:4251 )
 #endif