CFx SDK Documentation  2023 SP0
GiDummyGeometry.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef _ODGIDUMMYGEOM_INCLUDED_
25 #define _ODGIDUMMYGEOM_INCLUDED_
26 
27 #include "Gi/Gi.h"
28 #include "Gi/GiWorldDraw.h"
29 #include "Gi/GiViewportDraw.h"
31 #include "OdStack.h"
32 #include "StaticRxObject.h"
33 
34 #include "TD_PackPush.h"
35 
41 template <class T> class OdGiWrapperGeometry : public T
42 {
43  OdGiGeometry *m_Geom;
44 protected:
45  void setGeom(OdGiGeometry &Geom) { m_Geom = &Geom; }
46  OdGiGeometry &getGeom() { return *m_Geom; }
47 public:
48  virtual void pline(const OdGiPolyline& p, OdUInt32 i, OdUInt32 n)
49  {
50  m_Geom->pline(p, i, n);
51  }
52 
54  {
55  return m_Geom->getModelToWorldTransform();
56  }
58  {
59  return m_Geom->getWorldToModelTransform();
60  }
61 
62  virtual void pushModelTransform(const OdGeVector3d& vNormal)
63  {
64  m_Geom->pushModelTransform(vNormal);
65  }
66  virtual void pushModelTransform(const OdGeMatrix3d& xMat)
67  {
68  m_Geom->pushModelTransform(xMat);
69  }
70  virtual void popModelTransform()
71  {
72  m_Geom->popModelTransform();
73  }
74 
75  // For drawing various primitives.
76  //
77  virtual void circle(const OdGePoint3d& center, double radius, const OdGeVector3d& normal)
78  {
79  m_Geom->circle(center, radius, normal);
80  }
81 
82  virtual void circle(const OdGePoint3d& p1, const OdGePoint3d& p2, const OdGePoint3d& p3)
83  {
84  m_Geom->circle(p1, p2, p3);
85  }
86 
87  virtual void circularArc(const OdGePoint3d& center,
88  double radius,
89  const OdGeVector3d& normal,
90  const OdGeVector3d& startVector,
91  double sweepAngle,
92  OdGiArcType arcType = kOdGiArcSimple)
93  {
94  m_Geom->circularArc(center, radius, normal, startVector, sweepAngle, arcType);
95  }
96 
97  virtual void circularArc(const OdGePoint3d& start,
98  const OdGePoint3d& point,
99  const OdGePoint3d& end,
100  OdGiArcType arcType = kOdGiArcSimple)
101  {
102  m_Geom->circularArc(start, point, end, arcType);
103  }
104 
105  virtual void polyline(OdInt32 nbPoints,
106  const OdGePoint3d* pVertexList,
107  const OdGeVector3d* pNormal = NULL,
108  OdGsMarker lBaseSubEntMarker = -1)
109  {
110  m_Geom->polyline(nbPoints, pVertexList, pNormal, lBaseSubEntMarker);
111  }
112 
113  virtual void polygon(OdInt32 nbPoints, const OdGePoint3d* pVertexList)
114  {
115  m_Geom->polygon(nbPoints, pVertexList);
116  }
117  virtual void polygon(OdInt32 nbPoints, const OdGePoint3d* pVertexList, const OdGeVector3d* pNormal)
118  {
119  m_Geom->polygon(nbPoints, pVertexList, pNormal);
120  }
121 
122  virtual void mesh(OdInt32 rows,
123  OdInt32 columns,
124  const OdGePoint3d* pVertexList,
125  const OdGiEdgeData* pEdgeData = NULL,
126  const OdGiFaceData* pFaceData = NULL,
127  const OdGiVertexData* pVertexData = NULL)
128  {
129  m_Geom->mesh(rows, columns, pVertexList, pEdgeData, pFaceData, pVertexData);
130  }
131 
132  virtual void shell(OdInt32 nbVertex,
133  const OdGePoint3d* pVertexList,
134  OdInt32 faceListSize,
135  const OdInt32* pFaceList,
136  const OdGiEdgeData* pEdgeData = NULL,
137  const OdGiFaceData* pFaceData = NULL,
138  const OdGiVertexData* pVertexData = NULL)
139  {
140  m_Geom->shell(nbVertex, pVertexList, faceListSize, pFaceList, pEdgeData, pFaceData, pVertexData);
141  }
142 
143  virtual void text(const OdGePoint3d& position,
144  const OdGeVector3d& normal, const OdGeVector3d& direction,
145  double height, double width, double oblique, const OdString& msg)
146  {
147  m_Geom->text(position, normal, direction, height, width, oblique, msg);
148  }
149 
150  virtual void text(const OdGePoint3d& position,
151  const OdGeVector3d& normal, const OdGeVector3d& direction,
152  const OdChar* msg, OdInt32 length, bool raw, const OdGiTextStyle* pTextStyle)
153  {
154  m_Geom->text(position, normal, direction, msg, length, raw, pTextStyle);
155  }
156 
157  void ray(const OdGePoint3d& first, const OdGePoint3d& second)
158  {
159  m_Geom->ray(first, second);
160  }
161 
162  virtual void nurbs(const OdGeNurbCurve3d& nurbs)
163  {
164  m_Geom->nurbs(nurbs);
165  }
166 
167  virtual void xline(const OdGePoint3d& p1, const OdGePoint3d& p2)
168  {
169  m_Geom->xline(p1, p2);
170  }
171 
172  virtual void ellipArc(const OdGeEllipArc3d& arc,
173  const OdGePoint3d* pEndPointsOverrides = 0,
174  OdGiArcType arcType = kOdGiArcSimple)
175  {
176  m_Geom->ellipArc(arc, pEndPointsOverrides, arcType);
177  }
178 
179  virtual void draw(const OdGiDrawable* pD)
180  {
181  m_Geom->draw(pD);
182  }
183 
184  virtual void pushClipBoundary(OdGiClipBoundary* pBoundary)
185  {
186  m_Geom->pushClipBoundary(pBoundary);
187  }
188  virtual void popClipBoundary()
189  {
190  m_Geom->popClipBoundary();
191  }
192 
193  virtual void worldLine(const OdGePoint3d pnts[2])
194  {
195  m_Geom->worldLine(pnts);
196  }
197 
198  virtual void image(const OdGiImageBGRA32& img,
199  const OdGePoint3d& origin,
200  const OdGeVector3d& uVec,
201  const OdGeVector3d& vVec,
203  {
204  m_Geom->image(img, origin, uVec, vVec, trpMode);
205  }
206 
207  virtual void edge(const OdGiEdge2dArray& edges)
208  {
209  m_Geom->edge(edges);
210  }
211 
212  virtual void polypoint(OdInt32 numPoints, const OdGePoint3d* vertexList, const OdCmEntityColor* pColors, const OdCmTransparency* pTransparency,
213  const OdGeVector3d* pNormals, const OdGsMarker* pSubEntMarkers, OdInt32 nPointSize)
214  {
215  m_Geom->polypoint(numPoints, vertexList, pColors, pTransparency, pNormals, pSubEntMarkers, nPointSize);
216  }
217 
218  virtual void rowOfDots(OdInt32 numPoints, const OdGePoint3d& startPoint, const OdGeVector3d& dirToNextPoint)
219  {
220  m_Geom->rowOfDots(numPoints, startPoint, dirToNextPoint);
221  }
222 };
223 
229 template <class T> class OdGiWrapperWorldGeometry : public OdGiWrapperGeometry< T >
230 {
231 public:
232  virtual void setExtents(const OdGePoint3d *newExtents) { ((OdGiWorldGeometry&)(OdGiWrapperGeometry< T >::getGeom())).setExtents(newExtents); }
233  virtual void startAttributesSegment() { ((OdGiWorldGeometry&)(OdGiWrapperGeometry< T >::getGeom())).startAttributesSegment(); }
234 };
235 
241 template <class T> class OdGiWrapperViewportGeometry : public OdGiWrapperGeometry< T >
242 {
243 public:
244  virtual void polylineEye(
245  OdUInt32 numVertices,
246  const OdGePoint3d* vertexList) { ((OdGiViewportGeometry&)(OdGiWrapperGeometry< T >::getGeom())).polylineEye(numVertices, vertexList); }
247 
248  virtual void polygonEye(
249  OdUInt32 numVertices,
250  const OdGePoint3d* vertexList) { ((OdGiViewportGeometry&)(OdGiWrapperGeometry< T >::getGeom())).polygonEye(numVertices, vertexList); }
251 
252  virtual void polylineDc(
253  OdUInt32 numVertices,
254  const OdGePoint3d* vertexList) { ((OdGiViewportGeometry&)(OdGiWrapperGeometry< T >::getGeom())).polylineDc(numVertices, vertexList); }
255 
256  virtual void polygonDc(
257  OdUInt32 numVertices,
258  const OdGePoint3d* vertexList) { ((OdGiViewportGeometry&)(OdGiWrapperGeometry< T >::getGeom())).polygonDc(numVertices, vertexList); }
259 
260  virtual void rasterImageDc(
261  const OdGePoint3d& origin,
262  const OdGeVector3d& u,
263  const OdGeVector3d& v,
264  const OdGiRasterImage* pImage,
265  const OdGePoint2d* uvBoundary,
266  OdUInt32 numBoundPts,
267  bool transparency = false,
268  double brightness = 50.0,
269  double contrast = 50.0,
270  double fade = 0.0) { ((OdGiViewportGeometry&)(OdGiWrapperGeometry< T >::getGeom())).rasterImageDc(origin,u,v,pImage, uvBoundary, numBoundPts,transparency,brightness,contrast,fade); }
271 
272  virtual void metafileDc(
273  const OdGePoint3d& origin,
274  const OdGeVector3d& u,
275  const OdGeVector3d& v,
276  const OdGiMetafile* pMetafile,
277  bool dcAligned = true,
278  bool allowClipping = false) { ((OdGiViewportGeometry&)(OdGiWrapperGeometry< T >::getGeom())).metafileDc(origin,u,v,pMetafile,dcAligned,allowClipping); }
279 
280  virtual void ownerDrawDc(
281  const OdGePoint3d& origin,
282  const OdGeVector3d& u,
283  const OdGeVector3d& v,
284  const OdGiSelfGdiDrawable* pDrawable,
285  bool dcAligned = true,
286  bool allowClipping = false) { ((OdGiViewportGeometry&)(OdGiWrapperGeometry< T >::getGeom())).ownerDrawDc(origin,u,v,pDrawable,dcAligned,allowClipping); }
287 };
288 
294 template <class TInterface, class TData>
295 class OdGiSubEntityTraitsToDataWrapper : public TInterface
296 {
297  protected:
298  TData *m_pTraits;
299  public:
301 
302  void setTraits(TData &pTraits) { m_pTraits = &pTraits; }
303  TData &getTraits() const { return *m_pTraits; }
304 
305  void setColor(OdUInt16 n) { m_pTraits->setColor(n); }
306  void setTrueColor(const OdCmEntityColor& n) { m_pTraits->setTrueColor(n); }
307  void setLayer(OdDbStub* n) { m_pTraits->setLayer(n); }
308  void setLineType(OdDbStub* n) { m_pTraits->setLineType(n); }
309  void setSelectionMarker(OdGsMarker /*n*/) { } // Stub
310  void setFillType(OdGiFillType n) { m_pTraits->setFillType(n); }
311  void setFillPlane(const OdGeVector3d* /*n*/ = 0) { } // Stub
312  void setLineWeight(OdDb::LineWeight n) { m_pTraits->setLineWeight(n); }
313  void setLineTypeScale(double n = 1.0) { m_pTraits->setLineTypeScale(n); }
314  void setThickness(double n) { m_pTraits->setThickness(n); }
315  void setPlotStyleName(OdDb::PlotStyleNameType n, OdDbStub* m = 0) { m_pTraits->setPlotStyleName(n, m); }
316  void setMaterial(OdDbStub* n) { m_pTraits->setMaterial(n); }
317  void setMapper(const OdGiMapper * n) { m_pTraits->setMapper(n); }
318  void setVisualStyle(const OdDbStub* n) { m_pTraits->setVisualStyle(const_cast<OdDbStub*>(n)); }
321  void setSelectionGeom(bool bSelectionFlag) { m_pTraits->setSelectionGeom(bSelectionFlag); }
323  void setSectionable(bool bSectionableFlag) { m_pTraits->setSectionable(bSectionableFlag); }
325  void setSecondaryTrueColor(const OdCmEntityColor& n) { m_pTraits->setSecondaryTrueColor(n); }
326  void setLineStyleModifiers(const OdGiDgLinetypeModifiers* pLSMod) { m_pTraits->setLineStyleModifiers(pLSMod); }
327  void setFill(const OdGiFill* pFill) { m_pTraits->setFill(pFill); }
328 
329  OdUInt16 color() const { return m_pTraits->color(); }
330  OdCmEntityColor trueColor() const { return m_pTraits->trueColor(); }
331  OdDbStub* layer() const { return m_pTraits->layer(); }
332  OdDbStub* lineType() const { return m_pTraits->lineType(); }
333  OdGiFillType fillType() const { return m_pTraits->fillType(); }
334  bool fillPlane(OdGeVector3d& /*n*/) { return false; } // Stub
335  OdDb::LineWeight lineWeight() const { return m_pTraits->lineWeight(); }
336  double lineTypeScale() const { return m_pTraits->lineTypeScale(); }
337  double thickness() const { return m_pTraits->thickness(); }
338  OdDb::PlotStyleNameType plotStyleNameType() const { return m_pTraits->plotStyleNameType(); }
339  OdDbStub* plotStyleNameId() const { return m_pTraits->plotStyleNameId(); }
340  OdDbStub* material() const { return m_pTraits->material(); }
341  const OdGiMapper* mapper() const { return m_pTraits->mapper(); }
342  OdDbStub* visualStyle() const { return m_pTraits->visualStyle(); }
343  OdCmTransparency transparency() const { return m_pTraits->transparency(); }
344  OdUInt32 drawFlags() const { return m_pTraits->drawFlags(); }
345  bool selectionGeom() const { return m_pTraits->selectionGeom(); }
346  OdGiSubEntityTraits::ShadowFlags shadowFlags() const { return m_pTraits->shadowFlags(); }
347  bool sectionable() const { return m_pTraits->sectionable(); }
348  OdGiSubEntityTraits::SelectionFlags selectionFlags() const { return m_pTraits->selectionFlags(); }
349  OdCmEntityColor secondaryTrueColor() const { return m_pTraits->secondaryTrueColor(); }
350  const OdGiDgLinetypeModifiers* lineStyleModifiers() const { return m_pTraits->lineStyleModifiers(); }
351  const OdGiFill* fill() const { return m_pTraits->fill(); }
352 };
353 
359 class OdGiSubEntityTraitsToData : public OdGiSubEntityTraitsToDataWrapper<OdStaticRxObject<OdGiSubEntityTraits>, OdGiSubEntityTraitsData>
361 {
362  public:
365 
367  {
368  if (GETBIT(nFlags, kColorChanged)) pTo.setTrueColor(pFrom.trueColor());
369  if (GETBIT(nFlags, kLayerChanged)) pTo.setLayer(pFrom.layer());
370  if (GETBIT(nFlags, kLineTypeChanged)) pTo.setLineType(pFrom.lineType());
371  if (GETBIT(nFlags, kFillTypeChanged)) pTo.setFillType(pFrom.fillType());
372  if (GETBIT(nFlags, kLineWeightChanged)) pTo.setLineWeight(pFrom.lineWeight());
373  if (GETBIT(nFlags, kLineTypeScaleChanged)) pTo.setLineTypeScale(pFrom.lineTypeScale());
374  if (GETBIT(nFlags, kThicknessChanged)) pTo.setThickness(pFrom.thickness());
375  if (GETBIT(nFlags, kPlotStyleChanged)) pTo.setPlotStyleName(pFrom.plotStyleNameType(), pFrom.plotStyleNameId());
376  if (GETBIT(nFlags, kMaterialChanged)) pTo.setMaterial(pFrom.material());
377  if (GETBIT(nFlags, kMapperChanged)) pTo.setMapper(pFrom.mapper());
378  if (GETBIT(nFlags, kVisualStyleChanged)) pTo.setVisualStyle(pFrom.visualStyle());
379  if (GETBIT(nFlags, kTransparencyChanged)) pTo.setTransparency(pFrom.transparency());
380  if (GETBIT(nFlags, kDrawFlagsChanged)) pTo.setDrawFlags(pFrom.drawFlags());
381  if (GETBIT(nFlags, kSelectionGeomChanged)) pTo.setSelectionGeom(pFrom.selectionGeom());
382  if (GETBIT(nFlags, kShadowFlagsChanged)) pTo.setShadowFlags(pFrom.shadowFlags());
383  if (GETBIT(nFlags, kSectionableChanged)) pTo.setSectionable(pFrom.sectionable());
387  if (GETBIT(nFlags, kFillChanged)) pTo.setFill(pFrom.fill());
388  }
389 };
390 
396 template<class T> class OdGiSubEntityTraitsWrapper : public OdGiSubEntityTraitsToDataWrapper<T, OdGiSubEntityTraits>
397 {
398 private:
400 protected:
401  void setTraits(OdGiSubEntityTraits &pTraits) { baseTraits() = &pTraits; }
402  OdGiSubEntityTraits &getTraits() { return *baseTraits(); }
403 public:
405 
406  // no refcounting
407  void addRef() { baseTraits()->addRef(); }
408  // no refcounting
409  void release() { baseTraits()->release(); }
410 
411  void setSelectionMarker(OdGsMarker n) { baseTraits()->setSelectionMarker(n); }
412  void setFillPlane(const OdGeVector3d* n = 0) { baseTraits()->setFillPlane(n); }
413 
414  bool fillPlane(OdGeVector3d& n) { return baseTraits()->fillPlane(n); }
415 };
416 
422 template<class T> class OdGiWrapperCommonDraw : public T
423 {
424  OdGiCommonDraw *m_pD;
425 protected:
426  void setDraw(OdGiCommonDraw &pD) { m_pD = &pD; }
427  OdGiCommonDraw *getDraw() const { return m_pD; }
428 public:
429  OdGiWrapperCommonDraw() : m_pD(0) {}
430  virtual OdGiGeometry& rawGeometry() const { return m_pD->rawGeometry(); }
431  virtual OdGiRegenType regenType() const { return m_pD->regenType(); }
432  virtual bool regenAbort() const { return m_pD->regenAbort(); }
433  virtual OdGiSubEntityTraits& subEntityTraits() const { return m_pD->subEntityTraits(); }
434  virtual bool isDragging() const { return m_pD->isDragging(); }
435  virtual OdGiContext* context() const { return m_pD->context(); }
436  virtual OdUInt32 numberOfIsolines() const { return m_pD->numberOfIsolines(); }
437  virtual const OdGiPathNode* currentGiPath() const { return m_pD->currentGiPath(); }
438  virtual bool displayModelerSilhouettes() const { return m_pD->displayModelerSilhouettes(); }
439  virtual double deviation(const OdGiDeviationType t, const OdGePoint3d& p) const { return m_pD->deviation(t, p); }
440 };
441 
447 template<class T> class OdGiWrapperViewportDraw : public OdGiWrapperCommonDraw< T >
448 {
449 public:
450  virtual OdGiViewport& viewport() const { return ((OdGiViewportDraw*)(OdGiWrapperCommonDraw< T >::getDraw()))->viewport(); }
452  virtual OdUInt32 sequenceNumber() const { return ((OdGiViewportDraw*)(OdGiWrapperCommonDraw< T >::getDraw()))->sequenceNumber(); }
453  virtual bool isValidId(const OdUInt32 viewportId) const { return ((OdGiViewportDraw*)(OdGiWrapperCommonDraw< T >::getDraw()))->isValidId(viewportId); }
454  virtual OdDbStub* viewportObjectId() const { return ((OdGiViewportDraw*)(OdGiWrapperCommonDraw< T >::getDraw()))->viewportObjectId(); }
455 };
456 
462 template<class T> class OdGiWrapperWorldDraw : public OdGiWrapperCommonDraw< T >
463 {
464 public:
465  virtual OdGiWorldGeometry& geometry() const { return ((OdGiWorldDraw*)(OdGiWrapperCommonDraw< T >::getDraw()))->geometry(); }
466 };
467 
473 class OdGiViewportDraw_Stub : public OdGiWrapperViewportDraw<OdGiViewportDraw>
474  , public OdGiWrapperViewportGeometry<OdGiViewportGeometry>
475  , public OdGiSubEntityTraitsWrapper<OdGiSubEntityTraits>
476 {
477 public:
479 
481  {
482  setDraw(pVD);
483  setGeom(pVG);
484  setTraits(pST);
485  }
486 
487  virtual OdGiGeometry& rawGeometry() const { return *static_cast<OdGiGeometry*>(const_cast<OdGiViewportDraw_Stub*>(this)); }
488  virtual OdGiSubEntityTraits& subEntityTraits() const { return *static_cast<OdGiSubEntityTraits*>(const_cast<OdGiViewportDraw_Stub*>(this)); }
489  virtual OdGiViewportGeometry& geometry() const { return *static_cast<OdGiViewportGeometry*>(const_cast<OdGiViewportDraw_Stub*>(this)); }
490 
491  void addRef() { }
492  void release() { }
493 };
494 
500 class OdGiWorldDraw_Stub : public OdGiWrapperWorldDraw<OdGiWorldDraw>
501  , public OdGiWrapperWorldGeometry<OdGiWorldGeometry>
502  , public OdGiSubEntityTraitsWrapper<OdGiSubEntityTraits>
503 {
504 public:
506 
508  {
509  setDraw(pVD);
510  setGeom(pVG);
511  setTraits(pST);
512  }
513 
514  virtual OdGiGeometry& rawGeometry() const { return *static_cast<OdGiGeometry*>(const_cast<OdGiWorldDraw_Stub*>(this)); }
515  virtual OdGiSubEntityTraits& subEntityTraits() const { return *static_cast<OdGiSubEntityTraits*>(const_cast<OdGiWorldDraw_Stub*>(this)); }
516  virtual OdGiWorldGeometry& geometry() const { return *static_cast<OdGiWorldGeometry*>(const_cast<OdGiWorldDraw_Stub*>(this)); }
517 
518  void addRef() { }
519  void release() { }
520 };
521 
527 template <class T> class OdGiDummyGeometry : public T
528 {
529 public:
530  void circle(const OdGePoint3d& /*center*/, double /*radius*/, const OdGeVector3d& /*normal*/) {}
531 
532  void circle(const OdGePoint3d& /*firstPoint*/, const OdGePoint3d& /*secondPoint*/, const OdGePoint3d& /*thirdPoint*/) {}
533 
534  void circularArc(const OdGePoint3d& /*center*/,
535  double /*radius*/,
536  const OdGeVector3d& /*normal*/,
537  const OdGeVector3d& /*startVector*/,
538  double /*sweepAngle*/,
539  OdGiArcType /*arcType*/ = kOdGiArcSimple) {}
540 
541  void circularArc(const OdGePoint3d& /*firstPoint*/,
542  const OdGePoint3d& /*secondPoint*/,
543  const OdGePoint3d& /*thirdPoint*/,
544  OdGiArcType /*arcType */= kOdGiArcSimple) {}
545 
546  void polyline(OdInt32 /*numVertices*/,
547  const OdGePoint3d* /*vertexList*/,
548  const OdGeVector3d* /*pNormal */= 0,
549  OdGsMarker /*baseSubEntMarker */= -1) {}
550 
551  void polygon(OdInt32 /*numVertices*/, const OdGePoint3d* /*vertexList*/) {}
552  void polygon(OdInt32 /*numVertices*/, const OdGePoint3d* /*vertexList*/, const OdGeVector3d* /*pNormal*/) {}
553 
554  void pline(const OdGiPolyline& /*polylPine*/, OdUInt32 /*fromIndex */= 0, OdUInt32 /*numSegs */= 0) {}
555 
556  void shape(const OdGePoint3d& /*position*/,
557  const OdGeVector3d& /*normal*/, const OdGeVector3d& /*direction*/,
558  int /*shapeNumber*/, const OdGiTextStyle* /*pTextStyle*/) {}
559 
560  void text(const OdGePoint3d& /*position*/,
561  const OdGeVector3d& /*normal*/, const OdGeVector3d& /*direction*/,
562  double /*height*/, double /*width*/, double /*oblique*/, const OdString& /*msg*/) {}
563 
564  void text(const OdGePoint3d& /*position*/,
565  const OdGeVector3d& /*normal*/, const OdGeVector3d& /*direction*/,
566  const OdChar* /*msg*/, OdInt32 /*length*/, bool /*raw*/, const OdGiTextStyle* /*pTextStyle*/) {}
567 
568 
569  void xline(const OdGePoint3d& /*firstPoint*/, const OdGePoint3d& /*secondPoint*/) {}
570 
571  void ray(const OdGePoint3d& /*basePoint*/, const OdGePoint3d& /*throughPoint */) {}
572 
573  void nurbs(const OdGeNurbCurve3d& /*nurbsCurve*/) {}
574 
575  void ellipArc(const OdGeEllipArc3d& /*ellipArc*/,
576  const OdGePoint3d* /*endPointsOverrides */= 0,
577  OdGiArcType /*arcType */= kOdGiArcSimple) {}
578 
579  void mesh(OdInt32 /*numRows*/,
580  OdInt32 /*numColumns*/,
581  const OdGePoint3d* /*vertexList*/,
582  const OdGiEdgeData* /*pEdgeData */= 0,
583  const OdGiFaceData* /*pFaceData */= 0,
584  const OdGiVertexData* /*pVertexData */= 0) {}
585 
586  void shell(OdInt32 /*numVertices*/,
587  const OdGePoint3d* /*vertexList*/,
588  OdInt32 /*faceListSize*/,
589  const OdInt32* /*faceList*/,
590  const OdGiEdgeData* /*pEdgeData */= 0,
591  const OdGiFaceData* /*pFaceData */= 0,
592  const OdGiVertexData* /*pVertexData */= 0) {}
593 
594  void worldLine(const OdGePoint3d /*points*/[2]) {}
595 
596  void image(const OdGiImageBGRA32& /*img*/,
597  const OdGePoint3d& /*origin*/,
598  const OdGeVector3d& /*uVec*/,
599  const OdGeVector3d& /*vVec*/,
601 
602  virtual void edge(const OdGiEdge2dArray& /*edges*/) {}
603 
604  void polypoint(OdInt32 /*numPoints*/, const OdGePoint3d* /*vertexList*/, const OdCmEntityColor* /*pColors*/, const OdCmTransparency* /*pTransparency*/,
605  const OdGeVector3d* /*pNormals*/, const OdGsMarker* /*pSubEntMarkers*/, OdInt32 /*nPointSize*/) {}
606 
607  void rowOfDots(OdInt32 /*numPoints*/, const OdGePoint3d& /*startPoint*/, const OdGeVector3d& /*dirToNextPoint*/) {}
608 
609  void setExtents(const OdGePoint3d * /*newExtents*/) {}
610 
611  void pushClipBoundary(OdGiClipBoundary* /*pBoundary*/) {}
612  void popClipBoundary() {}
613  void draw(const OdGiDrawable* /*pDrawable*/) {}
614 
615  void pushModelTransform(const OdGeMatrix3d& /*xMat*/) { }
616 
617  void pushModelTransform(const OdGeVector3d& /*normal*/) { }
618 
619  void popModelTransform() { }
620 
622 
624 };
625 
631 template <class T> class OdGiDummyWorldGeometry : public OdGiDummyGeometry< T >
632 {
633 public:
634  virtual void setExtents(
635  const OdGePoint3d * /*newExtents*/) { }
636 
637  virtual void startAttributesSegment() {}
638 };
639 
645 template <class T> class OdGiDummyViewportGeometry : public OdGiDummyGeometry< T >
646 {
647 public:
648  virtual void polylineEye(
649  OdUInt32 ,
650  const OdGePoint3d* ) { }
651 
652  virtual void polygonEye(
653  OdUInt32 ,
654  const OdGePoint3d* ) { }
655 
656  virtual void polylineDc(
657  OdUInt32 ,
658  const OdGePoint3d* ) { }
659 
660  virtual void polygonDc(
661  OdUInt32 ,
662  const OdGePoint3d* ) { }
663 
664  virtual void rasterImageDc(
665  const OdGePoint3d& ,
666  const OdGeVector3d& ,
667  const OdGeVector3d& ,
668  const OdGiRasterImage* ,
669  const OdGePoint2d* ,
670  OdUInt32 ,
671  bool = false,
672  double = 50.0,
673  double = 50.0,
674  double = 0.0) { }
675 
676  virtual void metafileDc(
677  const OdGePoint3d& ,
678  const OdGeVector3d& ,
679  const OdGeVector3d& ,
680  const OdGiMetafile* ,
681  bool = true,
682  bool = false) { }
683 
684  virtual void ownerDrawDc(
685  const OdGePoint3d& ,
686  const OdGeVector3d& ,
687  const OdGeVector3d& ,
688  const OdGiSelfGdiDrawable* ,
689  bool = true,
690  bool = false) { }
691 };
692 
693 // OdGiSubEntityTraits dummy template
694 
700 template <class T> class OdGiDummySubEntityTraits : public T
701 {
702 public:
703  void setColor(OdUInt16 ) { }
704  void setTrueColor(const OdCmEntityColor& ) { }
705  void setLayer(OdDbStub* ) { }
706  void setLineType(OdDbStub* ) { }
709  void setFillPlane(const OdGeVector3d* = 0) {}
711  void setLineTypeScale(double = 1.0) { }
712  void setThickness(double ) { }
713  void setPlotStyleName(OdDb::PlotStyleNameType, OdDbStub* = 0) { }
714  void setMaterial(OdDbStub* ) { }
715  void setMapper(const OdGiMapper * /*pMapper*/) { }
716  void setVisualStyle(const OdDbStub* /*visualStyleId*/) { }
717  void setTransparency(const OdCmTransparency& /*transparency*/) { }
718  void setDrawFlags(OdUInt32 /*drawFlags*/) { }
719  void setSelectionGeom(bool /*bSelectionFlag*/) { }
721  void setSectionable(bool /*bSectionableFlag*/) { }
723 
724  OdUInt16 color() const { return 0; }
726  OdDbStub* layer() const { return NULL; }
727  OdDbStub* lineType() const { return NULL; }
729  bool fillPlane(OdGeVector3d& /*normal*/) { return false; }
731  double lineTypeScale() const { return 0.0; }
732  double thickness() const { return 0.0; }
734  OdDbStub* plotStyleNameId() const { return NULL; }
735  OdDbStub* material() const { return NULL; }
736  const OdGiMapper* mapper() const { return NULL; }
737  void addLight(const OdDbStub* /*lightId*/) { }
739  OdUInt32 drawFlags() const { return 0; }
740  bool selectionGeom() const { return false; }
742  bool sectionable() const { return false; }
744 };
745 
751 template <class T> class OdGiDummyViewport : public T
752 {
753 public:
758  virtual bool isPerspective() const { return false; }
759  virtual bool doPerspective(OdGePoint3d& /*p*/) const { return false; }
760  virtual bool doInversePerspective(OdGePoint3d& /*p*/) const { return false; }
761  virtual void getNumPixelsInUnitSquare(const OdGePoint3d& /*givenWorldpt*/, OdGePoint2d& /*pixelArea*/, bool /*includePerspective*/ = true) const { }
765  virtual OdGeVector3d viewDir() const { return getCameraTarget() - getCameraLocation(); }
766  virtual OdUInt32 viewportId() const { return 0xFFFFFFFF; }
767  virtual OdInt16 acadWindowId() const { return -1; }
768  virtual void getViewportDcCorners(OdGePoint2d& lower_left, OdGePoint2d& upper_right) const { lower_left.set(0,0); upper_right.set(100,100); }
769  virtual bool getFrontAndBackClipValues(bool& clip_front, bool& clip_back, double& /*front*/, double& /*back*/) const { clip_front = clip_back = false; return false; }
770  virtual double linetypeScaleMultiplier() const { return 1.0; }
771  virtual double linetypeGenerationCriteria() const { return 1.0; }
772  virtual bool layerVisible(OdDbStub* /*idLayer*/) const { return true; }
773 };
774 
780 template <class T> class OdGiWrapperViewport : public T
781 {
782  const OdGiViewport* m_ref;
783 protected:
784  void set(const OdGiViewport& ref) { m_ref = &ref; }
785  const OdGiViewport &get() const { return *m_ref; }
786 public:
791  virtual bool isPerspective() const { return get().isPerspective(); }
792  virtual bool doPerspective(OdGePoint3d& p) const { return get().doPerspective(p); }
793  virtual bool doInversePerspective(OdGePoint3d& p) const { return get().doInversePerspective(p); }
794  virtual void getNumPixelsInUnitSquare(const OdGePoint3d& givenWorldpt,
795  OdGePoint2d& pixelArea, bool includePerspective = true) const
796  {
797  get().getNumPixelsInUnitSquare(givenWorldpt, pixelArea, includePerspective);
798  }
799  virtual OdGePoint3d getCameraLocation() const { return get().getCameraLocation(); }
800  virtual OdGePoint3d getCameraTarget() const { return get().getCameraTarget(); }
801  virtual OdGeVector3d getCameraUpVector() const { return get().getCameraUpVector(); }
802  virtual OdGeVector3d viewDir() const { return get().viewDir(); }
803  virtual OdUInt32 viewportId() const { return get().viewportId(); }
804  virtual OdInt16 acadWindowId() const { return get().acadWindowId(); }
805  virtual void getViewportDcCorners(OdGePoint2d& lower_left, OdGePoint2d& upper_right) const
806  { get().getViewportDcCorners(lower_left, upper_right); }
807  virtual bool getFrontAndBackClipValues(bool& clip_front, bool& clip_back, double& front, double& back) const
808  { return get().getFrontAndBackClipValues(clip_front, clip_back, front, back); }
809  virtual double linetypeScaleMultiplier() const { return get().linetypeScaleMultiplier(); }
810  virtual double linetypeGenerationCriteria() const { return get().linetypeGenerationCriteria(); }
811  virtual bool layerVisible(OdDbStub* idLayer) const { return get().layerVisible(idLayer); }
812 };
813 
819 template<class T1, class T2> class OdGiJoinCommonDraw : public T1, public T2
820 {
821 public:
823  virtual OdGiGeometry& rawGeometry() const { return T1::rawGeometry(); }
824  virtual OdGiRegenType regenType() const { return T1::regenType(); } // dont change from kOdGiStandardDisplay
825  virtual bool regenAbort() const { return T1::regenAbort(); }
826  virtual OdGiSubEntityTraits& subEntityTraits() const { return T1::subEntityTraits(); }
827  virtual bool isDragging() const { return T1::isDragging(); }
828  virtual OdGiContext* context() const { return T1::context(); }
829  virtual OdUInt32 numberOfIsolines() const { return T1::numberOfIsolines(); }
830  virtual const OdGiPathNode* currentGiPath() const { return T1::currentGiPath(); }
831  virtual bool displayModelerSilhouettes() const { return T1::displayModelerSilhouettes(); }
832  virtual double deviation(const OdGiDeviationType t, const OdGePoint3d& p) const { return T1::deviation(t, p); }
833 };
834 
840 template<class T> class OdGiDummyCommonDraw : public T
841 {
842 public:
843  virtual OdGiRegenType regenType() const { return kOdGiStandardDisplay; } // dont change from kOdGiStandardDisplay
844  virtual bool regenAbort() const { return false; }
845  virtual bool isDragging() const { return false; }
846  virtual OdUInt32 numberOfIsolines() const { return 4; }
847  virtual double deviation(const OdGiDeviationType t, const OdGePoint3d& p) const { return 0.; }
848 };
849 
855 template <class T, class TVp = OdGiViewport> class OdGiDummyViewportDraw : public OdGiDummyCommonDraw< T >
856 {
857 private:
858  // This class was moved from multiple inheritance to member, since it is crash VS2010 IntelliSense
859  mutable OdGiDummyViewport< OdStaticRxObject<TVp> > m_dummyViewport;
860 public:
861  virtual OdGiViewport& viewport() const { return m_dummyViewport; }
862  virtual OdUInt32 sequenceNumber() const { return 0; }
863  virtual bool isValidId(const OdUInt32 viewportId) const { return false; }
864  virtual OdDbStub* viewportObjectId() const { return 0; }
865 };
866 
872 template <class T> class OdGiDummyWorldDraw : public OdGiDummyCommonDraw< T >
873 {
874 public:
875 };
876 
882 template <class T> class OdGiDummyContext : public T
883 {
884 public:
885  virtual OdDbBaseDatabase* database() const { return 0;}
886  virtual OdGiDrawablePtr openDrawable(OdDbStub* ) { return OdGiDrawablePtr(); }
887 };
888 
894 class OdGiViewportDraw_Dummy : public OdGiDummySubEntityTraits< OdGiSubEntityTraits >
895  , public OdGiDummyViewportDraw< OdGiViewportDraw >
896  , public OdGiDummyViewportGeometry< OdGiViewportGeometry >
897  , public OdGiDummyContext< OdGiContext >
898 {
899  OdDbBaseDatabase *m_pDb;
900 public:
902 
903  OdGiViewportDraw_Dummy(OdDbBaseDatabase *pDb = 0) : m_pDb(pDb) { }
904  virtual OdDbBaseDatabase* database() const { return m_pDb; }
905 
906  virtual OdGiGeometry& rawGeometry() const { return *static_cast<OdGiGeometry*>(const_cast<OdGiViewportDraw_Dummy*>(this)); }
907  virtual OdGiSubEntityTraits& subEntityTraits() const { return *static_cast<OdGiSubEntityTraits*>(const_cast<OdGiViewportDraw_Dummy*>(this)); }
908  virtual OdGiViewportGeometry& geometry() const { return *static_cast<OdGiViewportGeometry*>(const_cast<OdGiViewportDraw_Dummy*>(this)); }
909  virtual OdGiContext* context() const { return static_cast<OdGiContext*>(const_cast<OdGiViewportDraw_Dummy*>(this)); }
910 
911  void addRef() { }
912  void release() { }
913 };
914 
920 class OdGiWorldDraw_Dummy : public OdGiDummySubEntityTraits< OdGiSubEntityTraits >
921  , public OdGiDummyWorldDraw< OdGiWorldDraw >
922  , public OdGiDummyWorldGeometry< OdGiWorldGeometry >
923  , public OdGiDummyContext< OdGiContext >
924 {
925  OdDbBaseDatabase *m_pDb;
926 public:
928 
929  OdGiWorldDraw_Dummy(OdDbBaseDatabase *pDb = 0) : m_pDb(pDb) { }
930  virtual OdDbBaseDatabase* database() const { return m_pDb; }
931 
932  virtual OdGiGeometry& rawGeometry() const { return *static_cast<OdGiGeometry*>(const_cast<OdGiWorldDraw_Dummy*>(this)); }
933  virtual OdGiSubEntityTraits& subEntityTraits() const { return *static_cast<OdGiSubEntityTraits*>(const_cast<OdGiWorldDraw_Dummy*>(this)); }
934  virtual OdGiWorldGeometry& geometry() const { return *static_cast<OdGiWorldGeometry*>(const_cast<OdGiWorldDraw_Dummy*>(this)); }
935  virtual OdGiContext* context() const { return static_cast<OdGiContext*>(const_cast<OdGiWorldDraw_Dummy*>(this)); }
936 
937  void addRef() { }
938  void release() { }
939 };
940 
947 
948 #include "TD_PackPop.h"
949 
950 #endif // #ifndef _ODGIDUMMYGEOM_INCLUDED_
OdGiFillType
Definition: Gi.h:40
@ kOdGiFillNever
Definition: Gi.h:42
OdSmartPtr< OdGiDrawable > OdGiDrawablePtr
Definition: GiCommonDraw.h:39
OdGiRegenType
Definition: GiCommonDraw.h:50
@ kOdGiStandardDisplay
Definition: GiCommonDraw.h:52
OdGiDeviationType
Definition: GiCommonDraw.h:64
OdStaticRxObject< OdGiDummySubEntityTraits< OdGiSubEntityTraits > > OdGiSubEntityTraits_Stub
OdGiArcType
Definition: GiGeometry.h:683
@ kOdGiArcSimple
Definition: GiGeometry.h:684
#define NULL
Definition: GsProperties.h:177
ptrdiff_t OdGsMarker
unsigned int OdUInt32
short OdInt16
unsigned short OdUInt16
int OdInt32
wchar_t OdChar
#define GETBIT(flags, bit)
Definition: OdaDefs.h:500
const OdCmTransparency & OdCmTransparency(OdCmTransparency::kErrorValue))
static GE_STATIC_EXPORT const OdGeMatrix3d kIdentity
Definition: GeMatrix3d.h:79
OdGePoint2d & set(double xx, double yy)
Definition: GePoint2d.h:290
static GE_STATIC_EXPORT const OdGePoint3d kOrigin
Definition: GePoint3d.h:89
static GE_STATIC_EXPORT const OdGeVector3d kZAxis
Definition: GeVector3d.h:91
static GE_STATIC_EXPORT const OdGeVector3d kYAxis
Definition: GeVector3d.h:90
virtual double deviation(const OdGiDeviationType deviationType, const OdGePoint3d &pointOnCurve) const =0
virtual bool isDragging() const =0
virtual bool regenAbort() const =0
virtual OdGiGeometry & rawGeometry() const =0
virtual const OdGiPathNode * currentGiPath() const
virtual bool displayModelerSilhouettes() const
virtual OdGiSubEntityTraits & subEntityTraits() const =0
virtual OdGiContext * context() const =0
virtual OdUInt32 numberOfIsolines() const =0
virtual OdGiRegenType regenType() const =0
virtual double deviation(const OdGiDeviationType t, const OdGePoint3d &p) const
virtual OdUInt32 numberOfIsolines() const
virtual OdGiRegenType regenType() const
virtual bool regenAbort() const
virtual bool isDragging() const
virtual OdGiDrawablePtr openDrawable(OdDbStub *)
virtual OdDbBaseDatabase * database() const
void circularArc(const OdGePoint3d &, double, const OdGeVector3d &, const OdGeVector3d &, double, OdGiArcType=kOdGiArcSimple)
void nurbs(const OdGeNurbCurve3d &)
void pushClipBoundary(OdGiClipBoundary *)
void xline(const OdGePoint3d &, const OdGePoint3d &)
void pushModelTransform(const OdGeVector3d &)
virtual void edge(const OdGiEdge2dArray &)
void draw(const OdGiDrawable *)
void image(const OdGiImageBGRA32 &, const OdGePoint3d &, const OdGeVector3d &, const OdGeVector3d &, OdGiRasterImage::TransparencyMode=OdGiRasterImage::kTransparency8Bit)
void shape(const OdGePoint3d &, const OdGeVector3d &, const OdGeVector3d &, int, const OdGiTextStyle *)
OdGeMatrix3d getWorldToModelTransform() const
void polygon(OdInt32, const OdGePoint3d *, const OdGeVector3d *)
void pushModelTransform(const OdGeMatrix3d &)
void rowOfDots(OdInt32, const OdGePoint3d &, const OdGeVector3d &)
void text(const OdGePoint3d &, const OdGeVector3d &, const OdGeVector3d &, const OdChar *, OdInt32, bool, const OdGiTextStyle *)
void ellipArc(const OdGeEllipArc3d &, const OdGePoint3d *=0, OdGiArcType=kOdGiArcSimple)
void polypoint(OdInt32, const OdGePoint3d *, const OdCmEntityColor *, const OdCmTransparency *, const OdGeVector3d *, const OdGsMarker *, OdInt32)
void setExtents(const OdGePoint3d *)
void polygon(OdInt32, const OdGePoint3d *)
void circle(const OdGePoint3d &, double, const OdGeVector3d &)
void polyline(OdInt32, const OdGePoint3d *, const OdGeVector3d *=0, OdGsMarker=-1)
void worldLine(const OdGePoint3d[2])
OdGeMatrix3d getModelToWorldTransform() const
void circularArc(const OdGePoint3d &, const OdGePoint3d &, const OdGePoint3d &, OdGiArcType=kOdGiArcSimple)
void shell(OdInt32, const OdGePoint3d *, OdInt32, const OdInt32 *, const OdGiEdgeData *=0, const OdGiFaceData *=0, const OdGiVertexData *=0)
void mesh(OdInt32, OdInt32, const OdGePoint3d *, const OdGiEdgeData *=0, const OdGiFaceData *=0, const OdGiVertexData *=0)
void ray(const OdGePoint3d &, const OdGePoint3d &)
void circle(const OdGePoint3d &, const OdGePoint3d &, const OdGePoint3d &)
void pline(const OdGiPolyline &, OdUInt32=0, OdUInt32=0)
void text(const OdGePoint3d &, const OdGeVector3d &, const OdGeVector3d &, double, double, double, const OdString &)
void setPlotStyleName(OdDb::PlotStyleNameType, OdDbStub *=0)
void setShadowFlags(OdGiSubEntityTraits::ShadowFlags)
void setLineWeight(OdDb::LineWeight)
void setSelectionFlags(OdGiSubEntityTraits::SelectionFlags)
void setFillType(OdGiFillType)
OdDb::LineWeight lineWeight() const
void setVisualStyle(const OdDbStub *)
OdGiSubEntityTraits::SelectionFlags selectionFlags() const
OdDbStub * material() const
double lineTypeScale() const
void setLineType(OdDbStub *)
OdDbStub * lineType() const
const OdGiMapper * mapper() const
OdDbStub * layer() const
OdGiSubEntityTraits::ShadowFlags shadowFlags() const
void setLayer(OdDbStub *)
void setTransparency(const OdCmTransparency &)
OdGiFillType fillType() const
bool fillPlane(OdGeVector3d &)
void setMapper(const OdGiMapper *)
void setFillPlane(const OdGeVector3d *=0)
OdCmTransparency transparency() const
void setMaterial(OdDbStub *)
void addLight(const OdDbStub *)
OdUInt32 drawFlags() const
OdCmEntityColor trueColor() const
OdDbStub * plotStyleNameId() const
OdDb::PlotStyleNameType plotStyleNameType() const
void setTrueColor(const OdCmEntityColor &)
void setSelectionMarker(OdGsMarker)
void setLineTypeScale(double=1.0)
virtual bool isValidId(const OdUInt32 viewportId) const
virtual OdUInt32 sequenceNumber() const
virtual OdDbStub * viewportObjectId() const
virtual OdGiViewport & viewport() const
virtual void ownerDrawDc(const OdGePoint3d &, const OdGeVector3d &, const OdGeVector3d &, const OdGiSelfGdiDrawable *, bool=true, bool=false)
virtual void polygonDc(OdUInt32, const OdGePoint3d *)
virtual void polygonEye(OdUInt32, const OdGePoint3d *)
virtual void polylineEye(OdUInt32, const OdGePoint3d *)
virtual void polylineDc(OdUInt32, const OdGePoint3d *)
virtual void rasterImageDc(const OdGePoint3d &, const OdGeVector3d &, const OdGeVector3d &, const OdGiRasterImage *, const OdGePoint2d *, OdUInt32, bool=false, double=50.0, double=50.0, double=0.0)
virtual void metafileDc(const OdGePoint3d &, const OdGeVector3d &, const OdGeVector3d &, const OdGiMetafile *, bool=true, bool=false)
virtual OdGePoint3d getCameraLocation() const
virtual bool doInversePerspective(OdGePoint3d &) const
virtual OdGeVector3d getCameraUpVector() const
virtual OdGePoint3d getCameraTarget() const
virtual OdGeMatrix3d getEyeToModelTransform() const
virtual bool getFrontAndBackClipValues(bool &clip_front, bool &clip_back, double &, double &) const
virtual double linetypeGenerationCriteria() const
virtual OdGeMatrix3d getWorldToEyeTransform() const
virtual bool layerVisible(OdDbStub *) const
virtual void getViewportDcCorners(OdGePoint2d &lower_left, OdGePoint2d &upper_right) const
virtual bool doPerspective(OdGePoint3d &) const
virtual OdGeMatrix3d getModelToEyeTransform() const
virtual bool isPerspective() const
virtual OdGeVector3d viewDir() const
virtual double linetypeScaleMultiplier() const
virtual OdInt16 acadWindowId() const
virtual OdGeMatrix3d getEyeToWorldTransform() const
virtual OdUInt32 viewportId() const
virtual void getNumPixelsInUnitSquare(const OdGePoint3d &, OdGePoint2d &, bool=true) const
virtual void startAttributesSegment()
virtual void setExtents(const OdGePoint3d *)
virtual void circle(const OdGePoint3d &center, double radius, const OdGeVector3d &normal)=0
virtual void edge(const OdGiEdge2dArray &edges)=0
virtual OdGeMatrix3d getModelToWorldTransform() const =0
virtual void image(const OdGiImageBGRA32 &img, const OdGePoint3d &origin, const OdGeVector3d &uVec, const OdGeVector3d &vVec, OdGiRasterImage::TransparencyMode trpMode=OdGiRasterImage::kTransparency8Bit)=0
virtual void ray(const OdGePoint3d &basePoint, const OdGePoint3d &throughPoint)=0
virtual void polypoint(OdInt32 numPoints, const OdGePoint3d *vertexList, const OdCmEntityColor *pColors, const OdCmTransparency *pTransparency, const OdGeVector3d *pNormals=NULL, const OdGsMarker *pSubEntMarkers=NULL, OdInt32 nPointSize=0)
Definition: GiGeometry.h:1274
virtual void popModelTransform()=0
virtual void shell(OdInt32 numVertices, const OdGePoint3d *vertexList, OdInt32 faceListSize, const OdInt32 *faceList, const OdGiEdgeData *pEdgeData=0, const OdGiFaceData *pFaceData=0, const OdGiVertexData *pVertexData=0)=0
virtual void pline(const OdGiPolyline &polyline, OdUInt32 fromIndex=0, OdUInt32 numSegs=0)=0
virtual OdGeMatrix3d getWorldToModelTransform() const =0
virtual void circularArc(const OdGePoint3d &center, double radius, const OdGeVector3d &normal, const OdGeVector3d &startVector, double sweepAngle, OdGiArcType arcType=kOdGiArcSimple)=0
virtual void text(const OdGePoint3d &position, const OdGeVector3d &normal, const OdGeVector3d &direction, double height, double width, double oblique, const OdString &msg)=0
virtual void polyline(OdInt32 numVertices, const OdGePoint3d *vertexList, const OdGeVector3d *pNormal=0, OdGsMarker baseSubEntMarker=-1)=0
virtual void nurbs(const OdGeNurbCurve3d &nurbsCurve)=0
virtual void pushClipBoundary(OdGiClipBoundary *pBoundary)=0
virtual void xline(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint)=0
virtual void worldLine(const OdGePoint3d points[2])=0
virtual void ellipArc(const OdGeEllipArc3d &ellipArc, const OdGePoint3d *endPointsOverrides=0, OdGiArcType arcType=kOdGiArcSimple)=0
virtual void polygon(OdInt32 numVertices, const OdGePoint3d *vertexList)=0
virtual void draw(const OdGiDrawable *pDrawable)=0
virtual void popClipBoundary()=0
virtual void pushModelTransform(const OdGeVector3d &normal)=0
virtual void mesh(OdInt32 numRows, OdInt32 numColumns, const OdGePoint3d *vertexList, const OdGiEdgeData *pEdgeData=0, const OdGiFaceData *pFaceData=0, const OdGiVertexData *pVertexData=0)=0
virtual void rowOfDots(OdInt32 numPoints, const OdGePoint3d &startPoint, const OdGeVector3d &dirToNextPoint)
Definition: GiGeometry.h:1300
virtual OdGiContext * context() const
virtual OdUInt32 numberOfIsolines() const
virtual OdGiRegenType regenType() const
virtual bool regenAbort() const
virtual bool displayModelerSilhouettes() const
virtual OdGiGeometry & rawGeometry() const
virtual bool isDragging() const
virtual OdGiSubEntityTraits & subEntityTraits() const
virtual const OdGiPathNode * currentGiPath() const
virtual double deviation(const OdGiDeviationType t, const OdGePoint3d &p) const
virtual const OdGiFill * fill() const
virtual void setLayer(OdDbStub *layerId)=0
virtual OdDbStub * layer() const =0
virtual void setFillPlane(const OdGeVector3d *pNormal=0)
virtual OdDb::PlotStyleNameType plotStyleNameType() const =0
virtual void setFill(const OdGiFill *pFill)
virtual void setLineType(OdDbStub *lineTypeId)=0
virtual OdGiFillType fillType() const =0
virtual void setSectionable(bool bSectionableFlag)
virtual void setLineTypeScale(double lineTypeScale=1.0)=0
virtual bool sectionable() const
virtual OdDbStub * material() const =0
virtual void setShadowFlags(ShadowFlags shadowFlags)
virtual void setMapper(const OdGiMapper *pMapper)=0
virtual OdDbStub * lineType() const =0
virtual SelectionFlags selectionFlags() const
virtual void setLineWeight(OdDb::LineWeight lineWeight)=0
virtual void setVisualStyle(const OdDbStub *visualStyleId)
virtual void setSelectionFlags(SelectionFlags selectionFlags)
virtual void setLineStyleModifiers(const OdGiDgLinetypeModifiers *pLSMod)
virtual void setSelectionMarker(OdGsMarker selectionMarker)=0
virtual double lineTypeScale() const =0
virtual void setPlotStyleName(OdDb::PlotStyleNameType plotStyleNameType, OdDbStub *plotStyleNameId=0)=0
virtual OdUInt32 drawFlags() const
virtual OdCmTransparency transparency() const
virtual OdDbStub * plotStyleNameId() const =0
virtual void setTrueColor(const OdCmEntityColor &color)=0
virtual OdCmEntityColor trueColor() const =0
@ kNoSelectionFlags
Definition: Gi.h:154
virtual ShadowFlags shadowFlags() const
virtual bool fillPlane(OdGeVector3d &normal)
virtual void setDrawFlags(OdUInt32 drawFlags)
@ kShadowsCastAndReceive
Definition: Gi.h:146
virtual const OdGiDgLinetypeModifiers * lineStyleModifiers() const
virtual void setSelectionGeom(bool bSelectionFlag)
virtual void setThickness(double thickness)=0
virtual OdCmEntityColor secondaryTrueColor() const
virtual void setSecondaryTrueColor(const OdCmEntityColor &color)
virtual void setFillType(OdGiFillType fillType)=0
virtual void setMaterial(OdDbStub *materialId)=0
virtual bool selectionGeom() const
virtual OdDb::LineWeight lineWeight() const =0
virtual const OdGiMapper * mapper() const =0
virtual double thickness() const =0
virtual void setTransparency(const OdCmTransparency &transparency)
virtual OdDbStub * visualStyle() const
static void copyTraits(OdGiSubEntityTraits &pFrom, OdGiSubEntityTraits &pTo, OdUInt32 nFlags=kAllChanged)
OdGiSubEntityTraitsToData(OdGiSubEntityTraitsData &pData)
OdCmEntityColor secondaryTrueColor() const
OdDb::LineWeight lineWeight() const
void setDrawFlags(OdUInt32 drawFlags)
void setSectionable(bool bSectionableFlag)
void setFill(const OdGiFill *pFill)
void setTransparency(const OdCmTransparency &transparency)
const OdGiDgLinetypeModifiers * lineStyleModifiers() const
void setMapper(const OdGiMapper *n)
OdGiSubEntityTraits::SelectionFlags selectionFlags() const
const OdGiMapper * mapper() const
void setShadowFlags(OdGiSubEntityTraits::ShadowFlags shadowFlags)
void setSelectionFlags(OdGiSubEntityTraits::SelectionFlags selectionFlags)
void setSecondaryTrueColor(const OdCmEntityColor &n)
OdCmEntityColor trueColor() const
void setLineWeight(OdDb::LineWeight n)
void setLineStyleModifiers(const OdGiDgLinetypeModifiers *pLSMod)
void setSelectionGeom(bool bSelectionFlag)
void setPlotStyleName(OdDb::PlotStyleNameType n, OdDbStub *m=0)
const OdGiFill * fill() const
OdGiSubEntityTraits::ShadowFlags shadowFlags() const
void setVisualStyle(const OdDbStub *n)
OdCmTransparency transparency() const
void setFillType(OdGiFillType n)
void setFillPlane(const OdGeVector3d *=0)
void setTrueColor(const OdCmEntityColor &n)
OdDb::PlotStyleNameType plotStyleNameType() const
void setSelectionMarker(OdGsMarker n)
bool fillPlane(OdGeVector3d &n)
void setTraits(OdGiSubEntityTraits &pTraits)
OdGiSubEntityTraits & getTraits()
void setFillPlane(const OdGeVector3d *n=0)
virtual OdDbBaseDatabase * database() const
virtual OdGiSubEntityTraits & subEntityTraits() const
virtual OdGiViewportGeometry & geometry() const
virtual OdGiContext * context() const
OdGiViewportDraw_Dummy(OdDbBaseDatabase *pDb=0)
ODRX_USING_HEAP_OPERATORS(OdGiDummySubEntityTraits< OdGiSubEntityTraits >)
virtual OdGiGeometry & rawGeometry() const
virtual OdGiSubEntityTraits & subEntityTraits() const
virtual OdGiGeometry & rawGeometry() const
virtual OdGiViewportGeometry & geometry() const
OdGiViewportDraw_Stub(OdGiViewportDraw &pVD, OdGiViewportGeometry &pVG, OdGiSubEntityTraits &pST)
ODRX_USING_HEAP_OPERATORS(OdGiWrapperViewportDraw< OdGiViewportDraw >)
virtual OdGeMatrix3d getEyeToModelTransform() const =0
virtual bool isPerspective() const =0
virtual void getViewportDcCorners(OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const =0
virtual bool doPerspective(OdGePoint3d &point) const =0
virtual OdUInt32 viewportId() const =0
virtual OdGePoint3d getCameraTarget() const =0
virtual OdGeMatrix3d getModelToEyeTransform() const =0
virtual double linetypeScaleMultiplier() const =0
virtual double linetypeGenerationCriteria() const =0
virtual bool getFrontAndBackClipValues(bool &clipFront, bool &clipBack, double &front, double &back) const =0
virtual OdInt16 acadWindowId() const =0
virtual OdGePoint3d getCameraLocation() const =0
virtual OdGeVector3d viewDir() const =0
virtual bool layerVisible(OdDbStub *layerId) const =0
virtual OdGeMatrix3d getWorldToEyeTransform() const =0
virtual OdGeMatrix3d getEyeToWorldTransform() const =0
virtual OdGeVector3d getCameraUpVector() const =0
virtual void getNumPixelsInUnitSquare(const OdGePoint3d &point, OdGePoint2d &pixelDensity, bool bUsePerspective=true) const =0
virtual bool doInversePerspective(OdGePoint3d &point) const =0
virtual OdGiGeometry & rawGeometry() const
virtual OdGiWorldGeometry & geometry() const
virtual OdGiContext * context() const
virtual OdDbBaseDatabase * database() const
OdGiWorldDraw_Dummy(OdDbBaseDatabase *pDb=0)
ODRX_USING_HEAP_OPERATORS(OdGiDummySubEntityTraits< OdGiSubEntityTraits >)
virtual OdGiSubEntityTraits & subEntityTraits() const
virtual OdGiSubEntityTraits & subEntityTraits() const
virtual OdGiGeometry & rawGeometry() const
virtual OdGiWorldGeometry & geometry() const
OdGiWorldDraw_Stub(OdGiWorldDraw &pVD, OdGiWorldGeometry &pVG, OdGiSubEntityTraits &pST)
ODRX_USING_HEAP_OPERATORS(OdGiWrapperWorldDraw< OdGiWorldDraw >)
virtual bool isDragging() const
virtual OdGiSubEntityTraits & subEntityTraits() const
virtual OdGiContext * context() const
virtual OdGiGeometry & rawGeometry() const
virtual const OdGiPathNode * currentGiPath() const
virtual OdGiRegenType regenType() const
virtual OdUInt32 numberOfIsolines() const
virtual double deviation(const OdGiDeviationType t, const OdGePoint3d &p) const
virtual bool regenAbort() const
void setDraw(OdGiCommonDraw &pD)
virtual bool displayModelerSilhouettes() const
OdGiCommonDraw * getDraw() const
virtual void text(const OdGePoint3d &position, const OdGeVector3d &normal, const OdGeVector3d &direction, double height, double width, double oblique, const OdString &msg)
virtual OdGeMatrix3d getWorldToModelTransform() const
virtual void circularArc(const OdGePoint3d &center, double radius, const OdGeVector3d &normal, const OdGeVector3d &startVector, double sweepAngle, OdGiArcType arcType=kOdGiArcSimple)
virtual void image(const OdGiImageBGRA32 &img, const OdGePoint3d &origin, const OdGeVector3d &uVec, const OdGeVector3d &vVec, OdGiRasterImage::TransparencyMode trpMode=OdGiRasterImage::kTransparency8Bit)
virtual void popClipBoundary()
void ray(const OdGePoint3d &first, const OdGePoint3d &second)
virtual void popModelTransform()
OdGiGeometry & getGeom()
virtual void circle(const OdGePoint3d &center, double radius, const OdGeVector3d &normal)
virtual void worldLine(const OdGePoint3d pnts[2])
virtual void polygon(OdInt32 nbPoints, const OdGePoint3d *pVertexList)
virtual void nurbs(const OdGeNurbCurve3d &nurbs)
virtual void mesh(OdInt32 rows, OdInt32 columns, const OdGePoint3d *pVertexList, const OdGiEdgeData *pEdgeData=NULL, const OdGiFaceData *pFaceData=NULL, const OdGiVertexData *pVertexData=NULL)
virtual void pushClipBoundary(OdGiClipBoundary *pBoundary)
virtual void ellipArc(const OdGeEllipArc3d &arc, const OdGePoint3d *pEndPointsOverrides=0, OdGiArcType arcType=kOdGiArcSimple)
virtual void polygon(OdInt32 nbPoints, const OdGePoint3d *pVertexList, const OdGeVector3d *pNormal)
virtual void rowOfDots(OdInt32 numPoints, const OdGePoint3d &startPoint, const OdGeVector3d &dirToNextPoint)
virtual void shell(OdInt32 nbVertex, const OdGePoint3d *pVertexList, OdInt32 faceListSize, const OdInt32 *pFaceList, const OdGiEdgeData *pEdgeData=NULL, const OdGiFaceData *pFaceData=NULL, const OdGiVertexData *pVertexData=NULL)
virtual OdGeMatrix3d getModelToWorldTransform() const
virtual void circularArc(const OdGePoint3d &start, const OdGePoint3d &point, const OdGePoint3d &end, OdGiArcType arcType=kOdGiArcSimple)
virtual void pushModelTransform(const OdGeVector3d &vNormal)
virtual void circle(const OdGePoint3d &p1, const OdGePoint3d &p2, const OdGePoint3d &p3)
virtual void pushModelTransform(const OdGeMatrix3d &xMat)
virtual void pline(const OdGiPolyline &p, OdUInt32 i, OdUInt32 n)
virtual void edge(const OdGiEdge2dArray &edges)
virtual void polypoint(OdInt32 numPoints, const OdGePoint3d *vertexList, const OdCmEntityColor *pColors, const OdCmTransparency *pTransparency, const OdGeVector3d *pNormals, const OdGsMarker *pSubEntMarkers, OdInt32 nPointSize)
virtual void xline(const OdGePoint3d &p1, const OdGePoint3d &p2)
virtual void text(const OdGePoint3d &position, const OdGeVector3d &normal, const OdGeVector3d &direction, const OdChar *msg, OdInt32 length, bool raw, const OdGiTextStyle *pTextStyle)
void setGeom(OdGiGeometry &Geom)
virtual void draw(const OdGiDrawable *pD)
virtual void polyline(OdInt32 nbPoints, const OdGePoint3d *pVertexList, const OdGeVector3d *pNormal=NULL, OdGsMarker lBaseSubEntMarker=-1)
virtual OdGiViewportGeometry & geometry() const
virtual OdGiViewport & viewport() const
virtual OdDbStub * viewportObjectId() const
virtual OdUInt32 sequenceNumber() const
virtual bool isValidId(const OdUInt32 viewportId) const
virtual void polygonDc(OdUInt32 numVertices, const OdGePoint3d *vertexList)
virtual void polylineEye(OdUInt32 numVertices, const OdGePoint3d *vertexList)
virtual void polygonEye(OdUInt32 numVertices, const OdGePoint3d *vertexList)
virtual void metafileDc(const OdGePoint3d &origin, const OdGeVector3d &u, const OdGeVector3d &v, const OdGiMetafile *pMetafile, bool dcAligned=true, bool allowClipping=false)
virtual void polylineDc(OdUInt32 numVertices, const OdGePoint3d *vertexList)
virtual void rasterImageDc(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)
virtual void ownerDrawDc(const OdGePoint3d &origin, const OdGeVector3d &u, const OdGeVector3d &v, const OdGiSelfGdiDrawable *pDrawable, bool dcAligned=true, bool allowClipping=false)
virtual bool getFrontAndBackClipValues(bool &clip_front, bool &clip_back, double &front, double &back) const
virtual OdGePoint3d getCameraLocation() const
virtual OdGeMatrix3d getEyeToWorldTransform() const
virtual bool isPerspective() const
virtual OdInt16 acadWindowId() const
virtual OdGeVector3d viewDir() const
virtual OdGePoint3d getCameraTarget() const
virtual OdGeMatrix3d getWorldToEyeTransform() const
virtual OdUInt32 viewportId() const
virtual void getViewportDcCorners(OdGePoint2d &lower_left, OdGePoint2d &upper_right) const
virtual void getNumPixelsInUnitSquare(const OdGePoint3d &givenWorldpt, OdGePoint2d &pixelArea, bool includePerspective=true) const
virtual OdGeVector3d getCameraUpVector() const
virtual OdGeMatrix3d getEyeToModelTransform() const
void set(const OdGiViewport &ref)
const OdGiViewport & get() const
virtual bool doInversePerspective(OdGePoint3d &p) const
virtual OdGeMatrix3d getModelToEyeTransform() const
virtual double linetypeScaleMultiplier() const
virtual bool layerVisible(OdDbStub *idLayer) const
virtual bool doPerspective(OdGePoint3d &p) const
virtual double linetypeGenerationCriteria() const
virtual OdGiWorldGeometry & geometry() const
virtual void startAttributesSegment()
virtual void setExtents(const OdGePoint3d *newExtents)
virtual void release()=0
virtual void addRef()=0
GLenum GLint ref
Definition: gles2_ext.h:262
GLint GLenum GLsizei width
Definition: gles2_ext.h:110
const GLfloat * v
Definition: gles2_ext.h:315
GLuint GLsizei GLsizei * length
Definition: gles2_ext.h:274
GLint GLenum GLsizei GLsizei height
Definition: gles2_ext.h:110
PlotStyleNameType
Definition: OdaDefs.h:415
@ kPlotStyleNameByBlock
Definition: OdaDefs.h:417
LineWeight
Definition: OdaDefs.h:384
@ kLnWt000
Definition: OdaDefs.h:385