CFx SDK Documentation  2023 SP0
GiFastExtCalc.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 _ODGIFASTEXTCALC_INCLUDED_
25 #define _ODGIFASTEXTCALC_INCLUDED_
26 
27 #include "Gi/GiBaseVectorizer.h"
28 #include "Gi/GiTransformed.h"
29 #include "Gi/GiDummyGeometry.h"
30 #include "OdStack.h"
31 
32 #include "TD_PackPush.h"
33 
39 class OdGiFastExtCalcViewportDrawImpl : public OdGiDummyViewportDraw<OdGiDummyViewportGeometry<OdGiViewportDraw_> > { };
45 
54 {
55  typedef OdGeExtents3d Extents;
56  OdGeExtents3d m_worldExt;
57  OdStack<Extents> m_extStack;
58  OdGeExtents3d* m_pCurrExt;
59 
60  enum Flags
61  {
62  kSetExtentsCalledFlag = 1,
63  kDrawInvisiblesFlag = 2,
64  kDrawInvisiblesNestedFlag = 4,
65  kDrawingInitiatedFlag = 8,
66  kViewportDrawEnabledFlag = 16
67  };
68  OdUInt8 m_flags;
69 
70  void setSetExtentsCalled(bool bSet);
71 //FELIX_CHANGE_BEGIN
72 public:
73  bool isSetExtentsCalled() const;
74 //FELIX_CHANGE_END
75 
76  void setDrawingInitiated(bool bSet);
77  bool isDrawingInitiated() const;
78 
80  const OdGePoint3d& locExtMin,
81  const OdGePoint3d& locExtMax,
82  const OdGePoint3d& position,
83  const OdGeVector3d& normal,
84  const OdGeVector3d& direction);
85 protected:
87 
89 public:
90 
94  void resetExtents();
95 
100  void getExtents(OdGeExtents3d& extents) const;
101 
106  void setDrawInvisible(bool bSet);
107 
111  bool isDrawInvisible() const;
112 
117  void setDrawInvisibleNested(bool bSet);
118 
122  bool isDrawInvisibleNested() const;
123 
128  void resetFirstDrawFlag();
129 
134  void setViewportDrawEnabled(bool bSet);
135 
139  bool isViewportDrawEnabled() const;
140 
145 
150 
155 
160 
162  // OdGiCommonDraw Overrides
163 
164  bool regenAbort() const;
165  double deviation(const OdGiDeviationType deviationType, const OdGePoint3d& pointOnCurve) const;
167 
169  // OdGiGeometry Overrides
170 
171  void circle(const OdGePoint3d& center, double radius, const OdGeVector3d& normal);
172 
173  void circle(const OdGePoint3d& firstPoint, const OdGePoint3d& secondPoint, const OdGePoint3d& thirdPoint);
174 
175  void circularArc(const OdGePoint3d& center,
176  double radius,
177  const OdGeVector3d& normal,
178  const OdGeVector3d& startVector,
179  double sweepAngle,
180  OdGiArcType arcType = kOdGiArcSimple);
181 
182  void circularArc(const OdGePoint3d& firstPoint,
183  const OdGePoint3d& secondPoint,
184  const OdGePoint3d& thirdPoint,
185  OdGiArcType arcType = kOdGiArcSimple);
186 
187  void polyline(OdInt32 numVertices,
188  const OdGePoint3d* vertexList,
189  const OdGeVector3d* pNormal = 0,
190  OdGsMarker baseSubEntMarker = -1);
191 
192  void polygon(OdInt32 numVertices, const OdGePoint3d* vertexList);
193 
194  void pline(const OdGiPolyline& polyline, OdUInt32 fromIndex = 0, OdUInt32 numSegs = 0);
195 
196 
206  void shape(const OdGePoint3d& position,
207  const OdGeVector3d& normal, const OdGeVector3d& direction,
208  int shapeNumber, const OdGiTextStyle* pTextStyle);
209 
210  void text(const OdGePoint3d& position,
211  const OdGeVector3d& normal, const OdGeVector3d& direction,
212  double height, double width, double oblique, const OdString& msg);
213 
214  void text(const OdGePoint3d& position,
215  const OdGeVector3d& normal, const OdGeVector3d& direction,
216  const OdChar* msg, OdInt32 length, bool raw, const OdGiTextStyle* pTextStyle);
217 
218 
219  void xline(const OdGePoint3d& firstPoint, const OdGePoint3d& secondPoint);
220 
221  void ray(const OdGePoint3d& basePoint, const OdGePoint3d& throughPoint );
222 
223  void nurbs(const OdGeNurbCurve3d& nurbsCurve);
224 
225  void ellipArc(const OdGeEllipArc3d& ellipArc,
226  const OdGePoint3d* endPointsOverrides = 0,
227  OdGiArcType arcType = kOdGiArcSimple);
228 
229  void mesh(OdInt32 numRows,
230  OdInt32 numColumns,
231  const OdGePoint3d* vertexList,
232  const OdGiEdgeData* pEdgeData = 0,
233  const OdGiFaceData* pFaceData = 0,
234  const OdGiVertexData* pVertexData = 0);
235 
236  void shell(OdInt32 numVertices,
237  const OdGePoint3d* vertexList,
238  OdInt32 faceListSize,
239  const OdInt32* faceList,
240  const OdGiEdgeData* pEdgeData = 0,
241  const OdGiFaceData* pFaceData = 0,
242  const OdGiVertexData* pVertexData = 0);
243 
244  void worldLine(const OdGePoint3d points[2]);
245 
246  void image(const OdGiImageBGRA32& img,
247  const OdGePoint3d& origin,
248  const OdGeVector3d& uVec,
249  const OdGeVector3d& vVec,
251 
252  void edge(const OdGiEdge2dArray& edges);
253 
254  void polypoint(OdInt32 numPoints, const OdGePoint3d* vertexList, const OdCmEntityColor* pColors, const OdCmTransparency* pTransparency,
255  const OdGeVector3d* pNormals, const OdGsMarker* pSubEntMarkers, OdInt32 nPointSize);
256 
257  void rowOfDots(OdInt32 numPoints, const OdGePoint3d& startPoint, const OdGeVector3d& dirToNextPoint);
258 
259  void setExtents(const OdGePoint3d *newExtents);
260 
263 
266 
267  void draw(const OdGiDrawable* pDrawable);
268 };
269 
270 inline void OdGiFastExtCalc::setSetExtentsCalled(bool bSet)
271 {
272  SETBIT(m_flags, kSetExtentsCalledFlag, bSet);
273 }
274 
276 {
277  return GETBIT(m_flags, kSetExtentsCalledFlag);
278 }
279 
281 {
282  SETBIT(m_flags, kDrawingInitiatedFlag, bSet);
283 }
284 
286 {
287  return GETBIT(m_flags, kDrawingInitiatedFlag);
288 }
289 
290 inline void OdGiFastExtCalc::setDrawInvisible(bool bSet)
291 {
292  SETBIT(m_flags, kDrawInvisiblesFlag, bSet);
293 }
294 
296 {
297  return GETBIT(m_flags, kDrawInvisiblesFlag);
298 }
299 
301 {
302  SETBIT(m_flags, kDrawInvisiblesNestedFlag, bSet);
303 }
304 
306 {
307  return GETBIT(m_flags, kDrawInvisiblesNestedFlag);
308 }
309 
311 {
312  m_flags &= ~kDrawingInitiatedFlag;
313 }
314 
316 {
317  SETBIT(m_flags, kViewportDrawEnabledFlag, bSet);
318 }
319 
321 {
322  return GETBIT(m_flags, kViewportDrawEnabledFlag);
323 }
324 
325 #include "TD_PackPop.h"
326 
327 #endif // #ifndef _ODGIFASTEXTCALC_INCLUDED_
OdGiRegenType
Definition: GiCommonDraw.h:50
OdGiDeviationType
Definition: GiCommonDraw.h:64
#define ODGI_EXPORT
Definition: GiExport.h:35
OdGiTransformed< OdGiJoinCommonDraw< OdGiWorldDrawImpl, OdGiFastExtCalcViewportDrawImpl > > OdGiFastExtCalcBase
Definition: GiFastExtCalc.h:44
OdGiArcType
Definition: GiGeometry.h:683
@ kOdGiArcSimple
Definition: GiGeometry.h:684
ptrdiff_t OdGsMarker
unsigned int OdUInt32
int OdInt32
#define ODRX_ABSTRACT
unsigned char OdUInt8
wchar_t OdChar
#define SETBIT(flags, bit, value)
Definition: OdaDefs.h:499
#define GETBIT(flags, bit)
Definition: OdaDefs.h:500
void circularArc(const OdGePoint3d &center, double radius, const OdGeVector3d &normal, const OdGeVector3d &startVector, double sweepAngle, OdGiArcType arcType=kOdGiArcSimple)
void addTextExtents(const OdGePoint3d &locExtMin, const OdGePoint3d &locExtMax, const OdGePoint3d &position, const OdGeVector3d &normal, const OdGeVector3d &direction)
void shape(const OdGePoint3d &position, const OdGeVector3d &normal, const OdGeVector3d &direction, int shapeNumber, const OdGiTextStyle *pTextStyle)
void text(const OdGePoint3d &position, const OdGeVector3d &normal, const OdGeVector3d &direction, const OdChar *msg, OdInt32 length, bool raw, const OdGiTextStyle *pTextStyle)
void text(const OdGePoint3d &position, const OdGeVector3d &normal, const OdGeVector3d &direction, double height, double width, double oblique, const OdString &msg)
bool isViewportDrawEnabled() const
void ellipArc(const OdGeEllipArc3d &ellipArc, const OdGePoint3d *endPointsOverrides=0, OdGiArcType arcType=kOdGiArcSimple)
void setViewportDrawEnabled(bool bSet)
void edge(const OdGiEdge2dArray &edges)
double deviation(const OdGiDeviationType deviationType, const OdGePoint3d &pointOnCurve) const
void polyline(OdInt32 numVertices, const OdGePoint3d *vertexList, const OdGeVector3d *pNormal=0, OdGsMarker baseSubEntMarker=-1)
OdGiWorldDraw * getWorldDraw() const
OdGiRegenType regenType() const
bool isDrawingInitiated() const
void popModelTransform()
void setDrawInvisible(bool bSet)
void draw(const OdGiDrawable *pDrawable)
void circle(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint, const OdGePoint3d &thirdPoint)
void xline(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint)
void pline(const OdGiPolyline &polyline, OdUInt32 fromIndex=0, OdUInt32 numSegs=0)
void ray(const OdGePoint3d &basePoint, const OdGePoint3d &throughPoint)
void resetFirstDrawFlag()
void setDrawingInitiated(bool bSet)
OdGiViewportDraw * getViewportDraw() const
void worldLine(const OdGePoint3d points[2])
void circle(const OdGePoint3d &center, double radius, const OdGeVector3d &normal)
void popClipBoundary()
void rowOfDots(OdInt32 numPoints, const OdGePoint3d &startPoint, const OdGeVector3d &dirToNextPoint)
void pushModelTransform(const OdGeMatrix3d &xfm)
void circularArc(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint, const OdGePoint3d &thirdPoint, OdGiArcType arcType=kOdGiArcSimple)
bool isSetExtentsCalled() const
bool regenAbort() const
void getExtents(OdGeExtents3d &extents) const
OdGiViewportGeometry * getViewportGeometry() const
OdGiWorldGeometry * getWorldGeometry() const
void mesh(OdInt32 numRows, OdInt32 numColumns, const OdGePoint3d *vertexList, const OdGiEdgeData *pEdgeData=0, const OdGiFaceData *pFaceData=0, const OdGiVertexData *pVertexData=0)
void setExtents(const OdGePoint3d *newExtents)
void pushClipBoundary(OdGiClipBoundary *pBoundary)
void setDrawInvisibleNested(bool bSet)
bool isDrawInvisible() const
bool isDrawInvisibleNested() const
void nurbs(const OdGeNurbCurve3d &nurbsCurve)
void shell(OdInt32 numVertices, const OdGePoint3d *vertexList, OdInt32 faceListSize, const OdInt32 *faceList, const OdGiEdgeData *pEdgeData=0, const OdGiFaceData *pFaceData=0, const OdGiVertexData *pVertexData=0)
void polygon(OdInt32 numVertices, const OdGePoint3d *vertexList)
void polypoint(OdInt32 numPoints, const OdGePoint3d *vertexList, const OdCmEntityColor *pColors, const OdCmTransparency *pTransparency, const OdGeVector3d *pNormals, const OdGsMarker *pSubEntMarkers, OdInt32 nPointSize)
void image(const OdGiImageBGRA32 &img, const OdGePoint3d &origin, const OdGeVector3d &uVec, const OdGeVector3d &vVec, OdGiRasterImage::TransparencyMode trpMode=OdGiRasterImage::kTransparency8Bit)
ODRX_USING_HEAP_OPERATORS(OdGiFastExtCalcBase)
GLint GLenum GLsizei width
Definition: gles2_ext.h:110
GLuint GLsizei GLsizei * length
Definition: gles2_ext.h:274
GLint GLenum GLsizei GLsizei height
Definition: gles2_ext.h:110