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
/////////////////////////////////////////////////////////////////////////////// 
// 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 __ODGICONVEYORGEOMETRY_H__
#define __ODGICONVEYORGEOMETRY_H__
 
#include "Gi/GiGeometry.h"
#include "Gi/GiCommonDraw.h"
#include "Gs/GsSelectionReactor.h"
#include "Gi/GiSubEntityTraitsData.h"
 
class OdGiRasterImage;
class OdGiMetafile;
class OdGiViewport;
class OdGsView;
class OdGiCommonDraw;
class OdGiDeviation;
class OdGeExtents3d;
class OdGeBoundBlock3d;
 
/** \details
    This class implements an interface that allows conveyor nodes to interact with parent objects.
    
    \remarks
    This interface gives
    abstract access to OdGiBaseVectorizer level data and services.
    Many conveyor nodes require a pointer to an OdGiConveyorContext interface,
    in order to be initialized.
 
    Library: TD_Gi
    <group OdGi_Classes> 
*/
class OdGiConveyorContext
{
public:
  virtual ~OdGiConveyorContext() {}
 
  /** \details
    Returns the OdGiContext object associated with this ConveyorContext object.
  */
  virtual OdGiContext& giContext() const = 0;
 
  /** \details
    Returns the OdGiSubEntityTraits instance associated with this ConveyorContext object.
    
    \remarks
    The OdGiSubEntityTraits object is used to register attribute changes with
    the vectorization framework.
  */
  virtual OdGiSubEntityTraits& subEntityTraits() const = 0;
 
  /** \details
    Returns the traits currently in effect for this ConveyorContext object.
  */
  virtual const OdGiSubEntityTraitsData& effectiveTraits() const = 0;
 
  /** \details
    Sets the traits currently in effect for this ConveyorContext object.
    \param traits [in]  New traits data which will be used for effective traits substitution.
    \param fillNormal [in]  Optional fill normal.
  */
  virtual void setEffectiveTraits(const OdGiSubEntityTraitsData& traits,
                                  const OdGeVector3d* fillNormal = NULL) = 0;
 
  /** \details
    Checks the current visibility state for current traits.
  */
  virtual bool effectivelyVisible() const { return effectiveTraits().visibility(); }
 
  /** \details
    Returns the current OdGiDrawableDesc instance for this ConveyorContext object.
    
    \remarks
    This instance contains information about the current drawable object (the object itself, rendering flags, etc.).
  */
  virtual const OdGiDrawableDesc* currentDrawableDesc() const = 0;
 
  /** \details
    Returns the current OdGiDrawable object for this ConveyorContext object.
    
    \remarks
    This is the object currently being vectorized by the framework.
  */
  virtual const OdGiDrawable* currentDrawable() const = 0;
 
  /** \details
    Returns the OdGiViewport associated with this ConveyorContext object.
  */
  virtual const OdGiViewport* giViewport() const = 0;
 
  /** \details
      Returns the OdGsView associated with this ConveyorContext object.
  */
  virtual const OdGsView* gsView() const = 0;
 
  /** \details
    Notification function called by the vectorization framework
    whenever the rendering attributes have changed.
 
    \remarks
    This function is called before sending any geometry through the geometry conveyor.
 
    This function provides a hook
    for setting rendering attributes for the final geometry handler (e.g. Win GDI device).
  */
  virtual void onTraitsModified() = 0;
 
  /** \details
    Notification function called by the vectorization framework
    whenever the text is become to be rendered.
 
    \remarks
    This function provides a hook for setting geometry transformation before text was drawn.
  */
  virtual void onTextProcessing(const OdGePoint3d& /*position*/,
                                const OdGeVector3d& /*direction*/,
                                const OdGeVector3d& /*upVector*/) { }
 
  /** \details
    Returns true if and only if regen was aborted.
  */
  virtual bool regenAbort() const = 0;
 
  /** \details
    Returns current drawable nesting graph.
  */
  virtual const OdGiPathNode* currentGiPath() const = 0;
 
