zjf
2023-03-06 392b76515f40376b6d36f40a114850ef63650384
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
/////////////////////////////////////////////////////////////////////////////// 
// Copyright (C) 2002-2016, Open Design Alliance (the "Alliance"). 
// All rights reserved. 
// 
// This software and its documentation and related materials are owned by 
// the Alliance. The software may only be incorporated into application 
// programs owned by members of the Alliance, subject to a signed 
// Membership Agreement and Supplemental Software License Agreement with the
// Alliance. The structure and organization of this software are the valuable  
// trade secrets of the Alliance and its suppliers. The software is also 
// protected by copyright law and international treaty provisions. Application  
// programs incorporating this software must include the following statement 
// with their copyright notices:
//   
//   This application incorporates Teigha(R) software pursuant to a license 
//   agreement with Open Design Alliance.
//   Teigha(R) Copyright (C) 2002-2016 by Open Design Alliance. 
//   All rights reserved.
//
// By use of this software, its documentation or related materials, you 
// acknowledge and accept the above terms.
///////////////////////////////////////////////////////////////////////////////
 
#ifndef __GS_H_INCLUDED_
#define __GS_H_INCLUDED_
 
#include "RxObject.h"
#include "RxIterator.h"
#include "Gs/GsExport.h"
 
class OdGiDrawable;
 
/** \details
  This template class is a specialization of the OdSmartPtr class for OdGiDrawable object pointers. 
*/
typedef OdSmartPtr<OdGiDrawable> OdGiDrawablePtr;
 
class OdGeMatrix3d;
class OdGePoint3d;
class OdGeVector3d;
class OdGePoint2d;
class OdGiEdgeData;
class OdGiFaceData;
class OdGiVertexData;
struct OdGiClipBoundary;
class OdGiAbstractClipBoundary;
class OdDbStub;
class OdGeExtents3d;
class OdGiVisualStyle;
 
#include "TD_PackPush.h"
 
#include "OdPlatform.h"
#include "RxModule.h"
#include "IntArray.h"
#include "GsDCPointArray.h"
#include "Ge/GePoint2dArray.h"
 
class OdGsSelectionReactor;
 
class OdGsView;
 
/** \details
  This template class is a specialization of the OdSmartPtr class for OdGsView object pointers. 
*/
typedef OdSmartPtr<OdGsView> OdGsViewPtr;
 
class OdGsModel;
 
/** \details
  This template class is a specialization of the OdSmartPtr class for OdGsModel object pointers. 
*/
typedef OdSmartPtr<OdGsModel> OdGsModelPtr;
 
/** \details
  This template class is a specialization of the OdArray class for OdGsModel object pointers.
*/
typedef OdArray<OdGsModel*, OdMemoryAllocator<OdGsModel*> > OdGsModelArray;
 
class OdGsDevice;
 
/** \details
  This template class is a specialization of the OdSmartPtr class for OdGsDevice object pointers. 
*/
typedef OdSmartPtr<OdGsDevice> OdGsDevicePtr;
 
class OdRxDictionary;
 
/** \details
  This template class is a specialization of the OdSmartPtr class for OdRxDictionary object pointers. 
*/
typedef OdSmartPtr<OdRxDictionary> OdRxDictionaryPtr;
 
class OdGsReactor;
 
/** \details
  This template class is a specialization of the OdSmartPtr class for OdGsReactor object pointers. 
*/
typedef OdSmartPtr<OdGsReactor> OdGsReactorPtr;
 
class OdGiRasterImage;
 
/** \details
  This template class is a specialization of the OdSmartPtr class for OdGiRasterImage object pointers. 
*/
typedef OdSmartPtr<OdGiRasterImage> OdGiRasterImagePtr;
 
#include "GsDefs.h"
 
class OdGiContext;
struct OdGsClientViewInfo;
class OdGsFiler;
 
#include "Gi/GiContextualColors.h"
 
/** \details
    This class is the abstract base class for classes that implement Viewport objects in GUI display windows.
 
    \remarks
    Each Viewport objects consists of a collection of objects to be viewed, and camera parameters that define the view.
    
    Library: TD_Gs
 
    <group OdGs_Classes> 
*/
class FIRSTDLL_EXPORT OdGsView : public OdRxObject
{
public:
  ODRX_DECLARE_MEMBERS(OdGsView);
  
  enum RenderMode
  {
    kBoundingBox                  = -1,     // Bounding box. For internal use only.
    k2DOptimized                  = 0,      // Standard *display*. Optimized for 2D.
    kWireframe                    = 1,      // Standard *display*. Uses 3D pipeline.
    kHiddenLine                   = 2,      // Wireframe *display*. Hidden lines removed.
    kFlatShaded                   = 3,      // Faceted *display*. One *color* per face.
    kGouraudShaded                = 4,      // Smooth shaded *display*. Colors interpolated between *vertices*.
    kFlatShadedWithWireframe      = 5,      // Faceted *display* with wireframe overlay.
    kGouraudShadedWithWireframe   = 6,      // Smooth shaded *display* with wireframe overlay.
    kNone
  };
 
  enum Projection
  {
    kParallel     = 0,
    kPerspective  = 1
  };
 
  enum SelectionMode
  {
    kWindow       = 0,
    kCrossing     = 1,
    kFence        = 2,
    kWPoly        = 3,
    kCPoly        = 4,
 
    kPoint        = 16
  };
 
  /** \details
    Returns the GsDevice object associated with this Viewport object.
  */
  virtual OdGsDevice* device() const = 0;
 
  /** \details
    Returns the GiContext object associated with this Viewport object.
  */
  virtual OdGiContext* userGiContext() const = 0;
 
