Commit | Line | Data |
---|---|---|
b311480e | 1 | -- Created on: 1997-01-28 |
2 | -- Created by: CAL | |
3 | -- Copyright (c) 1997-1999 Matra Datavision | |
973c2be1 | 4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
7fd59977 | 5 | -- |
973c2be1 | 6 | -- This file is part of Open CASCADE Technology software library. |
b311480e | 7 | -- |
973c2be1 | 8 | -- This library is free software; you can redistribute it and / or modify it |
9 | -- under the terms of the GNU Lesser General Public version 2.1 as published | |
10 | -- by the Free Software Foundation, with special exception defined in the file | |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT | |
12 | -- distribution for complete text of the license and disclaimer of any warranty. | |
b311480e | 13 | -- |
973c2be1 | 14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. | |
b311480e | 16 | |
6942f04a | 17 | deferred class GraphicDriver from Graphic3d inherits TShared |
7fd59977 | 18 | |
19 | ---Version: | |
20 | ||
2166f0fa SK |
21 | ---Purpose: This class allows the definition of a graphic driver |
22 | -- (currently only OpenGl driver is used). | |
7fd59977 | 23 | |
2166f0fa | 24 | ---Keywords: OpenGl |
7fd59977 | 25 | |
26 | ---Warning: | |
27 | ---References: | |
28 | ||
29 | uses | |
30 | ||
31 | SharedLibrary from OSD, | |
32 | ||
33 | Array1OfInteger from TColStd, | |
34 | Array1OfReal from TColStd, | |
35 | Array2OfReal from TColStd, | |
36 | ||
f0430952 | 37 | AsciiString from TCollection, |
7fd59977 | 38 | ExtendedString from TCollection, |
39 | ||
40 | NameOfColor from Quantity, | |
41 | Color from Quantity, | |
42 | ||
43 | PlaneAngle from Quantity, | |
44 | ||
692613e5 | 45 | PixMap from Image, |
7fd59977 | 46 | |
47 | Array1OfEdge from Aspect, | |
48 | CLayer2d from Aspect, | |
7fd59977 | 49 | TypeOfTriedronEcho from Aspect, |
50 | TypeOfTriedronPosition from Aspect, | |
51 | Handle from Aspect, | |
52 | Display from Aspect, | |
7edf74fd | 53 | PrintAlgo from Aspect, |
dc3fe572 | 54 | DisplayConnection_Handle from Aspect, |
7fd59977 | 55 | |
56 | AspectLine3d from Graphic3d, | |
57 | AspectMarker3d from Graphic3d, | |
58 | AspectText3d from Graphic3d, | |
59 | AspectFillArea3d from Graphic3d, | |
60 | HorizontalTextAlignment from Graphic3d, | |
61 | CBitFields20 from Graphic3d, | |
62 | CGroup from Graphic3d, | |
63 | CLight from Graphic3d, | |
64 | CPick from Graphic3d, | |
65 | CPlane from Graphic3d, | |
66 | CStructure from Graphic3d, | |
67 | CView from Graphic3d, | |
692613e5 | 68 | BufferType from Graphic3d, |
7fd59977 | 69 | Structure from Graphic3d, |
70 | TextPath from Graphic3d, | |
71 | TypeOfComposition from Graphic3d, | |
7fd59977 | 72 | TypeOfPrimitive from Graphic3d, |
73 | Vector from Graphic3d, | |
74 | Array1OfVertex from Graphic3d, | |
75 | Array2OfVertex from Graphic3d, | |
76 | Vertex from Graphic3d, | |
7fd59977 | 77 | VerticalTextAlignment from Graphic3d, |
7fd59977 | 78 | PrimitiveArray from Graphic3d, |
79 | PtrFrameBuffer from Graphic3d, | |
80 | HArray1OfByte from TColStd, | |
81 | FillMethod from Aspect, | |
82 | GradientFillMethod from Aspect, | |
83 | ExportFormat from Graphic3d, | |
84 | SortType from Graphic3d, | |
85 | HArray1OfReal from TColStd, | |
86 | CUserDraw from Graphic3d, | |
87 | NListOfHAsciiString from Graphic3d, | |
eeaaaefb | 88 | FontAspect from Font, |
4269bd1b | 89 | CGraduatedTrihedron from Graphic3d, |
938d4544 | 90 | ClipPlane from Graphic3d, |
91 | Ax2 from gp | |
7fd59977 | 92 | |
93 | raises | |
94 | ||
95 | TransformError from Graphic3d | |
96 | ||
97 | is | |
98 | Initialize ( AShrName : CString from Standard ) | |
99 | returns mutable GraphicDriver from Graphic3d; | |
100 | ---Level: Public | |
101 | ---Purpose: Initialises the Driver | |
102 | ||
103 | ------------------------- | |
104 | -- Category: Init methods | |
105 | ------------------------- | |
106 | ||
dc3fe572 | 107 | Begin (me: mutable; |
108 | theDisplayConnection: DisplayConnection_Handle from Aspect) | |
109 | returns Boolean from Standard | |
110 | is deferred; | |
111 | ---Purpose: Starts graphic driver with given connection | |
7fd59977 | 112 | |
113 | End ( me : mutable ) | |
114 | is deferred; | |
115 | ---Purpose: call_togl_end | |
116 | ||
117 | ---------------------------- | |
118 | -- Category: Inquire methods | |
119 | ---------------------------- | |
120 | ||
121 | InquireLightLimit ( me : mutable ) | |
122 | returns Integer from Standard | |
123 | is deferred; | |
124 | ---Purpose: call_togl_inquirelight | |
125 | ||
126 | InquireMat ( me : mutable; | |
127 | ACView : CView from Graphic3d; | |
128 | AMatO : out Array2OfReal from TColStd; | |
129 | AMatM : out Array2OfReal from TColStd ) | |
130 | is deferred; | |
131 | ---Purpose: call_togl_inquiremat | |
132 | ||
133 | InquirePlaneLimit ( me : mutable ) | |
134 | returns Integer from Standard | |
135 | is deferred; | |
136 | ---Purpose: call_togl_inquireplane | |
137 | ||
138 | InquireViewLimit ( me : mutable ) | |
139 | returns Integer from Standard | |
140 | is deferred; | |
141 | ---Purpose: call_togl_inquireview | |
142 | ||
7fd59977 | 143 | ------------------------------ |
144 | -- Category: Highlight methods | |
145 | ------------------------------ | |
146 | ||
147 | Blink ( me : mutable; | |
148 | ACStructure : CStructure from Graphic3d; | |
149 | Create : Boolean from Standard ) | |
150 | is deferred; | |
151 | ---Purpose: call_togl_blink | |
152 | ||
153 | BoundaryBox ( me : mutable; | |
154 | ACStructure : CStructure from Graphic3d; | |
155 | Create : Boolean from Standard ) | |
156 | is deferred; | |
157 | ---Purpose: call_togl_boundarybox | |
158 | ||
159 | HighlightColor ( me : mutable; | |
160 | ACStructure : CStructure from Graphic3d; | |
161 | R : ShortReal from Standard; | |
162 | G : ShortReal from Standard; | |
163 | B : ShortReal from Standard; | |
164 | Create : Boolean from Standard ) | |
165 | is deferred; | |
166 | ---Purpose: call_togl_highlightcolor | |
167 | ||
168 | NameSetStructure ( me : mutable; | |
169 | ACStructure : CStructure from Graphic3d ) | |
170 | is deferred; | |
171 | ---Purpose: call_togl_namesetstructure | |
172 | ||
173 | ------------------------------------- | |
174 | -- Category: Group management methods | |
175 | ------------------------------------- | |
176 | ||
177 | ClearGroup ( me : mutable; | |
178 | ACGroup : CGroup from Graphic3d ) | |
179 | is deferred; | |
180 | ---Purpose: call_togl_cleargroup | |
181 | ||
7fd59977 | 182 | FaceContextGroup ( me : mutable; |
183 | ACGroup : CGroup from Graphic3d; | |
184 | NoInsert : Integer from Standard ) | |
185 | is deferred; | |
186 | ---Purpose: call_togl_facecontextgroup | |
187 | ||
188 | Group ( me : mutable; | |
189 | ACGroup : in out CGroup from Graphic3d ) | |
190 | is deferred; | |
191 | ---Purpose: call_togl_group | |
192 | ||
193 | LineContextGroup ( me : mutable; | |
194 | ACGroup : CGroup from Graphic3d; | |
195 | NoInsert : Integer from Standard ) | |
196 | is deferred; | |
197 | ---Purpose: call_togl_linecontextgroup | |
198 | ||
199 | MarkerContextGroup ( me : mutable; | |
200 | ACGroup : CGroup from Graphic3d; | |
201 | NoInsert : Integer from Standard ) | |
202 | is deferred; | |
203 | ---Purpose: call_togl_markercontextgroup | |
204 | ||
7fd59977 | 205 | RemoveGroup ( me : mutable; |
206 | ACGroup : CGroup from Graphic3d ) | |
207 | is deferred; | |
208 | ---Purpose: call_togl_removegroup | |
209 | ||
210 | TextContextGroup ( me : mutable; | |
211 | ACGroup : CGroup from Graphic3d; | |
212 | NoInsert : Integer from Standard ) | |
213 | is deferred; | |
214 | ---Purpose: call_togl_textcontextgroup | |
215 | ||
216 | ----------------------------------------- | |
217 | -- Category: Structure management methods | |
218 | ----------------------------------------- | |
219 | ||
220 | ClearStructure ( me : mutable; | |
221 | ACStructure : CStructure from Graphic3d ) | |
222 | is deferred; | |
223 | ---Purpose: call_togl_clearstructure | |
224 | ||
225 | Connect ( me : mutable; | |
226 | AFather : CStructure from Graphic3d; | |
227 | ASon : CStructure from Graphic3d ) | |
228 | is deferred; | |
229 | ---Purpose: call_togl_connect | |
230 | ||
231 | ContextStructure ( me : mutable; | |
232 | ACStructure : CStructure from Graphic3d ) | |
233 | is deferred; | |
234 | ---Purpose: call_togl_contextstructure | |
235 | ||
236 | Disconnect ( me : mutable; | |
237 | AFather : CStructure from Graphic3d; | |
238 | ASon : CStructure from Graphic3d ) | |
239 | is deferred; | |
240 | ---Purpose: call_togl_disconnect | |
241 | ||
242 | DisplayStructure ( me : mutable; | |
243 | ACView : CView from Graphic3d; | |
244 | ACStructure : CStructure from Graphic3d; | |
245 | APriority : Integer from Standard ) | |
246 | is deferred; | |
247 | ---Purpose: call_togl_displaystructure | |
248 | ||
249 | EraseStructure ( me : mutable; | |
250 | ACView : CView from Graphic3d; | |
251 | ACStructure : CStructure from Graphic3d ) | |
252 | is deferred; | |
253 | ---Purpose: call_togl_erasestructure | |
254 | ||
255 | RemoveStructure ( me : mutable; | |
256 | ACStructure : CStructure from Graphic3d ) | |
257 | is deferred; | |
258 | ---Purpose: call_togl_removestructure | |
259 | ||
260 | Structure ( me : mutable; | |
261 | ACStructure : in out CStructure from Graphic3d ) | |
262 | is deferred; | |
263 | ---Purpose: call_togl_structure | |
264 | ||
7fd59977 | 265 | ------------------------------------ |
266 | -- Category: Structured mode methods | |
267 | ------------------------------------ | |
268 | ||
269 | ActivateView ( me : mutable; | |
270 | ACView : CView from Graphic3d ) | |
271 | is deferred; | |
272 | ---Purpose: call_togl_activateview | |
273 | ||
274 | AntiAliasing ( me : mutable; | |
275 | ACView : CView from Graphic3d; | |
276 | AFlag : Boolean from Standard ) | |
277 | is deferred; | |
278 | ---Purpose: call_togl_antialiasing | |
279 | ||
280 | Background ( me : mutable; | |
281 | ACView : CView from Graphic3d ) | |
282 | is deferred; | |
283 | ---Purpose: call_togl_background | |
284 | ||
285 | GradientBackground ( me : mutable; | |
286 | ACView : CView from Graphic3d; | |
287 | AColor1: Color from Quantity; | |
288 | AColor2: Color from Quantity; | |
289 | FillStyle : GradientFillMethod from Aspect | |
290 | ) | |
2166f0fa | 291 | is deferred; |
7fd59977 | 292 | ---Purpose: call_togl_gradient_background |
293 | ||
294 | ||
295 | BackgroundImage( me : mutable; | |
296 | FileName : CString from Standard; | |
297 | ACView : CView from Graphic3d; | |
298 | FillStyle : FillMethod from Aspect ) | |
299 | is deferred; | |
300 | ||
301 | SetBgImageStyle( me : mutable; | |
302 | ACView : CView from Graphic3d; | |
303 | FillStyle : FillMethod from Aspect ) | |
304 | is deferred; | |
305 | ||
306 | SetBgGradientStyle( me : mutable; | |
307 | ACView : CView from Graphic3d; | |
308 | FillStyle : GradientFillMethod from Aspect ) | |
2166f0fa | 309 | is deferred; |
7fd59977 | 310 | |
311 | ClipLimit ( me : mutable; | |
312 | ACView : CView from Graphic3d; | |
313 | AWait : Boolean from Standard ) | |
314 | is deferred; | |
315 | ---Purpose: call_togl_cliplimit | |
316 | ||
317 | DeactivateView ( me : mutable; | |
318 | ACView : CView from Graphic3d ) | |
319 | is deferred; | |
320 | ---Purpose: call_togl_deactivateview | |
321 | ||
322 | DepthCueing ( me : mutable; | |
323 | ACView : CView from Graphic3d; | |
324 | AFlag : Boolean from Standard ) | |
325 | is deferred; | |
326 | ---Purpose: call_togl_cliplimit | |
327 | ||
328 | ProjectRaster ( me : mutable; | |
329 | ACView : CView from Graphic3d; | |
330 | AX : ShortReal from Standard; | |
331 | AY : ShortReal from Standard; | |
332 | AZ : ShortReal from Standard; | |
333 | AU : out Integer from Standard; | |
334 | AV : out Integer from Standard ) | |
335 | returns Boolean from Standard | |
336 | is deferred; | |
337 | ---Purpose: call_togl_unproject_raster | |
338 | ||
339 | UnProjectRaster ( me : mutable; | |
340 | ACView : CView from Graphic3d; | |
341 | Axm : Integer from Standard; | |
342 | Aym : Integer from Standard; | |
343 | AXM : Integer from Standard; | |
344 | AYM : Integer from Standard; | |
345 | AU : Integer from Standard; | |
346 | AV : Integer from Standard; | |
347 | AX : out ShortReal from Standard; | |
348 | AY : out ShortReal from Standard; | |
349 | AZ : out ShortReal from Standard ) | |
350 | returns Boolean from Standard | |
351 | is deferred; | |
352 | ---Purpose: call_togl_unproject_raster | |
353 | ||
354 | UnProjectRasterWithRay ( me : mutable; | |
355 | ACView : CView from Graphic3d; | |
356 | Axm : Integer from Standard; | |
357 | Aym : Integer from Standard; | |
358 | AXM : Integer from Standard; | |
359 | AYM : Integer from Standard; | |
360 | AU : Integer from Standard; | |
361 | AV : Integer from Standard; | |
362 | AX : out ShortReal from Standard; | |
363 | AY : out ShortReal from Standard; | |
364 | AZ : out ShortReal from Standard; | |
365 | DX : out ShortReal from Standard; | |
366 | DY : out ShortReal from Standard; | |
367 | DZ : out ShortReal from Standard ) | |
368 | returns Boolean from Standard | |
369 | is deferred; | |
370 | ---Purpose: call_togl_unproject_raster_with_ray | |
371 | ||
372 | RatioWindow ( me : mutable; | |
373 | ACView : CView from Graphic3d ) | |
374 | is deferred; | |
375 | ---Purpose: call_togl_ratio_window | |
376 | ||
377 | Redraw ( me : mutable; | |
378 | ACView : CView from Graphic3d; | |
379 | ACUnderLayer : CLayer2d from Aspect; | |
380 | ACOverLayer : CLayer2d from Aspect; | |
381 | x : Integer = 0; | |
382 | y : Integer = 0; | |
383 | width : Integer = 0; | |
384 | height : Integer = 0 ) | |
385 | is deferred; | |
386 | ---Purpose: call_togl_redraw | |
387 | -- Warning: when the redraw area has a null size, the full view is redrawn | |
388 | ||
389 | RemoveView ( me : mutable; | |
390 | ACView : CView from Graphic3d ) | |
391 | is deferred; | |
392 | ---Purpose: call_togl_removeview | |
393 | ||
394 | SetLight ( me : mutable; | |
395 | ACView : CView from Graphic3d ) | |
396 | is deferred; | |
397 | ---Purpose: call_togl_setlight | |
398 | ||
4269bd1b | 399 | SetClipPlanes (me : mutable; theCView : CView from Graphic3d) is deferred; |
400 | ---Purpose: Pass clip planes to the associated graphic driver view. | |
401 | ||
402 | SetClipPlanes (me : mutable; theCStructure : CStructure from Graphic3d) is deferred; | |
403 | ---Purpose: Pass clip planes to the associated graphic driver structure. | |
7fd59977 | 404 | |
405 | SetVisualisation ( me : mutable; | |
406 | ACView : CView from Graphic3d ) | |
407 | is deferred; | |
408 | ---Purpose: call_togl_setvisualisation | |
409 | ||
410 | TransformStructure ( me : mutable; | |
411 | ACStructure : CStructure from Graphic3d ) | |
412 | is deferred; | |
413 | ---Purpose: call_togl_transformstructure | |
414 | ||
7fd59977 | 415 | Transparency ( me : mutable; |
416 | ACView : CView from Graphic3d; | |
417 | AFlag : Boolean from Standard ) | |
418 | is deferred; | |
419 | ---Purpose: call_togl_transparency | |
420 | ||
421 | Update ( me : mutable; | |
422 | ACView : CView from Graphic3d; | |
423 | ACUnderLayer : CLayer2d from Aspect; | |
424 | ACOverLayer : CLayer2d from Aspect ) | |
425 | is deferred; | |
426 | ---Purpose: call_togl_update | |
427 | ||
428 | View ( me : mutable; | |
429 | ACView : in out CView from Graphic3d ) | |
430 | returns Boolean from Standard | |
431 | is deferred; | |
432 | ---Purpose: call_togl_view | |
433 | ||
434 | ViewMapping ( me : mutable; | |
435 | ACView : CView from Graphic3d; | |
436 | AWait : Boolean from Standard ) | |
437 | is deferred; | |
438 | ---Purpose: call_togl_viewmapping | |
439 | ||
440 | ViewOrientation ( me : mutable; | |
441 | ACView : CView from Graphic3d; | |
442 | AWait : Boolean from Standard ) | |
443 | is deferred; | |
444 | ---Purpose: call_togl_vieworientation | |
445 | ||
446 | Environment ( me : mutable; | |
447 | ACView : CView from Graphic3d ) | |
448 | is deferred; | |
449 | ---Purpose: | |
450 | ||
a6eb515f | 451 | SetStencilTestOptions ( me : mutable; |
452 | theCGroup : CGroup from Graphic3d; | |
453 | theIsEnabled: Boolean from Standard) | |
454 | is deferred; | |
455 | ---Purpose: sets the stencil test to theIsEnabled state; | |
938d4544 | 456 | |
457 | SetFlippingOptions (me : mutable; | |
458 | theCGroup : CGroup from Graphic3d; | |
459 | theIsEnabled: Boolean from Standard; | |
460 | theRefPlane : Ax2 from gp) | |
461 | is deferred; | |
462 | ---Purpose: sets the flipping to theIsEnabled state for the given graphic group. | |
a6eb515f | 463 | |
7fd59977 | 464 | ---------------------------------------- |
465 | -- Category: Methods to create Text | |
466 | -- for Purpose : see Graphic3d_Group.cdl | |
467 | ---------------------------------------- | |
468 | ||
469 | Text ( me : mutable; | |
470 | ACGroup : CGroup from Graphic3d; | |
471 | AText : CString from Standard; | |
472 | APoint : Vertex from Graphic3d; | |
473 | AHeight : Real from Standard; | |
474 | AAngle : PlaneAngle from Quantity; | |
475 | ATp : TextPath from Graphic3d; | |
476 | AHta : HorizontalTextAlignment from Graphic3d; | |
477 | AVta : VerticalTextAlignment from Graphic3d; | |
478 | EvalMinMax : Boolean from Standard = Standard_True ) | |
479 | is deferred; | |
480 | ---Purpose: call_togl_text | |
481 | ||
482 | Text ( me : mutable; | |
483 | ACGroup : CGroup from Graphic3d; | |
484 | AText : CString from Standard; | |
485 | APoint : Vertex from Graphic3d; | |
486 | AHeight : Real from Standard; | |
487 | EvalMinMax : Boolean from Standard = Standard_True ) | |
488 | is deferred; | |
489 | ---Purpose: call_togl_text | |
490 | ||
491 | Text ( me : mutable; | |
492 | ACGroup : CGroup from Graphic3d; | |
493 | AText : ExtendedString from TCollection; | |
494 | APoint : Vertex from Graphic3d; | |
495 | AHeight : Real from Standard; | |
496 | AAngle : PlaneAngle from Quantity; | |
497 | ATp : TextPath from Graphic3d; | |
498 | AHta : HorizontalTextAlignment from Graphic3d; | |
499 | AVta : VerticalTextAlignment from Graphic3d; | |
500 | EvalMinMax : Boolean from Standard = Standard_True ) | |
501 | is deferred; | |
502 | ---Purpose: call_togl_text | |
503 | ||
504 | Text ( me : mutable; | |
505 | ACGroup : CGroup from Graphic3d; | |
506 | AText : ExtendedString from TCollection; | |
507 | APoint : Vertex from Graphic3d; | |
508 | AHeight : Real from Standard; | |
509 | EvalMinMax : Boolean from Standard = Standard_True ) | |
510 | is deferred; | |
511 | ---Purpose: call_togl_text | |
512 | ||
513 | ---------------------------------------- | |
514 | ---Category: Methods to create Triangle | |
515 | -- for Purpose : see Graphic3d_Group.cdl | |
516 | ---------------------------------------- | |
517 | ||
7fd59977 | 518 | PrimitiveArray( me : mutable; |
519 | ACGroup : CGroup from Graphic3d; | |
520 | parray : PrimitiveArray from Graphic3d; | |
521 | EvalMinMax : Boolean from Standard = Standard_True ) | |
522 | is deferred; | |
523 | ---Purpose: call_togl_parray | |
524 | ||
525 | UserDraw( me : mutable; | |
526 | ACGroup : CGroup from Graphic3d; | |
527 | AUserDraw : CUserDraw from Graphic3d ) | |
528 | is deferred; | |
529 | ---Purpose: call_togl_userdraw | |
530 | ||
531 | EnableVBO( me : mutable; | |
532 | status : Boolean from Standard ) | |
2166f0fa | 533 | is deferred; |
7fd59977 | 534 | ---Purpose: enables/disables usage of OpenGL vertex buffer arrays while drawing primitiev arrays |
535 | ||
f0430952 | 536 | MemoryInfo (me; |
537 | theFreeBytes : out Size from Standard; | |
538 | theInfo : out AsciiString from TCollection) returns Boolean from Standard is deferred; | |
539 | ---Purpose: Returns information about GPU memory usage. | |
540 | ||
7fd59977 | 541 | ---------------------------------------- |
542 | ---Category: Methods to create Triedron | |
543 | -- for Purpose : see Graphic3d_Group.cdl | |
544 | ---------------------------------------- | |
545 | ||
546 | ZBufferTriedronSetup ( me : mutable; | |
547 | XColor : NameOfColor from Quantity = Quantity_NOC_RED; | |
548 | YColor : NameOfColor from Quantity = Quantity_NOC_GREEN; | |
549 | ZColor : NameOfColor from Quantity = Quantity_NOC_BLUE1; | |
550 | SizeRatio : Real from Standard = 0.8; | |
551 | AxisDiametr : Real from Standard = 0.05; | |
552 | NbFacettes : Integer from Standard = 12) | |
553 | is deferred; | |
554 | ---Purpose: call_togl_ztriedron_setup | |
555 | ||
556 | TriedronDisplay ( me : mutable; | |
557 | ACView : CView from Graphic3d; | |
558 | APosition : TypeOfTriedronPosition from Aspect = Aspect_TOTP_CENTER; | |
559 | AColor : NameOfColor from Quantity = Quantity_NOC_WHITE ; | |
560 | AScale : Real from Standard = 0.02; | |
561 | AsWireframe : Boolean from Standard = Standard_True ) | |
562 | is deferred; | |
563 | ---Purpose: call_togl_triedron_display | |
564 | ||
565 | ||
566 | TriedronErase ( me : mutable; | |
567 | ACView : CView from Graphic3d) | |
568 | is deferred; | |
569 | ---Purpose: call_togl_triedron_erase | |
570 | ||
571 | ||
572 | TriedronEcho ( me : mutable; | |
573 | ACView : CView from Graphic3d; | |
574 | AType : TypeOfTriedronEcho from Aspect = Aspect_TOTE_NONE ) | |
575 | is deferred; | |
576 | ---Purpose: call_togl_triedron_echo | |
577 | ||
578 | --------------------------------- | |
579 | ---Category: Graduated trihedron | |
580 | --------------------------------- | |
581 | ||
7fd59977 | 582 | GraduatedTrihedronDisplay(me : mutable; |
583 | view : CView from Graphic3d; | |
13a22457 | 584 | cubic : CGraduatedTrihedron from Graphic3d) |
7fd59977 | 585 | ---Purpose: call_togl_graduatedtrihedron_display |
586 | is deferred; | |
587 | ||
588 | GraduatedTrihedronErase(me : mutable; | |
589 | view : CView from Graphic3d) | |
590 | ---Purpose: call_togl_graduatedtrihedron_erase | |
591 | is deferred; | |
592 | ||
593 | GraduatedTrihedronMinMaxValues(me : mutable; | |
594 | xmin : ShortReal from Standard; | |
595 | ymin : ShortReal from Standard; | |
596 | zmin : ShortReal from Standard; | |
597 | xmax : ShortReal from Standard; | |
598 | ymax : ShortReal from Standard; | |
599 | zmax : ShortReal from Standard) | |
600 | ---Purpose: call_togl_graduatedtrihedron_minmaxvalues | |
601 | is deferred; | |
602 | ||
7fd59977 | 603 | ---------------------------------- |
604 | -- Category: Ajout mode methods | |
605 | ---------------------------------- | |
606 | ||
607 | BeginAddMode ( me : mutable; | |
608 | ACView : CView from Graphic3d) | |
609 | returns Boolean from Standard | |
610 | is deferred; | |
611 | ---Purpose: call_togl_begin_ajout_mode | |
612 | ||
613 | EndAddMode ( me : mutable) | |
614 | is deferred; | |
615 | ---Purpose: call_togl_end_ajout_mode | |
616 | ||
617 | ---------------------------------- | |
618 | -- Category: Immediat mode methods | |
619 | ---------------------------------- | |
620 | ||
1981cb22 | 621 | SetImmediateModeDrawToFront (me : mutable; |
622 | theCView : CView from Graphic3d; | |
623 | theDrawToFrontBuffer : Boolean from Standard) | |
624 | returns Boolean from Standard | |
625 | is deferred; | |
626 | ---Purpose: @param theDrawToFrontBuffer Advanced option to modify rendering mode: | |
627 | -- 1. TRUE. Drawing immediate mode structures directly to the front buffer over the scene image. | |
628 | -- Fast, so preferred for interactive work (used by default). | |
629 | -- However these extra drawings will be missed in image dump since it is performed from back buffer. | |
630 | -- Notice that since no pre-buffering used the V-Sync will be ignored and rendering could be seen | |
631 | -- in run-time (in case of slow hardware) and/or tearing may appear. | |
632 | -- So this is strongly recommended to draw only simple (fast) structures. | |
633 | -- 2. FALSE. Drawing immediate mode structures to the back buffer. | |
634 | -- The complete scene is redrawn first, so this mode is slower if scene contains complex data and/or V-Sync is turned on. | |
635 | -- But it works in any case and is especially useful for view dump because the dump image is read from the back buffer. | |
636 | -- @return previous mode. | |
637 | ||
7fd59977 | 638 | BeginImmediatMode ( me : mutable; |
639 | ACView : CView from Graphic3d; | |
640 | ACUnderLayer : CLayer2d from Aspect; | |
641 | ACOverLayer : CLayer2d from Aspect; | |
642 | DoubleBuffer : Boolean from Standard; | |
643 | RetainMode : Boolean from Standard) | |
644 | returns Boolean from Standard | |
645 | is deferred; | |
646 | ---Purpose: call_togl_begin_immediat_mode | |
647 | ||
7fd59977 | 648 | ClearImmediatMode ( me : mutable; ACView : CView from Graphic3d; |
649 | aFlush : Boolean from Standard = Standard_True) | |
650 | is deferred; | |
651 | ---Purpose: call_togl_clear_immediat_mode | |
652 | ||
7fd59977 | 653 | DrawStructure ( me : mutable; |
654 | ACStructure : CStructure from Graphic3d ) | |
655 | is deferred; | |
656 | ---Purpose: call_togl_draw_structure | |
657 | ||
658 | EndImmediatMode ( me : mutable; | |
659 | Synchronize : Integer from Standard ) | |
660 | is deferred; | |
661 | ---Purpose: call_togl_end_immediat_mode | |
662 | ||
7fd59977 | 663 | ------------------------------- |
664 | -- Category: Layer mode methods | |
665 | ------------------------------- | |
666 | ||
667 | Layer ( me : mutable; | |
668 | ACLayer : in out CLayer2d from Aspect ) | |
669 | is deferred; | |
670 | ---Purpose: call_togl_layer2d | |
671 | ||
672 | RemoveLayer ( me : mutable; | |
673 | ACLayer : CLayer2d from Aspect ) | |
674 | is deferred; | |
675 | ---Purpose: call_togl_removelayer2d | |
676 | ||
677 | BeginLayer ( me : mutable; | |
678 | ACLayer : CLayer2d from Aspect ) | |
679 | is deferred; | |
680 | ---Purpose: call_togl_begin_layer2d | |
681 | ||
682 | BeginPolygon2d ( me : mutable ) | |
683 | is deferred; | |
684 | ---Purpose: call_togl_begin_polygon2d | |
685 | ||
686 | BeginPolyline2d ( me : mutable ) | |
687 | is deferred; | |
688 | ---Purpose: call_togl_begin_polyline2d | |
689 | ||
690 | ClearLayer ( me : mutable; | |
691 | ACLayer : CLayer2d from Aspect ) | |
692 | is deferred; | |
693 | ---Purpose: call_togl_clear_layer2d | |
694 | ||
695 | Draw ( me : mutable; | |
696 | X : ShortReal from Standard; | |
697 | Y : ShortReal from Standard ) | |
698 | is deferred; | |
699 | ---Purpose: call_togl_draw2d | |
700 | ||
701 | Edge ( me : mutable; | |
702 | X : ShortReal from Standard; | |
703 | Y : ShortReal from Standard ) | |
704 | is deferred; | |
705 | ---Purpose: call_togl_edge2d | |
706 | ||
707 | EndLayer ( me : mutable ) | |
708 | is deferred; | |
709 | ---Purpose: call_togl_end_layer2d | |
710 | ||
711 | EndPolygon2d ( me : mutable ) | |
712 | is deferred; | |
713 | ---Purpose: call_togl_end_polygon2d | |
714 | ||
715 | EndPolyline2d ( me : mutable ) | |
716 | is deferred; | |
717 | ---Purpose: call_togl_end_polyline2d | |
718 | ||
719 | Move ( me : mutable; | |
720 | X : ShortReal from Standard; | |
721 | Y : ShortReal from Standard ) | |
722 | is deferred; | |
723 | ---Purpose: call_togl_move2d | |
724 | ||
725 | Rectangle ( me : mutable; | |
726 | X, Y : ShortReal from Standard; | |
727 | Width, Height : ShortReal from Standard ) | |
728 | is deferred; | |
729 | ---Purpose: call_togl_rectangle2d | |
730 | ||
731 | SetColor ( me : mutable; | |
732 | R : ShortReal from Standard; | |
733 | G : ShortReal from Standard; | |
734 | B : ShortReal from Standard ) | |
735 | is deferred; | |
736 | ---Purpose: call_togl_set_color | |
737 | ||
738 | SetTransparency ( me : mutable; | |
739 | ATransparency : ShortReal from Standard ) | |
740 | is deferred; | |
741 | ---Purpose: call_togl_set_transparency | |
742 | ||
743 | UnsetTransparency ( me : mutable ) | |
744 | is deferred; | |
745 | ---Purpose: call_togl_unset_transparency | |
746 | ||
747 | SetLineAttributes ( me : mutable; | |
748 | Type : Integer from Standard; | |
749 | Width : ShortReal from Standard ) | |
750 | is deferred; | |
751 | ---Purpose: call_togl_set_line_attributes | |
752 | ||
753 | ||
754 | SetTextAttributes ( me : mutable; | |
755 | Font : CString from Standard; | |
756 | Type : Integer from Standard; | |
757 | R : ShortReal from Standard; | |
758 | G : ShortReal from Standard; | |
759 | B : ShortReal from Standard ) | |
2166f0fa | 760 | is deferred; |
25289ec1 | 761 | ---Purpose: Set text attributes for under-/overlayer. |
762 | -- <Font> argument defines the name of the font to be used, | |
763 | -- <Type> argument defines the display type of the text, | |
764 | -- <R> <G> <B> values define the color of decal or subtitle background. | |
765 | -- To set the color of the text you can use the SetColor method. | |
7fd59977 | 766 | |
767 | Text ( me : mutable; | |
768 | AText : CString from Standard; | |
769 | X, Y : ShortReal from Standard; | |
770 | AHeight : ShortReal from Standard ) | |
771 | is deferred; | |
772 | ---Purpose: call_togl_text2d | |
773 | -- If AHeight < 0 default text height is used by driver (DefaultTextHeight method) | |
774 | ||
775 | DefaultTextHeight( me ) | |
776 | returns ShortReal from Standard | |
777 | is deferred; | |
778 | ||
779 | ||
780 | TextSize( me; | |
781 | AText : CString from Standard; | |
782 | AHeight : ShortReal from Standard; | |
783 | AWidth : in out ShortReal from Standard; | |
784 | AnAscent : in out ShortReal from Standard; | |
785 | ADescent : in out ShortReal from Standard ) | |
786 | is deferred; | |
787 | ---Purpose: call_togl_textsize2d | |
788 | ||
789 | SetBackFacingModel ( me : mutable; | |
790 | aView : CView from Graphic3d ) | |
791 | is deferred; | |
792 | ---Purpose: call_togl_backfacing | |
793 | ||
794 | SetDepthTestEnabled( me; view : CView from Graphic3d; | |
795 | isEnabled : Boolean from Standard ) | |
796 | is deferred; | |
797 | ---Purpose: call_togl_depthtest | |
798 | ||
799 | IsDepthTestEnabled( me; view : CView from Graphic3d ) | |
800 | returns Boolean from Standard is deferred; | |
801 | ---Purpose: call_togl_isdepthtest | |
802 | ||
803 | ReadDepths( me; | |
804 | view : CView from Graphic3d; | |
805 | x, y : Integer; | |
806 | width, height : Integer; | |
807 | buffer : Address ) | |
808 | is deferred; | |
809 | ---Purpose: Reads depths of shown pixels of the given | |
810 | -- rectangle (glReadPixels with GL_DEPTH_COMPONENT) | |
811 | ||
812 | FBOCreate( me : mutable; | |
813 | view : CView from Graphic3d; | |
814 | width, height : Integer from Standard ) | |
815 | returns PtrFrameBuffer from Graphic3d | |
816 | is deferred; | |
817 | ---Purpose: Generate offscreen FBO in the graphic library. | |
818 | -- If not supported on hardware returns NULL. | |
819 | ||
820 | FBORelease( me : mutable; | |
821 | view : CView from Graphic3d; | |
822 | fboPtr : in out PtrFrameBuffer from Graphic3d ) | |
823 | is deferred; | |
824 | ---Purpose: Remove offscreen FBO from the graphic library | |
825 | ||
826 | FBOGetDimensions( me : mutable; | |
827 | view : CView from Graphic3d; | |
828 | fboPtr : PtrFrameBuffer from Graphic3d; | |
829 | width, height : out Integer from Standard; | |
830 | widthMax, heightMax : out Integer from Standard ) | |
831 | is deferred; | |
832 | ---Purpose: Read offscreen FBO configuration. | |
833 | ||
834 | FBOChangeViewport( me : mutable; | |
835 | view : CView from Graphic3d; | |
836 | fboPtr : in out PtrFrameBuffer from Graphic3d; | |
837 | width, height : Integer from Standard ) | |
838 | is deferred; | |
839 | ---Purpose: Change offscreen FBO viewport. | |
840 | ||
841 | BufferDump( me : mutable; | |
692613e5 | 842 | theCView : CView from Graphic3d; |
843 | theImage : in out PixMap from Image; | |
844 | theBufferType : BufferType from Graphic3d ) | |
7fd59977 | 845 | returns Boolean from Standard |
846 | is deferred; | |
847 | ---Purpose: Dump active rendering buffer into specified memory buffer. | |
848 | ||
849 | SetGLLightEnabled( me; view : CView from Graphic3d; | |
850 | isEnabled : Boolean from Standard ) | |
851 | is deferred; | |
852 | ---Purpose: call_togl_gllight | |
853 | ||
854 | IsGLLightEnabled( me; view : CView from Graphic3d ) | |
855 | returns Boolean from Standard is deferred; | |
856 | ---Purpose: call_togl_isgllight | |
857 | ||
858 | Print (me; | |
859 | ACView : CView from Graphic3d; | |
860 | ACUnderLayer : CLayer2d from Aspect; | |
861 | ACOverLayer : CLayer2d from Aspect; | |
862 | hPrnDC : Handle from Aspect; | |
863 | showBackground : Boolean; | |
7edf74fd A |
864 | filename : CString; |
865 | printAlgorithm : PrintAlgo from Aspect = Aspect_PA_STRETCH; | |
866 | theScaleFactor : Real from Standard = 1.0 ) | |
867 | returns Boolean from Standard is deferred; | |
7fd59977 | 868 | ---Level: Internal |
869 | ---Purpose: print the contents of all layers of the view to the printer. | |
870 | -- <hPrnDC> : Pass the PrinterDeviceContext (HDC), | |
871 | -- <showBackground> : When set to FALSE then print the view without background color | |
872 | -- (background is white) | |
873 | -- else set to TRUE for printing with current background color. | |
874 | -- <filename>: If != NULL, then the view will be printed to a file. | |
7edf74fd A |
875 | -- <printAlgorithm>: Select print algorithm: stretch, tile. |
876 | -- <theScaleFactor>: Scaling coefficient, used internally to scale the | |
877 | -- printings accordingly to the scale factor selected in the printer | |
878 | -- properties dialog. | |
879 | -- Returns Standard_True if the data is passed to the printer, otherwise | |
880 | -- Standard_False if the print operation failed due to the printer errors, | |
881 | -- or insufficient system memory available. | |
7fd59977 | 882 | ---Warning: Works only under Windows. |
883 | ||
7fd59977 | 884 | Export( me: mutable; |
5cedc27f K |
885 | theFileName : CString from Standard; |
886 | theFormat : ExportFormat from Graphic3d; | |
887 | theSortType : SortType from Graphic3d; | |
888 | theWidth, theHeight : Integer from Standard; | |
889 | theView : CView from Graphic3d; | |
890 | theLayerUnder : CLayer2d from Aspect; | |
891 | theLayerOver : CLayer2d from Aspect; | |
892 | thePrecision : Real from Standard = 0.005; | |
893 | theProgressBarFunc : Address from Standard = NULL; | |
894 | theProgressObject : Address from Standard = NULL ) | |
895 | returns Boolean from Standard | |
896 | is deferred; | |
897 | ---Purpose: | |
898 | -- Export scene into the one of the Vector graphics formats (SVG, PS, PDF...). | |
899 | -- In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer). | |
900 | -- Notice however that results may differ a lot and do not contain some elements. | |
7fd59977 | 901 | |
59f45b7c | 902 | AddZLayer( me : mutable; |
903 | theCView : CView from Graphic3d; | |
904 | theLayerId : Integer from Standard ) | |
905 | is deferred; | |
906 | ---Purpose: Add a new top-level z layer with ID <theLayerId> for | |
907 | -- the view. Z layers allow drawing structures in higher layers | |
908 | -- in foreground of structures in lower layers. To add a structure | |
909 | -- to desired layer on display it is necessary to set the layer | |
910 | -- ID for the structure. | |
911 | ||
912 | RemoveZLayer( me : mutable; | |
913 | theCView : CView from Graphic3d; | |
914 | theLayerId : Integer from Standard ) | |
915 | is deferred; | |
916 | ---Purpose: Remove Z layer from the specified view. All structures | |
917 | -- displayed at the moment in layer will be displayed in default layer | |
918 | -- ( the bottom-level z layer ). To unset layer ID from associated | |
919 | -- structures use method UnsetZLayer (...). | |
920 | ||
921 | UnsetZLayer( me : mutable; | |
922 | theLayerId : Integer from Standard ) | |
923 | is deferred; | |
924 | ---Purpose: Unset Z layer ID for all structures. The structure | |
925 | -- indexes will be set to default layer ( the bottom-level z layer | |
926 | -- with ID = 0 ). | |
927 | ||
928 | ChangeZLayer( me : mutable; | |
929 | theCStructure : CStructure from Graphic3d; | |
930 | theLayerId : Integer from Standard ) | |
931 | is deferred; | |
932 | ---Purpose: Change Z layer of a structure. The new z layer ID will | |
933 | -- be used to define the associated layer for structure on display. | |
934 | ||
935 | ChangeZLayer( me : mutable; | |
936 | theCStructure : CStructure from Graphic3d; | |
937 | theCView : CView from Graphic3d; | |
938 | theNewLayerId : Integer from Standard ) | |
939 | is deferred; | |
940 | ---Purpose: Change Z layer of a structure already presented in view. | |
941 | ||
942 | GetZLayer( me; | |
943 | theCStructure : CStructure from Graphic3d ) | |
944 | returns Integer from Standard is deferred; | |
945 | ---Purpose: Get Z layer ID of structure. If the structure doesn't | |
946 | -- exists in graphic driver, the method returns -1. | |
947 | ||
7fd59977 | 948 | ----------------------------- |
949 | -- Category: Internal methods | |
950 | ----------------------------- | |
951 | ||
952 | PrintBoolean ( me; | |
953 | AComment : CString from Standard; | |
954 | AValue : Boolean from Standard ); | |
955 | ||
956 | PrintCGroup ( me; | |
957 | ACGroup : CGroup from Graphic3d; | |
958 | AField : Integer from Standard ); | |
959 | ||
960 | PrintCLight ( me; | |
961 | ACLight : CLight from Graphic3d; | |
962 | AField : Integer from Standard ); | |
963 | ||
964 | PrintCPick ( me; | |
965 | ACPick : CPick from Graphic3d; | |
966 | AField : Integer from Standard ); | |
7fd59977 | 967 | |
968 | PrintCStructure ( me; | |
969 | ACStructure : CStructure from Graphic3d; | |
970 | AField : Integer from Standard ); | |
971 | ||
972 | PrintCView ( me; | |
973 | ACView : CView from Graphic3d; | |
974 | AField : Integer from Standard ); | |
975 | ||
976 | PrintFunction ( me; | |
977 | AFunc : CString from Standard ); | |
978 | ||
979 | PrintInteger ( me; | |
980 | AComment : CString from Standard; | |
981 | AValue : Integer from Standard ); | |
982 | ||
983 | PrintIResult ( me; | |
984 | AFunc : CString from Standard; | |
985 | AResult : Integer from Standard ); | |
986 | ||
987 | PrintShortReal ( me; | |
988 | AComment : CString from Standard; | |
989 | AValue : ShortReal from Standard ); | |
990 | ||
991 | PrintMatrix ( me; | |
992 | AComment : CString from Standard; | |
993 | AMatrix : Array2OfReal from TColStd ) | |
994 | raises TransformError from Graphic3d; | |
995 | ||
996 | PrintString ( me; | |
997 | AComment : CString from Standard; | |
998 | AString : CString from Standard ); | |
999 | ||
1000 | SetTrace ( me : mutable; | |
1001 | ALevel : Integer from Standard ) | |
1002 | is static; | |
1003 | ||
1004 | Trace ( me ) | |
1005 | returns Integer from Standard | |
1006 | is static; | |
1007 | ||
1008 | --ListOfAvalableFontNames( me; | |
1009 | -- lst: out NListOfHAsciiString from Graphic3d ) | |
1010 | -- returns Boolean from Standard | |
1011 | -- is deferred; | |
1012 | -- Purpose: Initialize list of names of avalable system fonts | |
1013 | -- returns Standard_False if fails | |
1014 | -- ABD Integration support of system fonts (using FTGL and FreeType) | |
1015 | ||
dc3fe572 | 1016 | GetDisplayConnection (me) |
1017 | returns DisplayConnection_Handle from Aspect; | |
1018 | ---C++: return const & | |
1019 | ||
1020 | ---Purpose: returns Handle to display connection | |
1021 | ||
eb4320f2 | 1022 | IsDeviceLost (me) |
1023 | returns Boolean from Standard; | |
1024 | -- Purpose: @return Standard_True in cases when the last view has been removed but some objects still present. | |
1025 | ||
1026 | ResetDeviceLostFlag (me: mutable); | |
1027 | -- Purpose: Resets DeviceLostFlag to default (Standard_False) state. | |
1028 | ||
7fd59977 | 1029 | fields |
1030 | ||
dc3fe572 | 1031 | MyTraceLevel : Integer from Standard is protected; |
1032 | MySharedLibrary : SharedLibrary from OSD is protected; | |
1033 | myDisplayConnection: DisplayConnection_Handle from Aspect is protected; | |
eb4320f2 | 1034 | myDeviceLostFlag : Boolean from Standard is protected; |
7fd59977 | 1035 | |
1036 | end GraphicDriver from Graphic3d; |