  /** \details
    Returns deviations array accessor for world coordinate system.
  */
  virtual const OdGiDeviation& worldDeviation() const = 0;
  /** \details
    Returns deviations array accessor for model coordinate system.
  */
  virtual const OdGiDeviation& modelDeviation() const = 0;
  /** \details
    Returns deviations array accessor for eye coordinate system.
  */
  virtual const OdGiDeviation& eyeDeviation() const = 0;
 
  enum ConveyorContextFlags
  {
    // Spatial filter as simplifier
    kSpatialFilterSimplPline = 1, // Simplify plineProc() by spatial filter
    kSpatialFilterSimplNurbs = 2, // Simplify nurbsProc() by spatial filter
    kSpatialFilterSimplText  = 4, // Simplify textProc () by spatial filter
    kSpatialFilterSimplShape = 8, // Simplify shapeProc() by spatial filter
    kSpatialFilterSimplAll   = (kSpatialFilterSimplPline | kSpatialFilterSimplNurbs |
                                kSpatialFilterSimplText  | kSpatialFilterSimplShape), // All spatial filter options
    // Conveyor embranchment as simplifier
    kEmbranchmentSimplText   = 16, // Simplify textProc () by conveyor embranchment
    kEmbranchmentSimplNurbs  = 32, // Simplify nurbsProc() by conveyor embranchment
    kEmbranchmentSimplAll    = (kEmbranchmentSimplText | kEmbranchmentSimplNurbs), // All conveyor embranchment options
    kConveyorSimplAll        = (kSpatialFilterSimplAll | kEmbranchmentSimplAll), // All simplification options
    // Pline subentity markers
    kPlineMarkers            = 64, // Enable subentity markers set per pline() call
    kForceMarkersOnModified  = 128, // Force onTraitsModified call for each subentity marker change
    // Polyline subentity markers
    kPolylineMarkers         = 256, // Enable subentity markers set per polyline() call
    // Pline geometry
    kPlineAllowArcProc       = 512, // Vectorizer will draw arc segments of polyline as arcs (otherwise as sample points)
    // Enable test-specific functionality
    kTestMode                = 1024 // Enable test mode
  };
  /** \details
    Returns set of conveyor context flags.
  */
  virtual OdUInt32 drawContextFlags() const { return 0; }
};
 
/** \details
 
    \sa
    TD_Gi 
    <group OdGi_Classes> 
*/
class OdGiConveyorContextWrapper : public OdGiConveyorContext
{
protected:
  OdGiConveyorContext *m_pCtx;
public:
  OdGiConveyorContext *getOriginalContext() const { return m_pCtx; }
  void setOriginalContext(OdGiConveyorContext *pCtx) { m_pCtx = pCtx; }
  explicit OdGiConveyorContextWrapper(OdGiConveyorContext *pCtx = NULL) : m_pCtx(pCtx) { }
 
  OdGiContext& giContext() const { return m_pCtx->giContext(); }
  OdGiSubEntityTraits& subEntityTraits() const { return m_pCtx->subEntityTraits(); }
  const OdGiSubEntityTraitsData& effectiveTraits() const { return m_pCtx->effectiveTraits(); }
  void setEffectiveTraits(const OdGiSubEntityTraitsData& traits,
                          const OdGeVector3d* fillNormal = NULL) { m_pCtx->setEffectiveTraits(traits, fillNormal); }
  bool effectivelyVisible() const { return m_pCtx->effectivelyVisible(); }
  const OdGiDrawableDesc* currentDrawableDesc() const { return m_pCtx->currentDrawableDesc(); }
  const OdGiDrawable* currentDrawable() const { return m_pCtx->currentDrawable(); }
  const OdGiViewport* giViewport() const { return m_pCtx->giViewport(); }
  const OdGsView* gsView() const { return m_pCtx->gsView(); }
  void onTraitsModified() { m_pCtx->onTraitsModified(); }
  bool regenAbort() const { return m_pCtx->regenAbort(); }
  const OdGiPathNode* currentGiPath() const { return m_pCtx->currentGiPath(); }
  const OdGiDeviation& worldDeviation() const { return m_pCtx->worldDeviation(); }
  const OdGiDeviation& modelDeviation() const { return m_pCtx->modelDeviation(); }
  const OdGiDeviation& eyeDeviation() const { return m_pCtx->eyeDeviation(); }
  OdUInt32 drawContextFlags() const { return m_pCtx->drawContextFlags(); }
};
 