  /** \details
    Sets the User Context object associated with this Viewport object.
    \param pUserGiContext [in]  Pointer to the User Context.
  */
  virtual void setUserGiContext(OdGiContext* pUserGiContext) = 0;
 
  /** \details
    Returns the scale factor for displaying Lineweights in this Viewport object.
  */
  virtual double lineweightToDcScale() const = 0;
  /** \details
    Sets the scale factor for displaying Lineweights in this Viewport object.
    \param scale [in]  Scale factor.
  */
  virtual void setLineweightToDcScale(double scale) = 0;
 
  /** \details
    Sets the lineweights for this Viewport object.
    \param numLineweights [in]  Number of Lineweights.
    \param lineweights [in]  Array of Lineweights.
  */
  virtual void setLineweightEnum(int numLineweights, const OdUInt8* lineweights) = 0;
 
  /** \details
    Sets the size and position of this Viewport object.
    \param lowerLeft [in]  Lower-left corner in nomalized device coordinates [0.0 .. 1.0].
    \param upperRight [in]  Upper-right corner in nomalized device coordinates [0.0 .. 1.0].
    \param screenRect [in]  Screen rectangle in device coordinates (pixels).
    
    \remarks
    (0,0) is the lower-left corner of the owning Device object. Coordinates increase upward and to the right.
    
    \note
    The View object can be partly or completely off screen.    
  */
  virtual void setViewport(const OdGePoint2d& lowerLeft, const OdGePoint2d& upperRight) = 0;
  virtual void setViewport(const OdGsDCRect& screenRect) = 0;
  virtual void setViewport(const OdGsDCRectDouble& screenRect);
 
  /** \details
    Returns the size and position of this Viewport object.
    \param lowerLeft [out]  Receives the lower-left corner in nomalized device coordinates [0.0 .. 1.0].
    \param upperRight [out]  Receives the upper-right corner in nomalized device coordinates [0.0 .. 1.0].
    \param screenRect [out]  Receives the screen rectangle in device coordinates (pixels).
    
    \remarks
    (0,0) is the lower-left corner of the owning Device object.  Coordinates increase upward and to the right.
    
    \note
    The View object may be partly or completely off screen.    
  */
  virtual void getViewport(OdGePoint2d& lowerLeft, OdGePoint2d& upperRight) const = 0;
  virtual void getViewport(OdGsDCRect& screenRect) const = 0;
  virtual void getViewport(OdGsDCRectDouble& screenRect) const;
 
  /** \details
    Defines a polygonal clip region for this Viewport object.
    
    \param numCoutours [in]  Number of polygonal contours.
    \param numVertices [in]  Array of the number of vertices in each polygonal contour.
    \param vertices [in]  Array of device coordinate (pixel) vertices defining the polygonal contours.
  */
  virtual void setViewportClipRegion(int numContours, int const* numVertices, OdGsDCPoint const* vertices) = 0;
  virtual void setViewportClipRegion(int numContours, int const* numVertices, OdGePoint2d const* vertices) = 0;
 
  /** \details
    Returns a polygonal clip region for this Viewport object.
    
    \param counts [out]  Array of the number of vertices in each polygonal contour.
    \param vertices [out]  Array of device coordinate (pixel) vertices defining the polygonal contours.
  */
  virtual void viewportClipRegion(OdIntArray& counts, OdGsDCPointArray& vertices) const = 0;
  virtual void viewportClipRegion(OdIntArray& counts, OdGePoint2dArray& vertices) const = 0;
 
  /** \details
    Removes the polygonal clip region for this Viewport object.
  */
  void removeViewportClipRegion();
 
  /** \details
    Defines the 3d clipping for this Viewport object.
 
    \param pBoundary [in]  3d clipping boundary.
    \param pClipInfo [in]  Optional 3d clipping boundary extended data.
  */
  virtual void setViewport3dClipping(const OdGiClipBoundary* pBoundary, const OdGiAbstractClipBoundary* pClipInfo = NULL);
 
  /** \details
    Returns the current 3d clipping for this Viewport object.
 
    \param ppClipInfo [out]  Optional 3d clipping boundary extended data.
 
    \note
    Returns null if 3d clipping boundary doesn't set.
  */
  virtual const OdGiClipBoundary *viewport3dClipping(const OdGiAbstractClipBoundary** ppClipInfo = NULL) const;
 
  /** \details
    Removes the 3d clipping from this Viewport object.
  */
  void removeViewport3dClipping();
 
  /** \details
    Sets the color and width of the border for this Viewport object.
    \param color [in]  Border color.
    \param width [in]  Border width in pixels.
  */
  virtual void setViewportBorderProperties(ODCOLORREF color, int width) = 0;
 
  /** \details
    Returns the color and width of the border for this Viewport object.
    \param color [out]  Receives the border color.
    \param width [out]  Receives the border width in pixels.
  */
  virtual void getViewportBorderProperties(ODCOLORREF& color, int& width) const = 0;
 
  /** \details
    Controls the border visibility for this Viewport object.
    \param visible [in]  Controls visibility.
  */
  virtual void setViewportBorderVisibility(bool visible) = 0;
 
  /** \details
    Returns true if and  only if the border is visible for this Viewport object.
  */
  virtual bool isViewportBorderVisible() const = 0;
 
