0022819: Redesign of OpenGl driver
[occt.git] / src / OpenGl / OpenGl_GraphicDriver_707.cxx
1 // File:      OpenGl_GraphicDriver_707.cxx
2 // Created:   20 October 2011
3 // Author:    Sergey ZERCHANINOV
4 // Copyright: OPEN CASCADE 2011
5
6 #include <OpenGl_GraphicDriver.hxx>
7
8 #include <OpenGl_Group.hxx>
9 #include <OpenGl_Polyline.hxx>
10
11 void OpenGl_GraphicDriver::Polyline (const Graphic3d_CGroup& ACGroup,
12                                     const Graphic3d_Array1OfVertex& AListVertex,
13                                     const Standard_Boolean )
14 {
15   if (ACGroup.ptrGroup)
16   {
17     OpenGl_Polyline *apolyline = new OpenGl_Polyline( AListVertex );
18     ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelPolyline, apolyline );
19   }
20 }
21
22 void OpenGl_GraphicDriver::Polyline (const Graphic3d_CGroup& ACGroup,
23                                     const Graphic3d_Array1OfVertexC& AListVertex,
24                                     const Standard_Boolean )
25 {
26   if (ACGroup.ptrGroup)
27   {
28     OpenGl_Polyline *apolyline = new OpenGl_Polyline( AListVertex );
29     ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelPolyline, apolyline );
30   }
31 }
32
33 void OpenGl_GraphicDriver::Polyline (const Graphic3d_CGroup& ACGroup,
34                                     const Standard_Real X1,
35                                     const Standard_Real Y1,
36                                     const Standard_Real Z1,
37                                     const Standard_Real X2,
38                                     const Standard_Real Y2,
39                                     const Standard_Real Z2,
40                                     const Standard_Boolean )
41 {
42   if (ACGroup.ptrGroup)
43   {
44     OpenGl_Polyline *apolyline = new OpenGl_Polyline( X1, Y1, Z1, X2, Y2, Z2 );
45     ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelPolyline, apolyline );
46   }
47 }