/** \details
    This class defines the interface through which nodes in the Teigha vectorization
    pipeline transfer geometric data.
    \sa
    TD_Gi
    <group OdGi_Classes> 
*/
class OdGiConveyorGeometry
{
public:
  virtual ~OdGiConveyorGeometry() {}
 
  /** \details
    Processes OdGiPolyline data.
 
    \param polyline [in]  Polyline data to be processed.
    \param pXfm [in]  Pointer to a transformation matrix.
    \param fromIndex [in]  Index of the first segment to be processed.
    \param numSegs [in]  Number of segments to be processed.
    \remarks
    numSegs == 0 indicates all segments starting at fromIndex are to be processed. 
      
  */
  virtual void plineProc(const OdGiPolyline& polyline,
    const OdGeMatrix3d* pXfm = 0,
    OdUInt32 fromIndex = 0,
    OdUInt32 numSegs = 0) = 0;
 
  /** \details
    Processes simple polyline data.
 
    \param numPoints [in]  Number of points.
    \param vertexList [in]  Array of vertices.
    \param pNormal [in]  Pointer to the normal vector.
    \param pExtrusion [in]  Pointer to the extrusion vector.
    \param baseSubEntMarker [in]  Currently unused.
    \remarks
    The extrusion vector specifies the direction and distance of the extrusion.
  */
  virtual void polylineProc(
    OdInt32 numPoints, const OdGePoint3d* vertexList,
    const OdGeVector3d* pNormal = 0,
    const OdGeVector3d* pExtrusion = 0,
    OdGsMarker baseSubEntMarker = -1) = 0;
 
 
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
#pragma warning (push)
#pragma warning (disable: 4481) // Non-standard extension used
 
// The right function prototype was changed (see above). Old one left to cause compilation error
  virtual void polylineProc(
    OdInt32 /*numPoints*/, const OdGePoint3d* /*vertexList*/,
    const OdGeVector3d* /*pNormal*/,
    const OdGeVector3d* /*pExtrusion*/,
    OdInt32 /*baseSubEntMarker*/) sealed {ODA_FAIL();}
#pragma warning (pop)
#endif
 
  /** \details
    Processes polygon data.
 
    \param numPoints [in]  Number of points.
    \param vertexList [in]  Array of vertices.
    \param pNormal [in]  Pointer to the normal vector.
    \param pExtrusion [in]  Pointer to the extrusion vector.
 
    \remarks
    The extrusion vector specifies the direction and distance of the extrusion.
  */
  virtual void polygonProc(
    OdInt32 numPoints, const OdGePoint3d* vertexList,
    const OdGeVector3d* pNormal = 0,
    const OdGeVector3d* pExtrusion = 0) = 0;
 
  /** \details
    Processes Xline data.
    \param firstPoint [in]  First point.
    \param secondPoint [in]  Second point.
    \remarks
    An Xline is an infinite line passing through the 
    specified points.
  */
  virtual void xlineProc(
    const OdGePoint3d& firstPoint, const OdGePoint3d& secondPoint) = 0;
 
  /** \details
    Processes Ray data.
    
    \param basePoint [in]  Base point.
    \param throughPoint [in]  Through point
    
    \remarks
    A Ray is a semi-infinite line that starts at the basePoint, and passes 
    through the throughPoint.
  */
  virtual void rayProc(
    const OdGePoint3d& basePoint, const OdGePoint3d& throughPoint) = 0;
 