  /** \details
    Sets the camera parameters for this Viewport object.
    
    \param position [in]  Camera position.
    \param target [in]  Camera target.
    \param upVector [in]  Camera up vector.
    \param fieldWidth [in]  Projection plane (field) width.
    \param fieldHeight [in]  Projection plane (field) height.
    \param projectionType [in]  Projection type.
    
    \remarks
    All parameters are in WCS coordinates.
 
    projectionType must be one of the following:
    
    <table>
    Name           Value
    kParallel      0
    kPerspective   1
    </table>
    
    \note
    This method defines the transfomation from WCS coordinates to normalized device coordinates.
  */
  virtual void setView(
    const OdGePoint3d& position,
    const OdGePoint3d& target,
    const OdGeVector3d& upVector,
    double fieldWidth,
    double fieldHeight,
    Projection projectionType = kParallel) = 0;
 
  /** \details
    Returns the WCS camera position for this Viewport object.
  */
  virtual OdGePoint3d position() const = 0;
 
  /** \details
    Returns the WCS camera target for this Viewport object.
  */
  virtual OdGePoint3d target() const = 0;
 
  /** \details
    Returns the WCS camera up vector for this Viewport object.
  */
  virtual OdGeVector3d upVector() const = 0;
 
  /** \details
    Returns the perspective lens length for this Viewport object.
  */
  virtual double lensLength() const = 0;
 
  /** \details
    Sets the perspective lens length for this Viewport object.
    \param lensLength [in]  Perspective lens length.
  */
  virtual void setLensLength(double lensLength) = 0;
 
  /** \details
    Returns true if and only if the projection type for this Viewport object is kPerspective. 
  */
  virtual bool isPerspective() const = 0;
 
  /** \details
    Returns the WCS projection plane (field) width for this Viewport object.
  */
  virtual double fieldWidth() const = 0;
  /** \details
    Returns the WCS projection plane (field) height for this Viewport object.
  */
  virtual double fieldHeight() const = 0;
 
  /** \details
    Controls the front clipping of this Viewport object.
    \param enable [in]  Enable front clipping.
  */
  virtual void setEnableFrontClip(bool enable) = 0;
 
  /** \details
    Returns true if and only if front clipping is enabled for this Viewport object.
  */
  virtual bool isFrontClipped() const = 0;
 
  /** \details
    Sets the front clip distance from the target of this Viewport object.
    \param frontClip [in]  Front clip distance.
  */
  virtual void setFrontClip(double frontClip) = 0;
 
  /** \details
    Returns the front clip distance from the target of this Viewport object.
  */
  virtual double frontClip() const = 0;
 
  /** \details
    Controls the back clipping of this Viewport object.
    \param enable [in]  Enable back clipping.
  */
  virtual void setEnableBackClip(bool enable) = 0;
 
  /** \details
    Returns true if and only if back clipping is enabled for this Viewport object.
  */
  virtual bool isBackClipped() const = 0;
 
  /** \details
    Sets the back clip distance from the target of this Viewport object.
    \param backClip [in]  Back clip distance.
  */
  virtual void setBackClip(double backClip) = 0;
  /** \details
    Returns the back clip distance from the target of this Viewport object.
  */
  virtual double backClip() const = 0;
 
  /** \details
      Returns the matrix that transforms world space to view space for this Viewport object.
 
      \sa
      Coordinate Systems.
  */
  virtual OdGeMatrix3d viewingMatrix() const = 0;
 
  /** \details
      Returns the matrix that transforms view space to normalized device space for this Viewport object.
 
      \sa
      Coordinate Systems.
  */
  virtual OdGeMatrix3d projectionMatrix() const = 0;
 
  /** \details
      Returns the matrix that transforms normalized device space to screen space for this Viewport object.
 
      \sa
      Coordinate Systems.
  */
  virtual OdGeMatrix3d screenMatrix() const = 0;
 
  /** \details
      Returns a matrix that transforms coordinates from world space to screen space for this Viewport object. 
      
      \remarks
      This is equivalent to the concatenation of the viewingMatrix, 
      projectionMatrix, and screenMatrix.
 
      \sa
      Coordinate Systems.
  */
  virtual OdGeMatrix3d worldToDeviceMatrix() const = 0;
 
  /** \details
      Returns the matrix that transforms coordinates from model space to screen space for this Viewport object.
 
      \sa
      Coordinate Systems.
  */
  virtual OdGeMatrix3d objectToDeviceMatrix() const = 0;
 
  /** \details
    Sets the render mode for this Viewport object.
    
    \param mode [in]  Render mode.
    
    \remarks
    mode must be one of the following:
    
    <table>
    Name                            Value      Description
    kBoundingBox                    -1         Bounding box. For internal use only.
    k2DOptimized                    0          Standard display. Optimized for 2D.
    kWireframe                      1          Standard display. Uses 3D pipeline.
    kHiddenLine                     2          Wireframe display. Hidden lines removed.
    kFlatShaded                     3          Faceted display. One color per face.
    kGouraudShaded                  4          Smooth shaded display. Colors interpolated between vertices.
    kFlatShadedWithWireframe        5          Faceted display with wireframe overlay.
    kGouraudShadedWithWireframe     6          Smooth shaded display with wireframe overlay.
    </table>
  */
  virtual void setMode(RenderMode mode) = 0;
 
  /** \details
    Sets the render mode for this Viewport object.
    
    \remarks
    mode must be one of the following:
    
    <table>
    Name                            Value      Description
    kBoundingBox                    -1         Bounding box. For internal use only.
    k2DOptimized                    0          Standard display. Optimized for 2D.
    kWireframe                      1          Standard display. Uses 3D pipeline.
    kHiddenLine                     2          Wireframe display. Hidden lines removed.
    kFlatShaded                     3          Faceted display. One color per face.
    kGouraudShaded                  4          Smooth shaded display. Colors interpolated between vertices.
    kFlatShadedWithWireframe        5          Faceted display with wireframe overlay.
    kGouraudShadedWithWireframe     6          Smooth shaded display with wireframe overlay.
    </table>
  */
  virtual RenderMode mode() const = 0;
 
