Commit | Line | Data |
---|---|---|
b311480e | 1 | // Created on: 2011-10-20 |
2 | // Created by: Sergey ZERCHANINOV | |
3 | // Copyright (c) 2011-2012 OPEN CASCADE SAS | |
4 | // | |
5 | // The content of this file is subject to the Open CASCADE Technology Public | |
6 | // License Version 6.5 (the "License"). You may not use the content of this file | |
7 | // except in compliance with the License. Please obtain a copy of the License | |
8 | // at http://www.opencascade.org and read it completely before using this file. | |
9 | // | |
10 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its | |
11 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. | |
12 | // | |
13 | // The Original Code and all software distributed under the License is | |
14 | // distributed on an "AS IS" basis, without warranty of any kind, and the | |
15 | // Initial Developer hereby disclaims all such warranties, including without | |
16 | // limitation, any warranties of merchantability, fitness for a particular | |
17 | // purpose or non-infringement. Please see the License for the specific terms | |
18 | // and conditions governing the rights and limitations under the License. | |
19 | ||
7fd59977 | 20 | |
2166f0fa | 21 | #include <OpenGl_GraphicDriver.hxx> |
7fd59977 | 22 | |
2166f0fa SK |
23 | #include <OpenGl_Group.hxx> |
24 | #include <OpenGl_TriangleStrip.hxx> | |
25 | #include <OpenGl_Mesh.hxx> | |
7fd59977 | 26 | |
27 | void OpenGl_GraphicDriver::TriangleMesh (const Graphic3d_CGroup& ACGroup, | |
2166f0fa SK |
28 | const Graphic3d_Array1OfVertex& ListVertex, |
29 | const Standard_Boolean ) | |
7fd59977 | 30 | { |
2166f0fa SK |
31 | if (ACGroup.ptrGroup) |
32 | { | |
33 | OpenGl_TriangleStrip *atstrip = new OpenGl_TriangleStrip( ListVertex ); | |
34 | ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelTriangleMesh, atstrip ); | |
7fd59977 | 35 | } |
7fd59977 | 36 | } |
37 | ||
38 | void OpenGl_GraphicDriver::TriangleMesh (const Graphic3d_CGroup& ACGroup, | |
2166f0fa SK |
39 | const Graphic3d_Array1OfVertexN& ListVertex, |
40 | const Standard_Boolean ) | |
7fd59977 | 41 | { |
2166f0fa SK |
42 | if (ACGroup.ptrGroup) |
43 | { | |
44 | OpenGl_TriangleStrip *atstrip = new OpenGl_TriangleStrip( ListVertex ); | |
45 | ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelTriangleMesh, atstrip ); | |
7fd59977 | 46 | } |
7fd59977 | 47 | } |
48 | ||
7fd59977 | 49 | void OpenGl_GraphicDriver::TriangleMesh(const Graphic3d_CGroup& ACGroup, |
2166f0fa SK |
50 | const Graphic3d_Array1OfVertexNT& ListVertex, |
51 | const Standard_Boolean ) | |
7fd59977 | 52 | { |
2166f0fa SK |
53 | if (ACGroup.ptrGroup) |
54 | { | |
55 | OpenGl_TriangleStrip *atstrip = new OpenGl_TriangleStrip( ListVertex ); | |
56 | ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelTriangleMesh, atstrip ); | |
7fd59977 | 57 | } |
7fd59977 | 58 | } |
59 | ||
60 | void OpenGl_GraphicDriver::TriangleSet (const Graphic3d_CGroup& ACGroup, | |
2166f0fa SK |
61 | const Graphic3d_Array1OfVertex& ListVertex, |
62 | const Aspect_Array1OfEdge& ListEdge, | |
63 | const Standard_Boolean ) | |
7fd59977 | 64 | { |
2166f0fa SK |
65 | if (ACGroup.ptrGroup) |
66 | { | |
67 | OpenGl_Mesh *amesh = new OpenGl_Mesh (ListVertex, ListEdge); | |
68 | ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelPolygonIndices, amesh ); | |
7fd59977 | 69 | } |
7fd59977 | 70 | } |
71 | ||
72 | void OpenGl_GraphicDriver::TriangleSet (const Graphic3d_CGroup& ACGroup, | |
2166f0fa SK |
73 | const Graphic3d_Array1OfVertexN& ListVertex, |
74 | const Aspect_Array1OfEdge& ListEdge, | |
75 | const Standard_Boolean ) | |
7fd59977 | 76 | { |
2166f0fa SK |
77 | if (ACGroup.ptrGroup) |
78 | { | |
79 | OpenGl_Mesh *amesh = new OpenGl_Mesh (ListVertex, ListEdge); | |
80 | ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelPolygonIndices, amesh ); | |
7fd59977 | 81 | } |
7fd59977 | 82 | } |
83 | ||
84 | void OpenGl_GraphicDriver::TriangleSet (const Graphic3d_CGroup& ACGroup, | |
2166f0fa SK |
85 | const Graphic3d_Array1OfVertexC& ListVertex, |
86 | const Aspect_Array1OfEdge& ListEdge, | |
87 | const Standard_Boolean ) | |
7fd59977 | 88 | { |
2166f0fa SK |
89 | if (ACGroup.ptrGroup) |
90 | { | |
91 | OpenGl_Mesh *amesh = new OpenGl_Mesh (ListVertex, ListEdge); | |
92 | ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelPolygonIndices, amesh ); | |
7fd59977 | 93 | } |
7fd59977 | 94 | } |
95 | ||
96 | void OpenGl_GraphicDriver::TriangleSet (const Graphic3d_CGroup& ACGroup, | |
2166f0fa SK |
97 | const Graphic3d_Array1OfVertexNC& ListVertex, |
98 | const Aspect_Array1OfEdge& ListEdge, | |
99 | const Standard_Boolean ) | |
7fd59977 | 100 | { |
2166f0fa SK |
101 | if (ACGroup.ptrGroup) |
102 | { | |
103 | OpenGl_Mesh *amesh = new OpenGl_Mesh (ListVertex, ListEdge); | |
104 | ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelPolygonIndices, amesh ); | |
7fd59977 | 105 | } |
7fd59977 | 106 | } |
107 | ||
7fd59977 | 108 | void OpenGl_GraphicDriver::TriangleSet(const Graphic3d_CGroup& ACGroup, |
2166f0fa SK |
109 | const Graphic3d_Array1OfVertexNT& ListVertex, |
110 | const Aspect_Array1OfEdge& ListEdge, | |
111 | const Standard_Boolean ) | |
7fd59977 | 112 | { |
2166f0fa SK |
113 | if (ACGroup.ptrGroup) |
114 | { | |
115 | OpenGl_Mesh *amesh = new OpenGl_Mesh (ListVertex, ListEdge); | |
116 | ((OpenGl_Group *)ACGroup.ptrGroup)->AddElement( TelPolygonIndices, amesh ); | |
7fd59977 | 117 | } |
7fd59977 | 118 | } |