  /** \details
    Processes mesh data.
 
    \param numRows [in]  Number of rows.
    \param numColumns [in]  Number of columns.
    \param vertexList [in]  Array of vertices.
    \param pEdgeData [in]  Pointer to additional edge data.
    \param pFaceData [in]  Pointer to additional face data.
    \param pVertexData [in]  Pointer to additional vertex data. 
 
    \sa
    OdGiEdgeData
    OdGiFaceData
    OdGiVertexData
    Vectorization Primitives
  */
  virtual void meshProc(
    OdInt32 numRows, 
    OdInt32 numColumns,
    const OdGePoint3d* vertexList,
    const OdGiEdgeData* pEdgeData = 0,
    const OdGiFaceData* pFaceData = 0,
    const OdGiVertexData* pVertexData = 0) = 0;
 
  /** \details
    Processes shell data.
 
    \param numVertices [in]  Number of vertices.
    \param vertexList [in]  Array of vertices.
    \param faceListSize [in]  Number of entries in faceList.
    \param faceList [in]  Array of numbers that define the faces.
    \param pEdgeData [in]  Pointer to additional edge data.
    \param pFaceData [in]  Pointer to additional face data.
    \param pVertexData [in]  Pointer to additional vertex data. 
 
    \sa
    Vectorization Primitives      
  */
  virtual void shellProc(
    OdInt32 numVertices, const OdGePoint3d* vertexList,
    OdInt32 faceListSize, const OdInt32* faceList,
    const OdGiEdgeData* pEdgeData = 0,
    const OdGiFaceData* pFaceData = 0,
    const OdGiVertexData* pVertexData = 0) = 0;
 
  /** \details
    Process circle data. 
 
    \param center [in]  Center point.
    \param radius [in]  Radius.
    \param normal [in]  Normal vector.
    \param pExtrusion [in]  Pointer to the extrusion vector.
    \remarks
    The extrusion vector specifies the direction and distance of the extrusion.
  */
  virtual void circleProc(
    const OdGePoint3d& center, 
    double radius, 
    const OdGeVector3d& normal, 
    const OdGeVector3d* pExtrusion = 0) = 0;
 
  /** \param firstPoint [in]  First point of a 3-point circle.
    \param secondPoint [in]  Second point of a 3-point circle.
    \param thirdPoint [in]  Third point of a 3-point circle.
    \remarks
    If firstPoint, secondPoint, and thirdPoint are specified, they
    cannot be colinear and no two can be coincident.
  */
  virtual void circleProc(
    const OdGePoint3d& firstPoint, 
    const OdGePoint3d& secondPoint, 
    const OdGePoint3d& thirdPoint, 
    const OdGeVector3d* pExtrusion = 0) = 0;
  
  /** \details
    Processes circular arc data.
 
    \param center [in]  Center point.
    \param radius [in]  Radius.
    \param normal [in]  Normal vector.
    \param startVector [in]  Defines the start of this arc.
    \param sweepAngle [in]  Angle that defines the arc.
    \param arcType [in]  Arc type.
    \param pExtrusion [in]  Pointer to the extrusion vector.
    
    \remarks
    arcType must be one of the following:
    
    <table>
    Name              Value     Description
    kOdGiArcSimple    0         Unfilled.
    kOdGiArcSector    1         Filled area bounded by the arc and its center.
    kOdGiArcChord     2         Filled area bounded by the arc and its end points
    </table>
 
    The extrusion vector specifies the direction and distance of the extrusion.
    
    \note
    All angles are expressed in radians.
  */
  virtual void circularArcProc(
    const OdGePoint3d& center,
    double radius,
    const OdGeVector3d& normal,
    const OdGeVector3d& startVector,
    double sweepAngle,
    OdGiArcType arcType = kOdGiArcSimple, const OdGeVector3d* pExtrusion = 0) = 0;
  