  /** \details
    Adds the specified scene graph to this Viewport object.
    
    \param pSceneGraph [in]  Pointer to the root of the scene graph.
    \param pModel [in]  Pointer to the Model object to which all scene graph notifications are to be directed.
    
    \remarks
    This function is intended to be used as follows:
    
    1.  Construct a scene graph of OdGiDrawable objects. 
        Each object draws its children with OdGiGeometry::draw().
    
    2.  With this function, add the root of the scene graph and the 
        OdGsModel that handles notifications to this Viewport object.
  */
  virtual bool add(OdGiDrawable* pSceneGraph, OdGsModel* pModel) = 0;
 
  /** \details
    Removes the specified scene graph from this Viewport object.
    
    \param sceneGraph [in]  Pointer to the root of the scene graph.
  */
  virtual bool erase(OdGiDrawable* sceneGraph) = 0;
  /** \details
    Removes all scene graphs from this Viewport object.
    
    \param sceneGraph [in]  Root of scene graph.
  */
  virtual void eraseAll() = 0;
 
  /** \details
    Returns OdGsModel object associated with specified OdGiDrawable object in this Viewport object.
 
    \param pDrawable [in]  Pointer onto OdGiDrawable object.
  */
  virtual OdGsModel *getModel(const OdGiDrawable *pDrawable) const = 0;
  /** \details
    Returns array of OdGsModel objects associated with this Viewport object.
  */
  virtual OdGsModelArray getModelList() const = 0;
 
   /** \details
    Marks for refresh the specified region of this Viewport object.
     
    \param screenRect [in]  Screen rectangle in device coordinates (pixels).
    
    \remarks
    If screenRect is not specified, the entire area of this View is marked for refresh.
   */
  virtual void invalidate() = 0;
  virtual void invalidate(const OdGsDCRect &screenRect) = 0;
 
  /** \details
    Returns true if and only if this Viewport object is showing the correct image.
 
    \remarks
    This implies the follow:
    * No part of GUI area is flagged for refresh.
    * All rasterizations are complete
    * The rendering pipeline has been flushed.
  */
  virtual bool isValid() const = 0;
 
  /** \details
    Flushes any queued graphics to the display device.
    
    \remarks
    If called while this Viewport object is in the interactive state, this function immediately returns.
  */
  virtual void update() = 0;
 
  /** \details
    Puts this Viewport object into interactive state.
    
    \param frameRateInHz [in]  Frames/second.
    
    \remarks
    A frame rate of 0.0 specifies the default frame rate.
  */
  virtual void beginInteractivity(double frameRateInHz) = 0;
  /** \details
    Removes this Viewport object from the interactive state.
    \param frameRateInHz [in]  Frames/second.
  */
  virtual void endInteractivity() = 0;
  /** \details
    Flushes the graphic pipeline and renders this Viewport object.
    
    \note
    This function should be called only during interactivty. 
  */
  virtual void flush() = 0;
 
  /** \details
    Hides this Viewport object.
  */
  virtual void hide() = 0;
 
  /** \details
    Un-hides this Viewport object.
  */
  virtual void show() = 0;
 
  /** \details
    Returns true if and only if this Viewport object is not hidden.
  */
  virtual bool isVisible() = 0;
 
  /** \details
    Freezes the specified Layer object in this Viewport object.
    \param layerID [in]  Layer to freeze.
    \remarks
    All layers are thawed by default.
  */
  virtual void freezeLayer(OdDbStub* layerID) = 0;
 
  /** \details
    Thaws the specified Layer object in this Viewport object.
    \param layerID [in]  Layer to thaw.
    \remarks
    All layers are thawed by default.
  */
  virtual void thawLayer(OdDbStub* layerID) = 0;
 
  /** \details
    Thaws all Layer objects in this Viewport object.
    \remarks
    All layers are thawed by default.
  */
  virtual void clearFrozenLayers() = 0;
 
  /** \details
    Marks for regeneration all subViewportDraw() geometry for this Viewport object.
  */
  virtual void invalidateCachedViewportGeometry() = 0;
 
  /** \details
    Runs selection procedure inside this Viewport object.
 
    \param pts [in]  Selection points in device coordinate space.
    \param nPoints [in]  Count of selection points.
    \param pReactor [in]  Selection callback pointer.
    \param mode [in]  Selection mode.
  */
  virtual void select(const OdGsDCPoint* pts, int nPoints,
    OdGsSelectionReactor* pReactor,
    OdGsView::SelectionMode mode = OdGsView::kCrossing) = 0;
 
  /** \details
    Translates the camera position and target by the specified Camera Coordinate dolly amount.
     
    \param dollyVector [in]  Camera Coordinate dolly vector.
    \param xDolly [in]  Camera Coordinate X dolly amount.
    \param yDolly [in]  Camera Coordinate Y dolly amount.
    \param zDolly [in]  Camera Coordinate Z dolly amount.
     
    \remarks
    Camera Coordinates are relative to the view of a target from a camera. 
    
    * The Y-axis is along up vector. 
    * The Z-axis is along the vector from camera postiton to the target. 
    * The X-axis is the cross product Y-axis × Z-axis 
  */
    virtual void dolly(const OdGeVector3d& dollyVector) = 0;
  virtual void dolly(double xDolly, double yDolly, double zDolly) = 0;
 
