CFx SDK Documentation  2022 SP0
GsExtAccum.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 ODGSEXTACCUM_INC
25 #define ODGSEXTACCUM_INC
26 
27 #include "TD_PackPush.h"
28 
29 #include "OdArray.h"
30 
31 #include "Ge/GeExtents3d.h"
32 
33 #include "Gi/GiExtAccum.h"
34 
35 #include "Gs/GsExport.h"
36 #include "Gs/Gs.h"
37 
38 class OdGsViewImpl;
39 
48  public OdGiConveyorOutput
49 {
50 protected:
54 
56  {
57  OdGiConveyorGeometry* m_pGeometry;
58  public:
59  update_geometry(OdGiConveyorGeometry* pGeometry) : m_pGeometry(pGeometry) {}
60  void operator ()(OdGiConveyorOutput* pSourceNode)
61  {
62  pSourceNode->setDestGeometry(*m_pGeometry);
63  }
64  };
65 public:
67 
68  void addSourceNode(OdGiConveyorOutput& sourceNode);
70 
73 
74  void updateLink();
75  void updateLink(OdGiConveyorGeometry* pGeometry);
76 
78 };
79 
88  public OdGsConveyorNodeBase,
90 {
91  OdGiExtAccumPtr m_pExtAccum;
92  OdGsViewImpl *m_pBaseVV;
93  OdDb::LineWeight m_maxLineweight;
94  OdGiConveyorContext *m_pConContext;
95 protected:
97 public:
99 
100  // OdGsExtAccum functions
101 
103 
104  OdGiExtAccum *giExtAccum() { return m_pExtAccum.get(); }
105  const OdGiExtAccum *giExtAccum() const { return m_pExtAccum.get(); }
106 
111  virtual void setBaseView(OdGsViewImpl *pBaseVV);
112 
113  OdGsViewImpl* baseView() { return m_pBaseVV; }
114 
115  // OdGiExtAccum functions
116 
117  virtual void setDrawContext(OdGiConveyorContext* pDrawContext);
119  virtual bool getExtents(OdGeExtents3d& extents) const;
120  virtual void resetExtents(const OdGeExtents3d& newExtents = OdGeExtents3d());
121  virtual void addExtents(const OdGeExtents3d& extents);
122  virtual bool plineContainBulges() const;
123 
124  virtual void setDeviation(const OdGeDoubleArray& deviations)
125  {
126  m_pExtAccum->setDeviation(deviations);
127  }
128  virtual void setDeviation(const OdGiDeviation* pDeviation)
129  {
130  m_pExtAccum->setDeviation(pDeviation);
131  }
132 
135 
136  // OdGiConveyorNode functions
137 
140 
141  // OdGiConveyorGeometry functions
142 
143  virtual void plineProc(const OdGiPolyline& polyline,
144  const OdGeMatrix3d* pXfm = 0,
145  OdUInt32 fromIndex = 0,
146  OdUInt32 numSegs = 0);
147  virtual void polylineProc(
148  OdInt32 numPoints, const OdGePoint3d* vertexList,
149  const OdGeVector3d* pNormal = 0,
150  const OdGeVector3d* pExtrusion = 0,
151  OdGsMarker baseSubEntMarker = -1);
152  virtual void polygonProc(
153  OdInt32 numPoints, const OdGePoint3d* vertexList,
154  const OdGeVector3d* pNormal = 0,
155  const OdGeVector3d* pExtrusion = 0);
156  virtual void xlineProc(
157  const OdGePoint3d& firstPoint, const OdGePoint3d& secondPoint);
158  virtual void rayProc(
159  const OdGePoint3d& basePoint, const OdGePoint3d& throughPoint);
160  virtual void meshProc(
161  OdInt32 numRows,
162  OdInt32 numColumns,
163  const OdGePoint3d* vertexList,
164  const OdGiEdgeData* pEdgeData = 0,
165  const OdGiFaceData* pFaceData = 0,
166  const OdGiVertexData* pVertexData = 0);
167  virtual void shellProc(
168  OdInt32 numVertices, const OdGePoint3d* vertexList,
169  OdInt32 faceListSize, const OdInt32* faceList,
170  const OdGiEdgeData* pEdgeData = 0,
171  const OdGiFaceData* pFaceData = 0,
172  const OdGiVertexData* pVertexData = 0);
173  virtual void circleProc(
174  const OdGePoint3d& center,
175  double radius,
176  const OdGeVector3d& normal,
177  const OdGeVector3d* pExtrusion = 0);
178  virtual void circleProc(
179  const OdGePoint3d& firstPoint,
180  const OdGePoint3d& secondPoint,
181  const OdGePoint3d& thirdPoint,
182  const OdGeVector3d* pExtrusion = 0);
183  virtual void circularArcProc(
184  const OdGePoint3d& center,
185  double radius,
186  const OdGeVector3d& normal,
187  const OdGeVector3d& startVector,
188  double sweepAngle,
189  OdGiArcType arcType = kOdGiArcSimple, const OdGeVector3d* pExtrusion = 0);
190  virtual void circularArcProc(
191  const OdGePoint3d& firstPoint,
192  const OdGePoint3d& secondPoint,
193  const OdGePoint3d& thirdPoint,
194  OdGiArcType arcType = kOdGiArcSimple, const OdGeVector3d* pExtrusion = 0);
195  virtual void ellipArcProc(
196  const OdGeEllipArc3d& ellipArc,
197  const OdGePoint3d* endPointOverrides = 0,
198  OdGiArcType arcType = kOdGiArcSimple, const OdGeVector3d* pExtrusion = 0);
199  virtual void nurbsProc(
200  const OdGeNurbCurve3d& nurbsCurve);
201  virtual void textProc(
202  const OdGePoint3d& position,
203  const OdGeVector3d& direction,
204  const OdGeVector3d& upVector,
205  const OdChar* msg,
206  OdInt32 numBytes,
207  bool raw,
208  const OdGiTextStyle* pTextStyle,
209  const OdGeVector3d* pExtrusion = 0);
210  virtual void textProc2(
211  const OdGePoint3d& position,
212  const OdGeVector3d& direction,
213  const OdGeVector3d& upVector,
214  const OdChar* msg,
215  OdInt32 numBytes,
216  bool raw,
217  const OdGiTextStyle* pTextStyle,
218  const OdGeVector3d* pExtrusion = 0,
219  const OdGeExtents3d* extentsBox = 0);
220  virtual void shapeProc(
221  const OdGePoint3d& position,
222  const OdGeVector3d& direction,
223  const OdGeVector3d& upVector,
224  int shapeNumber,
225  const OdGiTextStyle* pTextStyle,
226  const OdGeVector3d* pExtrusion = 0);
227  virtual void rasterImageProc(
228  const OdGePoint3d& origin,
229  const OdGeVector3d& u,
230  const OdGeVector3d& v,
231  const OdGiRasterImage* pImage,
232  const OdGePoint2d* uvBoundary,
233  OdUInt32 numBoundPts,
234  bool transparency = false,
235  double brightness = 50.0,
236  double contrast = 50.0,
237  double fade = 0.0);
238  virtual void metafileProc(
239  const OdGePoint3d& origin,
240  const OdGeVector3d& u,
241  const OdGeVector3d& v,
242  const OdGiMetafile* pMetafile,
243  bool dcAligned = true,
244  bool allowClipping = false);
245  virtual void setExtentsProc(const OdGePoint3d *pPoints, bool bTransform = true);
246  virtual void polypointProc(
247  OdInt32 numPoints,
248  const OdGePoint3d* vertexList,
249  const OdCmEntityColor* pColors,
250  const OdCmTransparency* pTransparency = 0,
251  const OdGeVector3d* pNormals = 0,
252  const OdGeVector3d* pExtrusions = 0,
253  const OdGsMarker* pSubEntMarkers = 0,
254  OdInt32 nPointSize = 0);
255  virtual void rowOfDotsProc(
256  OdInt32 numPoints, const OdGePoint3d& startPoint, const OdGeVector3d& dirToNextPoint);
257  void edgeProc(
258  const OdGiEdge2dArray& edges, const OdGeMatrix3d* pXform = 0);
259 };
260 
265 
266 #include "TD_PackPop.h"
267 
268 #endif // ODGSEXTACCUM_INC
lwd
Definition: DimVarDefs.h:1474
OdGiArcType
Definition: GiGeometry.h:683
@ kOdGiArcSimple
Definition: GiGeometry.h:684
#define GS_TOOLKIT_EXPORT
Definition: GsExport.h:37
OdSmartPtr< OdGsExtAccum > OdGsExtAccumPtr
Definition: GsExtAccum.h:264
ptrdiff_t OdGsMarker
unsigned int OdUInt32
int OdInt32
wchar_t OdChar
virtual void setDestGeometry(OdGiConveyorGeometry &destGeometry)=0
update_geometry(OdGiConveyorGeometry *pGeometry)
Definition: GsExtAccum.h:59
void updateLink(OdGiConveyorGeometry *pGeometry)
void setDestGeometry(OdGiConveyorGeometry &destGeometry)
void addSourceNode(OdGiConveyorOutput &sourceNode)
OdGiConveyorGeometry * m_pDestGeom
Definition: GsExtAccum.h:53
OdArray< OdGiConveyorOutput *, OdMemoryAllocator< OdGiConveyorOutput * > > SourceNodeArray
Definition: GsExtAccum.h:51
OdGiConveyorGeometry & destGeometry() const
void removeSourceNode(OdGiConveyorOutput &sourceNode)
virtual OdGiConveyorGeometry * optionalGeometry()=0
SourceNodeArray m_sources
Definition: GsExtAccum.h:52
virtual void polygonProc(OdInt32 numPoints, const OdGePoint3d *vertexList, const OdGeVector3d *pNormal=0, const OdGeVector3d *pExtrusion=0)
virtual bool getExtents(OdGeExtents3d &extents) const
virtual void circleProc(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint, const OdGePoint3d &thirdPoint, const OdGeVector3d *pExtrusion=0)
virtual void xlineProc(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint)
OdGsViewImpl * baseView()
Definition: GsExtAccum.h:113
virtual OdGiConveyorInput & input()
virtual void nurbsProc(const OdGeNurbCurve3d &nurbsCurve)
virtual void resetExtents(const OdGeExtents3d &newExtents=OdGeExtents3d())
virtual void setExtentsProc(const OdGePoint3d *pPoints, bool bTransform=true)
const OdGiExtAccum * giExtAccum() const
Definition: GsExtAccum.h:105
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)
virtual void setBaseView(OdGsViewImpl *pBaseVV)
virtual void rayProc(const OdGePoint3d &basePoint, const OdGePoint3d &throughPoint)
virtual void addExtents(const OdGeExtents3d &extents)
OdGiExtAccum * giExtAccum()
Definition: GsExtAccum.h:104
OdGiConveyorGeometry * optionalGeometry()
virtual void meshProc(OdInt32 numRows, OdInt32 numColumns, const OdGePoint3d *vertexList, const OdGiEdgeData *pEdgeData=0, const OdGiFaceData *pFaceData=0, const OdGiVertexData *pVertexData=0)
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)
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)
virtual void shapeProc(const OdGePoint3d &position, const OdGeVector3d &direction, const OdGeVector3d &upVector, int shapeNumber, const OdGiTextStyle *pTextStyle, const OdGeVector3d *pExtrusion=0)
virtual void polylineProc(OdInt32 numPoints, const OdGePoint3d *vertexList, const OdGeVector3d *pNormal=0, const OdGeVector3d *pExtrusion=0, OdGsMarker baseSubEntMarker=-1)
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)
virtual void plineProc(const OdGiPolyline &polyline, const OdGeMatrix3d *pXfm=0, OdUInt32 fromIndex=0, OdUInt32 numSegs=0)
virtual void circularArcProc(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint, const OdGePoint3d &thirdPoint, OdGiArcType arcType=kOdGiArcSimple, const OdGeVector3d *pExtrusion=0)
virtual void circularArcProc(const OdGePoint3d &center, double radius, const OdGeVector3d &normal, const OdGeVector3d &startVector, double sweepAngle, OdGiArcType arcType=kOdGiArcSimple, const OdGeVector3d *pExtrusion=0)
virtual void circleProc(const OdGePoint3d &center, double radius, const OdGeVector3d &normal, const OdGeVector3d *pExtrusion=0)
virtual void metafileProc(const OdGePoint3d &origin, const OdGeVector3d &u, const OdGeVector3d &v, const OdGiMetafile *pMetafile, bool dcAligned=true, bool allowClipping=false)
virtual void setDrawContext(OdGiConveyorContext *pDrawContext)
virtual void setDeviation(const OdGeDoubleArray &deviations)
Definition: GsExtAccum.h:124
virtual void setDeviation(const OdGiDeviation *pDeviation)
Definition: GsExtAccum.h:128
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)
virtual OdGiConveyorGeometry & geometry()
virtual void rowOfDotsProc(OdInt32 numPoints, const OdGePoint3d &startPoint, const OdGeVector3d &dirToNextPoint)
ODRX_DECLARE_MEMBERS(OdGsExtAccum)
void addLineweight(OdDb::LineWeight lwd)
OdDb::LineWeight getLineweight() const
void edgeProc(const OdGiEdge2dArray &edges, const OdGeMatrix3d *pXform=0)
virtual bool plineContainBulges() const
virtual OdGiConveyorOutput & output()
virtual void ellipArcProc(const OdGeEllipArc3d &ellipArc, const OdGePoint3d *endPointOverrides=0, OdGiArcType arcType=kOdGiArcSimple, const OdGeVector3d *pExtrusion=0)
const GLfloat * v
Definition: gles2_ext.h:315
LineWeight
Definition: OdaDefs.h:382