  /** \param firstPoint [in]  First point of a 3-point arc.
    \param secondPoint [in]  Second point of a 3-point arc.
    \param thirdPoint [in]  Third point of a 3-point arc.
    \remarks
    If firstPoint, secondPoint, and thirdPoint are specified, they
    cannot be colinear and no two can be coincident.
  */
  virtual void circularArcProc(
    const OdGePoint3d& firstPoint,
    const OdGePoint3d& secondPoint,
    const OdGePoint3d& thirdPoint,
    OdGiArcType arcType = kOdGiArcSimple, const OdGeVector3d* pExtrusion = 0) = 0;
 
  /** \details
    Processes OdGeEllipArc3d data.
 
    \param ellipArc [in]  Elliptical arc.
    \param endPointOverrides [in]  Array of points to be used as the first and last points of the vectorized arc.
    \param arcType [in]  Arc type.
    \param pExtrusion [in]  Pointer to the extrusion vector.
        
    \remarks
    arcType must be one of the following:
    
    <table>
    Name              Value     Description
    kOdGiArcSimple    0         Unfilled.
    kOdGiArcSector    1         Filled area bounded by the arc and its center.
    kOdGiArcChord     3         Filled area bounded by the arc and its end points
    </table>
 
    The extrusion vector specifies the direction and distance of the extrusion.
 
  */
  virtual void ellipArcProc(
    const OdGeEllipArc3d& ellipArc,
    const OdGePoint3d* endPointOverrides = 0,
    OdGiArcType arcType = kOdGiArcSimple, const OdGeVector3d* pExtrusion = 0) = 0;
 
  /** \details
    Processes OdGeNurbCurve3d data.
    \param nurbsCurve [in]  NURBS curve data.
  */
  virtual void nurbsProc(
    const OdGeNurbCurve3d& nurbsCurve) = 0;
 
  /** \details
    Processes text data.
 
    \param position [in]  Position of the text.
    \param direction [in]  Baseline direction of the text.
    \param upVector [in]  Up vector for the text.
    \param msg [in]  Text string.
    \param numBytes [in]  Number of bytes in msg.
    \param raw [in]  If and only if true, escape sequences, such as %%P, will not be converted to special characters.
    \param pTextStyle [in]  Pointer to the TextStyle for the text.
    \param pExtrusion [in]  Pointer to the extrusion vector.
 
    \remarks
    The extrusion vector specifies the direction and distance of the extrusion.
  */
  virtual void textProc(
    const OdGePoint3d& position,
    const OdGeVector3d& direction, 
    const OdGeVector3d& upVector,
    const OdChar* msg, 
    OdInt32 numBytes, 
    bool raw, 
    const OdGiTextStyle* pTextStyle,
    const OdGeVector3d* pExtrusion = 0) = 0;
 
  virtual void textProc2(
    const OdGePoint3d& position,
    const OdGeVector3d& direction, 
    const OdGeVector3d& upVector,
    const OdChar* msg, 
    OdInt32 numBytes, 
    bool raw, 
    const OdGiTextStyle* pTextStyle,
    const OdGeVector3d* pExtrusion = 0,
    const OdGeExtents3d* /*extentsBox*/ = 0)
  {
    textProc(position, direction, upVector, msg, numBytes, raw, pTextStyle, pExtrusion);
  }
 
  /** \details
    Processes shape data.
 
    \param position [in]  Position of the shape.
    \param direction [in]  Baseline direction of the shape.
    \param upVector [in]  Up vector for the shape.
    \param shapeNumber [in]  Shape number.
    \param pTextStyle [in]  Pointer to the TextStyle for the shape.
    \param pExtrusion [in]  Pointer to the extrusion vector.
 
    \remarks
    The extrusion vector specifies the direction and distance of the extrusion.
  */
  virtual void shapeProc(
    const OdGePoint3d& position,
    const OdGeVector3d& direction, 
    const OdGeVector3d& upVector,
    int shapeNumber, 
    const OdGiTextStyle* pTextStyle,
    const OdGeVector3d* pExtrusion = 0) = 0;
 