  /** \details
    Rotates the camera by the specified amount about the eye vector.
     
    \param rollAngle [in]  Camera CCW roll angle.
     
    \remarks
    Positive angles rotate the camera counterclockwise about the eye vector
    when viewed from the camera position to the target. This corresponds
    to a clockwise rotation of the up vector.
    
    \note
    Camera Coordinates are relative to the view of a target from a camera. 
    
    * The Y-axis is along up-vector. 
    * The Z-axis (eye vector) is along the vector from camera postiton to the target. 
    * The X-axis is the cross product Y-axis × Z-axis.
    
    All angles are expressed in radians.
  */
    virtual void roll(double rollAngle) = 0;
 
  /** \details
    Orbits the camera about the target by the specified amounts.
     
    \param xOrbit [in]  X-axis Orbit.
    \param yOrbit [in]  Y-axis Orbit.
     
    \remarks
    he camera moves on the surface a sphere whose center the camera target and whose
    radius is the distance from the camera position to its target 
    
    * The camera is first rotated about an axis parallel to the X-axis and passing through the target.  
    * The camera is next rotated about an axis parallel to the Y-axis and passing through the target  
    
    \note
    Camera Coordinates are relative to the view of a target from a camera. 
    
    * The Y-axis is along up vector. 
    * The Z-axis is along the vector from camera postiton to the target. 
    * The X-axis is the cross product Y-axis × Z-axis 
 
    All angles are expressed in radians.
  */
    virtual void orbit(double xOrbit, double yOrbit) = 0;
 
  /** \details
    Scales the focal length of the camera by the specified amount.
     
    \param zoomFactor [in]  Zoom factor.
     
  */
    virtual void zoom(double zoomFactor) = 0;
 
  /** \details
    Rotates the target about the camera the specified amounts.
     
    \param xPan [in]  X-axis pan.
    \param yPan [in]  Y-axis pan.
     
    \remarks
    The target moves on the surface a sphere whose center the camera position and whose
    radius is the distance from the camera position to its target 
    
    * The target is first rotated about an axis parallel to the X-axis and passing through the camera.  
    * The target is next rotated about an axis parallel to the Y-axis and passing through the camera.  
    
    \note
    Camera Coordinates are relative to the view of a target from a camera. 
    
    * The Y-axis is along up vector. 
    * The Z-axis is along the vector from camera postiton to the target. 
    * The X-axis is the cross product Y-axis × Z-axis 
    All angles are expressed in radians.
  */
    virtual void pan(double xPan, double yPan) = 0;
 
  /** \details
    Scales the camera to completely include specified WCS box inside view frustum.
 
    \param minPt [in]  minimal WCS box point.
    \param maxPt [in]  maximal WCS box point.
  */
  virtual void zoomExtents(const OdGePoint3d &minPt, const OdGePoint3d &maxPt) = 0;
 
  /** \details
    Scales the camera to completely include specified screen area.
 
    \param lowerLeft [in]  Lower-left corner in nomalized device coordinates [0.0 .. 1.0].
    \param upperRight [in]  Upper-right corner in nomalized device coordinates [0.0 .. 1.0].
  */
  virtual void zoomWindow(const OdGePoint2d &lowerLeft, const OdGePoint2d &upperRight) = 0;
 
  /** \details
    Returns true if and only if specified point is visible inside current view frustum.
 
    \param pt [in]  WCS point for check.
  */
  virtual bool pointInView(const OdGePoint3d &pt) const = 0;
 
  /** \details
    Returns true if and only if specified WCS box is visible completely or partially inside current view frustum.
 
    \param minPt [in]  minimal WCS box point.
    \param maxPt [in]  maximal WCS box point.
  */
  virtual bool extentsInView(const OdGePoint3d &minPt, const OdGePoint3d &maxPt) const = 0;
 
  /** \details
    Clones this view object.
 
    \param cloneViewParameters [in]  If and only if true, view parameters will be cloned.
    \param cloneGeometry [in]  If and only if true, geometry will be cloned.
    
    \remarks
    Returns a SmartPointer to the newly created object.
  */
  virtual OdGsViewPtr cloneView(bool cloneViewParameters = true, bool cloneGeometry = false) = 0;
 
  /** \details
    Sets the view parameters of the specified OdGsView object to that of this Viewport object.
    \param pView [out]  Receives the view parameters.
  */
  virtual void viewParameters(OdGsView* pView) const = 0;
 
  /** \details
    Returns true if an only if any view parameters have exceeded their boundaries since the last
    call to this function.
    
    \remarks
    The following calls are monitored:
    
    * dolly()
    * orbit()
    * pan() 
    * roll()
    * setBackClip()
    * setFrontClip()
    * setView()
    * zoom()
  */
  virtual bool exceededBounds() = 0;
 
  /** \details
    Controls stereo viewing for this Viewport object.
    
    \param enable [in]  Controls stereo viewing.
  */
  virtual void enableStereo(bool enabled) = 0;
 
  /** \details
    Returns true if and only if stereo viewing is enabled for this Viewport object.
  */
  virtual bool isStereoEnabled() const = 0;
 
  /** \details
    Sets the stereo parameters for this Viewport Object.
    \param magnitude [in]  View separation [0.0 .. 2.0].
    \param parallax [in]  Adjusts the plane of zero parallax [0.0 .. 2.0].
    
    \remarks
    magnitude controls view eye separation, and hence the stereo effect.
    
    * A magnitude of 1.0 is the default value.
    * A magnitude of 0.0 produces no stereo effect.
    * A magnitude of 2.0 produces a double stereo effect.
    
    parallax adjusts the zero parallax plane.
    
    * A parallax of 1.0 is the default value. An object centered at the target will be half-in and half-out of the screen.
    * A parallax of 0.0 moves the object into the screen.
    * A parallax of 2.0 move the object out of the screen.
    
  */
   virtual void setStereoParameters(double magnitude, double parallax) = 0;
 
