CFx SDK Documentation  2020SP3
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
OdGiDeviation
Definition: GiDeviation.h:44
OdCmEntityColor
Definition: CmColorBase.h:68
OdGsExtAccum::setDeviation
virtual void setDeviation(const OdGeDoubleArray &deviations)
Definition: GsExtAccum.h:124
OdGsExtAccum::metafileProc
virtual void metafileProc(const OdGePoint3d &origin, const OdGeVector3d &u, const OdGeVector3d &v, const OdGiMetafile *pMetafile, bool dcAligned=true, bool allowClipping=false)
OdGeVector3d
Definition: GeVector3d.h:54
kOdGiArcSimple
@ kOdGiArcSimple
Definition: GiGeometry.h:684
OdGsExtAccum::giExtAccum
const OdGiExtAccum * giExtAccum() const
Definition: GsExtAccum.h:105
OdGsExtAccum::shapeProc
virtual void shapeProc(const OdGePoint3d &position, const OdGeVector3d &direction, const OdGeVector3d &upVector, int shapeNumber, const OdGiTextStyle *pTextStyle, const OdGeVector3d *pExtrusion=0)
OdGsExtAccum::baseView
OdGsViewImpl * baseView()
Definition: GsExtAccum.h:113
OdGsConveyorNodeBase::update_geometry::update_geometry
update_geometry(OdGiConveyorGeometry *pGeometry)
Definition: GsExtAccum.h:59
OdGsExtAccum::addExtents
virtual void addExtents(const OdGeExtents3d &extents)
OdGsExtAccum::rasterImageProc
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)
OdGsExtAccum::setDeviation
virtual void setDeviation(const OdGiDeviation *pDeviation)
Definition: GsExtAccum.h:128
OdGsConveyorNodeBase::addSourceNode
void addSourceNode(OdGiConveyorOutput &sourceNode)
OdCmTransparency
Definition: CmColorBase.h:1617
OdGsExtAccum::circularArcProc
virtual void circularArcProc(const OdGePoint3d &center, double radius, const OdGeVector3d &normal, const OdGeVector3d &startVector, double sweepAngle, OdGiArcType arcType=kOdGiArcSimple, const OdGeVector3d *pExtrusion=0)
OdGsExtAccum::polypointProc
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)
OdGsExtAccum::xlineProc
virtual void xlineProc(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint)
OdGsExtAccum::input
virtual OdGiConveyorInput & input()
OdGsExtAccum::nurbsProc
virtual void nurbsProc(const OdGeNurbCurve3d &nurbsCurve)
OdGsExtAccum::rayProc
virtual void rayProc(const OdGePoint3d &basePoint, const OdGePoint3d &throughPoint)
GeExtents3d.h
OdGsExtAccum::output
virtual OdGiConveyorOutput & output()
OdGiVertexData
Definition: GiGeometry.h:549
OdGsExtAccum::getLineweight
OdDb::LineWeight getLineweight() const
OdGsExtAccum::setDrawContext
virtual void setDrawContext(OdGiConveyorContext *pDrawContext)
OdGiPolyline
Definition: GiPolyline.h:49
OdArray
Definition: OdArray.h:591
TD_PackPop.h
OdGsMarker
ptrdiff_t OdGsMarker
Definition: OdPlatformSettings.h:889
OdGsExtAccum::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGsExtAccum)
OdGsExtAccum::circleProc
virtual void circleProc(const OdGePoint3d &center, double radius, const OdGeVector3d &normal, const OdGeVector3d *pExtrusion=0)
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdGiExtAccum
Definition: GiExtAccum.h:40
OdGeMatrix3d
Definition: GeMatrix3d.h:73
OdGsExtAccumPtr
OdSmartPtr< OdGsExtAccum > OdGsExtAccumPtr
Definition: GsExtAccum.h:264
OdGsExtAccum::giExtAccum
OdGiExtAccum * giExtAccum()
Definition: GsExtAccum.h:104
OdGsExtAccum::edgeProc
void edgeProc(const OdGiEdge2dArray &edges, const OdGeMatrix3d *pXform=0)
OdGsExtAccum::polylineProc
virtual void polylineProc(OdInt32 numPoints, const OdGePoint3d *vertexList, const OdGeVector3d *pNormal=0, const OdGeVector3d *pExtrusion=0, OdGsMarker baseSubEntMarker=-1)
OdGsExtAccum::plineContainBulges
virtual bool plineContainBulges() const
OdGiConveyorGeometry
Definition: GiConveyorGeometry.h:270
OdGiConveyorOutput
Definition: GiConveyorNode.h:64
OdGsExtAccum::resetExtents
virtual void resetExtents(const OdGeExtents3d &newExtents=OdGeExtents3d())
OdGiFaceData
Definition: GiGeometry.h:245
OdArray.h
OdGiTextStyle
Definition: GiTextStyle.h:52
OdGsExtAccum::meshProc
virtual void meshProc(OdInt32 numRows, OdInt32 numColumns, const OdGePoint3d *vertexList, const OdGiEdgeData *pEdgeData=0, const OdGiFaceData *pFaceData=0, const OdGiVertexData *pVertexData=0)
OdSmartPtr< OdGiExtAccum >
OdGeEllipArc3d
Definition: GeEllipArc3d.h:60
OdGsExtAccum::shellProc
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)
OdGePoint3d
Definition: GePoint3d.h:55
OdGsExtAccum::textProc2
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)
OdGsExtAccum::textProc
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)
OdGiConveyorOutput::setDestGeometry
virtual void setDestGeometry(OdGiConveyorGeometry &destGeometry)=0
OdGsConveyorNodeBase::updateLink
void updateLink()
OdInt32
int OdInt32
Definition: OdPlatformSettings.h:782
OdGsConveyorNodeBase::SourceNodeArray
OdArray< OdGiConveyorOutput *, OdMemoryAllocator< OdGiConveyorOutput * > > SourceNodeArray
Definition: GsExtAccum.h:51
OdGsConveyorNodeBase::OdGsConveyorNodeBase
OdGsConveyorNodeBase()
lwd
lwd
Definition: DimVarDefs.h:1474
OdGiArcType
OdGiArcType
Definition: GiGeometry.h:683
OdGsExtAccum::setExtentsProc
virtual void setExtentsProc(const OdGePoint3d *pPoints, bool bTransform=true)
Gs.h
OdGsViewImpl
Definition: GsViewImpl.h:58
OdGsConveyorNodeBase::m_pDestGeom
OdGiConveyorGeometry * m_pDestGeom
Definition: GsExtAccum.h:53
OdChar
wchar_t OdChar
Definition: OdPlatformSettings.h:745
OdGsConveyorNodeBase::update_geometry
Definition: GsExtAccum.h:56
OdGsExtAccum
Definition: GsExtAccum.h:90
v
const GLfloat * v
Definition: gles2_ext.h:315
OdGiEdgeData
Definition: GiGeometry.h:67
OdGsExtAccum::setBaseView
virtual void setBaseView(OdGsViewImpl *pBaseVV)
TD_PackPush.h
OdGeNurbCurve3d
Definition: GeNurbCurve3d.h:49
OdGsExtAccum::circularArcProc
virtual void circularArcProc(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint, const OdGePoint3d &thirdPoint, OdGiArcType arcType=kOdGiArcSimple, const OdGeVector3d *pExtrusion=0)
GsExport.h
OdGsConveyorNodeBase::optionalGeometry
virtual OdGiConveyorGeometry * optionalGeometry()=0
OdGsExtAccum::circleProc
virtual void circleProc(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint, const OdGePoint3d &thirdPoint, const OdGeVector3d *pExtrusion=0)
OdGiMetafile
Definition: GiMetafile.h:40
OdGsExtAccum::getExtents
virtual bool getExtents(OdGeExtents3d &extents) const
OdGsExtAccum::OdGsExtAccum
OdGsExtAccum()
OdGiConveyorContext
Definition: GiConveyorGeometry.h:54
OdGsConveyorNodeBase::updateLink
void updateLink(OdGiConveyorGeometry *pGeometry)
OdGsExtAccum::geometry
virtual OdGiConveyorGeometry & geometry()
OdGsConveyorNodeBase::removeSourceNode
void removeSourceNode(OdGiConveyorOutput &sourceNode)
OdGsExtAccum::optionalGeometry
OdGiConveyorGeometry * optionalGeometry()
OdGeExtents3d
Definition: GeExtents3d.h:45
GS_TOOLKIT_EXPORT
#define GS_TOOLKIT_EXPORT
Definition: GsExport.h:37
OdGsExtAccum::addLineweight
void addLineweight(OdDb::LineWeight lwd)
OdDb::LineWeight
LineWeight
Definition: OdaDefs.h:382
OdGsExtAccum::plineProc
virtual void plineProc(const OdGiPolyline &polyline, const OdGeMatrix3d *pXfm=0, OdUInt32 fromIndex=0, OdUInt32 numSegs=0)
OdGsConveyorNodeBase::m_sources
SourceNodeArray m_sources
Definition: GsExtAccum.h:52
OdGsExtAccum::polygonProc
virtual void polygonProc(OdInt32 numPoints, const OdGePoint3d *vertexList, const OdGeVector3d *pNormal=0, const OdGeVector3d *pExtrusion=0)
OdGsConveyorNodeBase::destGeometry
OdGiConveyorGeometry & destGeometry() const
OdGsExtAccum::ellipArcProc
virtual void ellipArcProc(const OdGeEllipArc3d &ellipArc, const OdGePoint3d *endPointOverrides=0, OdGiArcType arcType=kOdGiArcSimple, const OdGeVector3d *pExtrusion=0)
OdGsExtAccum::rowOfDotsProc
virtual void rowOfDotsProc(OdInt32 numPoints, const OdGePoint3d &startPoint, const OdGeVector3d &dirToNextPoint)
OdGsConveyorNodeBase::setDestGeometry
void setDestGeometry(OdGiConveyorGeometry &destGeometry)
OdGsConveyorNodeBase
Definition: GsExtAccum.h:49
OdGiRasterImage
Definition: GiRasterImage.h:37
OdGiConveyorInput
Definition: GiConveyorNode.h:43
GiExtAccum.h
OdGePoint2d
Definition: GePoint2d.h:60