  /** \details
    Processes raster images data.
 
    \param origin [in]  Lower-left corner. 
    \param u [in]  Image width vector.
    \param v [in]  Image height vector.
    \param pImage [in]  Pointer to the RasterImage object.
    \param uvBoundary [in]  Array of image boundary points (may not be null).
    \param numBoundPts [in]  Number of boundary points.
    \param transparency [in]  True if and only if image transparency is on.
    \param brightness [in]  Image brightness [0.0 .. 100.0].
    \param contrast [in]  Image contrast [0.0 .. 100.0].
    \param fade [in]  Image fade value [0.0 .. 100.0].
  */
  virtual void rasterImageProc(
    const OdGePoint3d& origin,
    const OdGeVector3d& u,
    const OdGeVector3d& v,
    const OdGiRasterImage* pImage, 
    const OdGePoint2d* uvBoundary, 
    OdUInt32 numBoundPts,
    bool transparency = false,
    double brightness = 50.0,
    double contrast = 50.0,
    double fade = 0.0) = 0;
 
  /** \details
    Processes metafile data.
 
    \param origin [in]  Metafile origin.
    \param u [in]  Metafile width vector.
    \param v [in]  Metafile height vector.
    \param pMetafile [in]  Pointer to the metafile object.
    \param dcAligned [in]  reserved.
    \param allowClipping [in]  reserved.
  */
  virtual void metafileProc(
    const OdGePoint3d& origin,
    const OdGeVector3d& u,
    const OdGeVector3d& v,
    const OdGiMetafile* pMetafile,
    bool dcAligned = true,
    bool allowClipping = false) = 0;
 
  virtual void xlineProc2(const OdGePoint3d& basePoint, const OdGeVector3d& direction)
  {
    xlineProc(basePoint, basePoint + direction);
  }
  virtual void rayProc2(const OdGePoint3d& basePoint, const OdGeVector3d& direction)
  {
    rayProc(basePoint, basePoint + direction);
  }
 
  virtual void setExtentsProc(const OdGePoint3d * /*pPoints*/, bool /*bTransform*/ = true) { }
 
  enum ETtfCharProcFlags
  {
    kTtfCharProcEnable     = 1,
    kTtfCharProcBoundBlock = 2
  };
  virtual int ttfCharProcFlags() const { return 0; }
  virtual bool ttfCharProc(OdChar /*character*/, const OdGePoint3d& /*position*/,
    const OdGeBoundBlock3d* /*pBoundBlock*/) { return false; }
 
  virtual void ttfPolyDrawProc(
    OdInt32 numVertices, const OdGePoint3d* vertexList,
    OdInt32 faceListSize, const OdInt32* faceList,
    const OdUInt8* /*pBezierTypes*/, const OdGiFaceData* pFaceData = 0)
  {
    shellProc(numVertices, vertexList, faceListSize, faceList, 0, pFaceData);
  }
 
  enum EConveyorBoundaryInfoFlags
  {
    kBoundaryProcXform       = 1, // Non-identity Xform available at least once
    kBoundaryProcXformNonUni = 2, // Non-uni-scale Xform available at least once
    kBoundaryProcProjection  = 4, // Projective Xform available at least once
    kBoundaryProcClip        = 8, // Boundary clipped partially or completely at least once
    kBoundaryProcClipFull   = 16 // Boundary completely clipped at least once
  };
  virtual void conveyorBoundaryInfoProc(
    const OdGeBoundBlock3d & /*boundBlock*/, // {I} represent block for apply check
    OdUInt32 & /*outputFlags*/) // {O} will represent set of EConveyorBoundaryInfoFlags flags on out
  {
  }
 
  void polypointProc2(OdGiConveyorContext* pContext,
    OdInt32 numPoints, const OdGePoint3d* vertexList, const OdCmEntityColor* pColors = 0,
    const OdCmTransparency *pTransparency = 0, const OdGeVector3d* pNormals = 0, const OdGeVector3d* pExtrusions = 0,
    const OdGsMarker* pSubEntMarkers = 0, OdInt32 nPointSize = 0);
  void rowOfDotsProc2(OdInt32 numPoints, const OdGePoint3d& startPoint, const OdGeVector3d& dirToNextPoint);
 