  /** \details
    Returns the stereo parameters for this Viewport Object.
    \param magnitude [out]  Receives the view separation [0.0 .. 2.0].
    \param parallax [out]  Receives the plane of zero parallax adjustment [0.0 .. 2.0].
    
    \remarks
    magnitude controls view eye separation, and hence the stereo effect.
    
    * A magnitude of 1.0 is the default value.
    * A magnitude of 0.0 produces no stereo effect.
    * A magnitude of 2.0 produces a double stereo effect.
    
    parallax adjusts the zero parallax plane.
    
    * A parallax of 1.0 is the default value. An object centered at the target will be half-in and half-out of the screen.
    * A parallax of 0.0 moves the object into the screen.
    * A parallax of 2.0 move the object out of the screen.
    
  */
   virtual void getStereoParameters(double& magnitude, double& parallax) const = 0;
 
  /** \details
    Returns an iterator to traverse the lights attached to this Viewport object.
    \param pLightsIterator [in]  Pointer to the lights iterator.
  */
  virtual void initLights(OdRxIterator* pLightsIterator) = 0;
 
  /** \details
    Sets a multiplier that is used to scale all linetypes in this Viewport object.
    
    \param linetypeScaleMultiplier [in]  Linetype scale multiplier.
  */
  virtual void setLinetypeScaleMultiplier(double linetypeScaleMultiplier) = 0;
 
  /** \details
    Returns current linetype scale multiplier value.
  */
  virtual double linetypeScaleMultiplier() const = 0;
 
  /** \details
    Sets a multiplier that could be used as an alternate scale factor for linetypes in this Viewport object.
    
    \param linetypeAlternateScaleMultiplier [in]  Alternate linetype scale multiplier.
  */
  virtual void setAlternateLinetypeScaleMultiplier(double linetypeAlternateScaleMultiplier) = 0;
 
  /** \details
    Returns current alternate linetype scale multiplier value.
  */
  virtual double linetypeAlternateScaleMultiplier() const = 0;
 
  /** \details
    Returns the ClientViewInfo for this Viewport object.
    
    \param clientViewInfo [out]  Receives the ClientViewInfo.
  */
  virtual void clientViewInfo(OdGsClientViewInfo& clientViewInfo) const;
 
  enum ClearColor
  {
    kTransparent,
    kDeviceBackground,
    kPaletteBackground
  };
 
  /** \details
    Sets the clear color for this view
 
    \param color [in]  The clear color.
  */
  virtual void setClearColor(ClearColor color) = 0;
 
  /** \details
    Checks does specified point is inside viewport area.
 
    \param screenPoint [in]  Check point in device coordinate space.
  */
  virtual bool pointInViewport(const OdGePoint2d& screenPoint) const = 0;
 
  /** \details
    Returns the display pixel density at the specified point for this Viewport object.
 
    \param point [in]  WCS center of the unit square.
    \param pixelDensity [out]  Receives the pixel density.
    \param bUsePerspective [in]  Enable perspective inclusion into pixel density calculation.
 
    \remarks
    Pixel density is measured in pixels per WCS unit.
 
    This function can be used to determine if the geometry generated for an object will 
    be smaller than the size of a pixel.
  */
  virtual void getNumPixelsInUnitSquare(const OdGePoint3d& point,
                                        OdGePoint2d& pixelDensity, bool bUsePerspective = true) const = 0;
 
  /** \details
    Sets background object for this view.
 
    \param backgroundId [in]  New background object ID.
  */
  virtual void setBackground(OdDbStub *backgroundId) = 0;
  /** \details
    Returns current background object ID for this view.
  */
  virtual OdDbStub *background() const = 0;
 
  /** \details
    Sets visual style object for this view.
 
    \param visualStyleId [in]  New visual style object ID.
  */
  virtual void setVisualStyle(OdDbStub *visualStyleId) = 0;
  /** \details
    Returns current visual style object ID for this view.
  */
  virtual OdDbStub *visualStyle() const = 0;
  /** \details
    Sets visual style for this view.
 
    \param visualStyle [in]  New visual style data.
  */
  virtual void setVisualStyle(const OdGiVisualStyle &visualStyle) = 0;
  /** \details
    Returns current visual style for this view.
 
    \param visualStyle [out]  OdGiVisualStyle structure to fill by current visual style data.
 
    \remarks
    Returns true if and only if OdGiVisualStyle structure is filled by visual style data.
  */
  virtual bool visualStyle(OdGiVisualStyle &visualStyle) const = 0;
 
  /** \details
    Returns image of current view buffer.
 
    \param pImage [out]  Pointer for image to return.
    \param region [in]  Rectangle specifies region to return.
 
    \remarks
    Implementation can throw eNotImplementedYet exception if current vectorization module doesn't support snap shots.
  */
  virtual void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect &region) = 0;
};
 
/** \details
    This stucture contains the Window ID and Viewport Object ID.
    
    Library: TD_Gs
 
    <group !!RECORDS_TD_APIRef>
*/
struct OdGsClientViewInfo 
{
  enum ViewportFlags
  {
    kDependentViewport = 1,
    kDependentGeometry = 2,
    kHelperView        = 4,
    kSetViewportId     = 8
  };
 
  long      viewportId;        // Returned by OdGiViewport::viewportId()
  long      acadWindowId;      // Returned by OdGiViewport::acadWindowId()
  OdDbStub* viewportObjectId;  // Returned by OdGiViewportDraw::viewportObjectId()
  OdGiContextualColorsPtr contextColors; // Returned by OdGiViewport::contextualColors()
  OdUInt32  viewportFlags;     // Optional view flags
 
  OdGsClientViewInfo()
    : viewportId(-1)
    , acadWindowId(0)
    , viewportObjectId(NULL)
    , viewportFlags(0)
  {
  }
};
 
class OdGiContext;
 
/** \details
    This class is the abstract base class for classes that encapsulate GUI display windows.
 
    \remarks
    OdGsDevice objects own, update, and refresh one or more OdGsView objects.
    
    In addition, they responds to operating system notifications,
    such as window resize, forwarded by the graphics system client.
 
    Library: TD_Gs
        
    <group OdGs_Classes> 
*/
class FIRSTDLL_EXPORT OdGsDevice : public OdRxObject
{
public:
  ODRX_DECLARE_MEMBERS(OdGsDevice);
 
  /** \details
    Returns a SmartPointer to the dictionary containing the 
    properties for this Device object.
  */
  virtual OdRxDictionaryPtr properties() = 0;
 
  /** \details
    Returns the User Context object associated with this Device object.
  */
  virtual OdGiContext* userGiContext() const = 0;
 
  /** \details
    Sets the User Context object associated with this Device object.
    \param pUserGiContext [in]  Pointer to the User Context.
  */
  virtual void setUserGiContext(OdGiContext* pUserGiContext) = 0;
 
  /** \details
    Marks for refresh the specified region of the GUI window of this Device object.
     
    \param screenRect [in]  Rectangular area.
    
    \remarks
    If screenRect is not specified, the entire GUI window is marked for refresh.
  */
  virtual void invalidate() = 0;
 
  virtual void invalidate(const OdGsDCRect &screenRect) = 0;
 
  /** \details
    Returns true if and only if the GUI window for this Device object is showing the correct image.
 
    \remarks
    This implies the follow:
    * No part of GUI area is flagged for refresh.
    * All rasterizations are complete
    * The rendering pipeline has been flushed.
  */
  virtual bool isValid() const = 0;
 
  /** \details
    Updates the GUI window for this Device object.
    
    \param pUpdatedRect [out]  Pointer to the a rectangle to receive the region updated by this function.
 
    \note
    This function call is propagated to all OdGsView objects owned by this Device object,
    thus displaying the correct image on the GUI window of this Device object.
  */
  virtual void update(OdGsDCRect* pUpdatedRect = 0) = 0;
 
  /** \details
    Notification function called whenever the size of the GUI window for this Device object has changed.
    
    \param outputRect [in]  New size of the output rectangle in device coordinates (pixels).
 
    \note
    This function should not be called if this Device object has a width and/or height of 0, .
  */
  virtual void onSize(const OdGsDCRect& outputRect) = 0;
  virtual void onSize(const OdGsDCRectDouble& outputRect);
 
  /** \details
    Returns device surface output rectangle.
 
    \param outputRect [out]  Obtains size of the output rectangle in device coordinates (pixels).
  */
  virtual void getSize(OdGsDCRect& outputRect) const = 0;
  virtual void getSize(OdGsDCRectDouble& outputRect) const;
 
  /** \details
    
    \remarks
    Causes this Device object to realize its foreground pallette.
  */
    virtual void onRealizeForegroundPalette() = 0;
 
  /** \details
    Notification function typically called whenever the GUI window for this Device object loses focus.
    
    \remarks
    Causes this Device object to realize its background pallette.
  */
    virtual void onRealizeBackgroundPalette() = 0;
 
  /** \details
    Notification function called whenever the OS screen resolution and/or color depth have changed.
    
    \param bitsPerPixel [in]  Color depth.
    \param xPixels [in]  X pixels.
    \param yPixels [in]  Y pixels.
  
    \remarks
    This function is called after the operation.  
  */
  virtual void onDisplayChange(int bitsPerPixel, int xPixels, int yPixels) = 0;
 
  /** \details
    Creates a new OdGsView object, and associates it with this Device object.
    
    \param pViewInfo [in]  Pointer to the Client View Information for this Device object.
    \param enableLayerVisibilityPerView [in]  Layer visibility per viewport is supported, if and only if true.
    
    \remarks
    Returns a SmartPointer to the newly created object.
 
    pViewInfo contains information returned by OdGiViewport::acadWindowId() and OdGiViewportDraw::viewportObjectId()
  */
  virtual OdGsViewPtr createView(
    const OdGsClientViewInfo* pViewInfo = 0, 
    bool enableLayerVisibilityPerView = false) = 0;
 
  /** \details
    Associates the specified Viewport object with this Device object.
    
    \param pView [in]  Pointer to the OdGsView object.
  */
  virtual void addView(OdGsView* pView) = 0;
 
  /** \details
    Creates a new OdGsModel object, and associates it with this Device object.
    
    \remarks
    Returns a SmartPointer to the newly created object.
  */
  virtual OdGsModelPtr createModel() = 0;
 
  /** \details
    Checks compatibility between specified OdGsModel and this Device object.
 
    \param pModel [in]  Model object pointer to check compatibility.
 
    \remarks
    Use this method to check compatibility of exist Model object and newly created device
    to be sure the exist Model object could be used with this Device object.
 
    By default this always returns false. It is must be implemented in inherited classes
    to enable Model object reuse support. If Device object use overriden Model object
    it should return false if input Model object doesn't overriden.
 
    Typical way to check compatibility is using of RTTI.
 
    If your metafiles cache doesn't support per-device sharing override and return false.
  */
  virtual bool isModelCompatible(OdGsModel* pModel) const;
 