  /** \details
    Processes array of points.
 
    \param numPoints [in]  Number of points.
    \param vertexList [in]  Array of vertices.
    \param pNormals [in]  Array of normal vectors.
    \param pExtrusions [in]  Array of extrusion vectors.
    \param pSubEntMarkers [in]  Array of subentity markers.
    \remarks
    The extrusion vectors specifies the direction and distance of the extrusion.
  */
  virtual void polypointProc(
    OdInt32 numPoints, const OdGePoint3d* vertexList, const OdCmEntityColor* pColors,
    const OdCmTransparency* pTransparency = 0, const OdGeVector3d* pNormals = 0, const OdGeVector3d* pExtrusions = 0,
    const OdGsMarker* pSubEntMarkers = 0, OdInt32 nPointSize = 0) = 0;
 
  /** \details
    Processes row of points.
 
    \param numPoints [in]  Number of points.
    \param startPoint [in]  First point to draw.
    \param dirToNextPoint [in]  Offset to next point.
  */
  virtual void rowOfDotsProc(
    OdInt32 numPoints, const OdGePoint3d& startPoint, const OdGeVector3d& dirToNextPoint) = 0;
 
  /** \details
    Processes hatch boundary.
 
    \param edges [in]  2d curves array.
    \param pXform [in]  Optional boundary transform matrix.
  */
  virtual void edgeProc(
    const OdGiEdge2dArray& edges, const OdGeMatrix3d* pXform = 0) = 0;
};
 
inline
void OdGiConveyorGeometry::polypointProc2(OdGiConveyorContext* pContext,
  OdInt32 numPoints, const OdGePoint3d* vertexList, const OdCmEntityColor* pColors,
  const OdCmTransparency* pTransparency, const OdGeVector3d* pNormals, const OdGeVector3d* pExtrusions,
  const OdGsMarker* pSubEntMarkers, OdInt32 /*nPointSize*/)
{
  OdGePoint3d tmpVerts[2];
  for (OdInt32 nPoint = 0; nPoint < numPoints; nPoint++)
  {
    OdGsMarker baseSubEntMarker = -1;
    if ((pColors || pTransparency || pSubEntMarkers) && pContext)
    {
      if (pColors)
        pContext->subEntityTraits().setTrueColor(pColors[nPoint]);
      if (pTransparency)
        pContext->subEntityTraits().setTransparency(pTransparency[nPoint]);
      if (pSubEntMarkers)
        pContext->subEntityTraits().setSelectionMarker(pSubEntMarkers[nPoint]);
      pContext->onTraitsModified();
    }
    else if (pSubEntMarkers)
      baseSubEntMarker = pSubEntMarkers[nPoint];
    const OdGeVector3d *pNormal = (pNormals) ? (pNormals + nPoint) : NULL;
    const OdGeVector3d *pExtrusion = (pExtrusions) ? (pExtrusions + nPoint) : NULL;
    tmpVerts[1] = tmpVerts[0] = vertexList[nPoint];
    polylineProc(2, tmpVerts, pNormal, pExtrusion, baseSubEntMarker);
  }
}
 
inline
void OdGiConveyorGeometry::rowOfDotsProc2(OdInt32 numPoints, const OdGePoint3d& startPoint, const OdGeVector3d& dirToNextPoint)
{
  OdGePoint3d tmpVerts[2];
  for (OdInt32 nPoint = 0; nPoint < numPoints; nPoint++)
  {
    tmpVerts[1] = tmpVerts[0] = startPoint + dirToNextPoint * double(nPoint);
    polylineProc(2, tmpVerts);
  }
}
 
#endif //#ifndef __ODGICONVEYORGEOMETRY_H__