  /** \details
    Stores current device state into filer object.
 
    \param pFiler [in]  Filer object.
  */
  virtual bool saveDeviceState(OdGsFiler *pFiler) const;
  /** \details
    Restores device state from filer object.
 
    \param pFiler [in]  Filer object.
  */
  virtual bool loadDeviceState(OdGsFiler *pFiler);
 
  /** \details
    Inserts the specified Viewport object to the specified position in this Device object.
 
    \param viewIndex [in]  View index.
    \param pView [in]  Pointer to the OdGsView object.
  */
  virtual void insertView(int viewIndex, OdGsView* pView) = 0;
 
  /** \details
    Erases the specified View object.
    \param pView [in]  Pointer to the OdGsView object.
    \param viewIndex [in]  View index.
    \remarks
    Returns true if and only if successful.
  */
  virtual bool eraseView(OdGsView* pView) = 0;
  virtual bool eraseView(int viewIndex) = 0;
 
  /** \details
    Erases all views associated with this Device object.
  */
  virtual void eraseAllViews() = 0;
 
  /** \details
    Returns the number of views associated with this Device object.
  */
  virtual int numViews() const = 0;
 
  /** \details
    Returns the specified OdGsView object associated with this Device object.
    \param viewIndex [in]  View index.
  */
  virtual OdGsView* viewAt(int viewIndex) = 0;
 
  /** \details
    Sets the Background Color of the GUI window of this Device object.
    \param backgroundColor [in]  Background color.
  */
  virtual bool setBackgroundColor(ODCOLORREF backgroundColor) = 0;
 
  /** \details
    Returns the Background Color of the GUI window of this Device object.
  */
  virtual ODCOLORREF getBackgroundColor() = 0;
 
  /** \details
    Sets the logical pallete to be used by this Device object.
    
    \param logicalPalette [in]  Logical palette.
    \param numColors [in]  Number of colors in palette.
    
    \remarks
    The logical pallete is used with calls to OdGiSubEntityTraits::setColor().
  */
  virtual void setLogicalPalette(const ODCOLORREF* logicalPalette, int numColors) = 0;
 
  /** \details
    Returns the logical pallete used by this Device object.
 
    \param numColors [out]  Number of colors in palette.
  */
  virtual const ODCOLORREF* getLogicalPalette(int &numColors) const = 0;
 
  /** \details
    Returns image of current device buffer.
 
    \param pImage [out]  Pointer for image to return.
    \param region [in]  Rectangle specifies region to return.
 
    \remarks
    Implementation can throw eNotImplementedYet exception if current vectorization module doesn't support snap shots.
  */
  virtual void getSnapShot(OdGiRasterImagePtr &pImage, const OdGsDCRect &region) = 0;
};
 
class OdGsModule;
 
/** \details
    This class is the base class for custom classes that receive notification
    of OdGs events.
    
    \note
    The default implementations of all methods in this class do nothing but return.
 
    \sa
    TD_Gs
  
    <group OdGs_Classes> 
*/
class FIRSTDLL_EXPORT OdGsReactor : public OdRxObject
{
public:
  /** \details
    Notification function called whenever a OdGsView object has been created.
    \param pView [in]  Pointer to the OdGsView object.
 
    \remarks
    This function is called after the operation.
  */
  virtual void viewWasCreated(OdGsView* pView);
 
  /** \details
    Notification function called whenever an OdGsView object is about to be destroyed.
    \param pView [in]  Pointer to the OdGsView object.
 
    \remarks
    This function is called before the operation.
  */
  virtual void viewToBeDestroyed(OdGsView* pView);
 
  /** \details
    Notification function called whenever an OdGsModule object is about to be unloaded.
    \param pModule [in]  Pointer to the OdGsModule object.
 
    \remarks
    This function is called after the operation.
  */
  virtual void gsToBeUnloaded(OdGsModule* pModule);
};
 
/** \details
    This class provides management of OdGsDevice classes.
    Library: TD_Gs 
    <group OdGs_Classes> 
*/
class FIRSTDLL_EXPORT OdGsModule : public OdRxModule
{
public:
  ODRX_DECLARE_MEMBERS(OdGsModule);
 
  /** \details
    Creates a new OdGsDevice object, and associates it with this Module object.
    \remarks
    Returns a SmartPointer to the newly created object.
  */
  virtual OdGsDevicePtr createDevice() = 0;
 
  /** \details
    Creates a new OdGsBaseVectorizeDevice object, and associates it with this Module object.
    \remarks
    Returns a SmartPointer to the newly created object.
  */
  virtual OdGsDevicePtr createBitmapDevice();
 
  /** \details
    Adds the specified reactor to this object's reactor list.
    \param pReactor [in]  Pointer to the reactor object.
  */
  virtual void addReactor(OdGsReactor* pReactor) = 0;
 
  /** \details
    Removes the specified reactor from this object's reactor list.
    \param pReactor [in]  Pointer to the reactor object.
  */
  virtual void removeReactor(OdGsReactor* pReactor) = 0;
};
 
/** \details
  This template class is a specialization of the OdSmartPtr class for OdGsModule object pointers. 
*/
typedef OdSmartPtr<OdGsModule> OdGsModulePtr;
 
/** \details
  Default Gs Marker value for highlight entire entity.
*/
const OdGsMarker kNullSubentIndex = 0;
 
#include "TD_PackPop.h"
 
#endif // __GS_H_INCLUDED_