CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
GiFastExtCalc.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2024 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
38class OdGiFastExtCalcViewportDrawImpl : public OdGiDummyViewportDraw<OdGiDummyViewportGeometry<OdGiViewportDraw_> > { };
44
53{
54 //DOM-IGNORE-BEGIN
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
72public:
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
86 //DOM-IGNORE-END
87protected:
89
91public:
92
97
102 void getExtents(OdGeExtents3d& extents) const;
103
108 void setDrawInvisible(bool bSet);
109
113 bool isDrawInvisible() const;
114
119 void setDrawInvisibleNested(bool bSet);
120
124 bool isDrawInvisibleNested() const;
125
130 void resetFirstDrawFlag();
131
136 void setViewportDrawEnabled(bool bSet);
137
141 bool isViewportDrawEnabled() const;
142
147
152
157
162
164 // OdGiCommonDraw Overrides
165
166 bool regenAbort() const;
167 double deviation(const OdGiDeviationType deviationType, const OdGePoint3d& pointOnCurve) const;
169
171 // OdGiGeometry Overrides
172
173 void circle(const OdGePoint3d& center, double radius, const OdGeVector3d& normal);
174
175 void circle(const OdGePoint3d& firstPoint, const OdGePoint3d& secondPoint, const OdGePoint3d& thirdPoint);
176
177 void circularArc(const OdGePoint3d& center,
178 double radius,
179 const OdGeVector3d& normal,
180 const OdGeVector3d& startVector,
181 double sweepAngle,
182 OdGiArcType arcType = kOdGiArcSimple);
183
184 void circularArc(const OdGePoint3d& firstPoint,
185 const OdGePoint3d& secondPoint,
186 const OdGePoint3d& thirdPoint,
187 OdGiArcType arcType = kOdGiArcSimple);
188
189 void polyline(OdInt32 numVertices,
190 const OdGePoint3d* vertexList,
191 const OdGeVector3d* pNormal = 0,
192 OdGsMarker baseSubEntMarker = -1);
193
194 void polygon(OdInt32 numVertices, const OdGePoint3d* vertexList);
195
196 void pline(const OdGiPolyline& polyline, OdUInt32 fromIndex = 0, OdUInt32 numSegs = 0);
197
198
208 void shape(const OdGePoint3d& position,
209 const OdGeVector3d& normal, const OdGeVector3d& direction,
210 int shapeNumber, const OdGiTextStyle* pTextStyle);
211
212 void text(const OdGePoint3d& position,
213 const OdGeVector3d& normal, const OdGeVector3d& direction,
214 double height, double width, double oblique, const OdString& msg);
215
216 void text(const OdGePoint3d& position,
217 const OdGeVector3d& normal, const OdGeVector3d& direction,
218 const OdChar* msg, OdInt32 length, bool raw, const OdGiTextStyle* pTextStyle);
219
220
221 void xline(const OdGePoint3d& firstPoint, const OdGePoint3d& secondPoint);
222
223 void ray(const OdGePoint3d& basePoint, const OdGePoint3d& throughPoint );
224
225 void nurbs(const OdGeNurbCurve3d& nurbsCurve);
226
228 const OdGePoint3d* endPointsOverrides = 0,
229 OdGiArcType arcType = kOdGiArcSimple);
230
231 void mesh(OdInt32 numRows,
232 OdInt32 numColumns,
233 const OdGePoint3d* vertexList,
234 const OdGiEdgeData* pEdgeData = 0,
235 const OdGiFaceData* pFaceData = 0,
236 const OdGiVertexData* pVertexData = 0);
237
238 void shell(OdInt32 numVertices,
239 const OdGePoint3d* vertexList,
240 OdInt32 faceListSize,
241 const OdInt32* faceList,
242 const OdGiEdgeData* pEdgeData = 0,
243 const OdGiFaceData* pFaceData = 0,
244 const OdGiVertexData* pVertexData = 0);
245
246 void worldLine(const OdGePoint3d points[2]);
247
248 void image(const OdGiImageBGRA32& img,
249 const OdGePoint3d& origin,
250 const OdGeVector3d& uVec,
251 const OdGeVector3d& vVec,
253
254 void edge(const OdGiEdge2dArray& edges);
255
256 void polypoint(OdInt32 numPoints, const OdGePoint3d* vertexList, const OdCmEntityColor* pColors, const OdCmTransparency* pTransparency,
257 const OdGeVector3d* pNormals, const OdGsMarker* pSubEntMarkers, OdInt32 nPointSize);
258
259 void polyPolygon(OdUInt32 numIndices, const OdUInt32 *pNumPositions, const OdGePoint3d *pPositions,
260 const OdUInt32 *pNumPoints, const OdGePoint3d *pPoints,
261 const OdCmEntityColor *pOutlineColors = NULL, const OdUInt32 *pOutlinePsLinetypes = NULL,
262 const OdCmEntityColor *pFillColors = NULL, const OdCmTransparency *pFillTransparencies = NULL);
263
264 void rowOfDots(OdInt32 numPoints, const OdGePoint3d& startPoint, const OdGeVector3d& dirToNextPoint);
265
266 void pointCloud(const OdGiPointCloud &pCloud);
267
268 void setExtents(const OdGePoint3d *newExtents);
269
272
275
276 void draw(const OdGiDrawable* pDrawable);
277};
278
279inline void OdGiFastExtCalc::setSetExtentsCalled(bool bSet)
280{
281 SETBIT(m_flags, kSetExtentsCalledFlag, bSet);
282}
283
285{
286 return GETBIT(m_flags, kSetExtentsCalledFlag);
287}
288
290{
291 SETBIT(m_flags, kDrawingInitiatedFlag, bSet);
292}
293
295{
296 return GETBIT(m_flags, kDrawingInitiatedFlag);
297}
298
300{
301 SETBIT(m_flags, kDrawInvisiblesFlag, bSet);
302}
303
305{
306 return GETBIT(m_flags, kDrawInvisiblesFlag);
307}
308
310{
311 SETBIT(m_flags, kDrawInvisiblesNestedFlag, bSet);
312}
313
315{
316 return GETBIT(m_flags, kDrawInvisiblesNestedFlag);
317}
318
320{
321 m_flags &= ~kDrawingInitiatedFlag;
322}
323
325{
326 SETBIT(m_flags, kViewportDrawEnabledFlag, bSet);
327}
328
330{
331 return GETBIT(m_flags, kViewportDrawEnabledFlag);
332}
333
334#include "TD_PackPop.h"
335
336#endif // #ifndef _ODGIFASTEXTCALC_INCLUDED_
OdGiRegenType
OdGiDeviationType
#define ODGI_EXPORT
Definition GiExport.h:35
OdGiTransformed< OdGiJoinCommonDraw< OdGiWorldDrawImpl, OdGiFastExtCalcViewportDrawImpl > > OdGiFastExtCalcBase
OdGiArcType
Definition GiGeometry.h:877
@ kOdGiArcSimple
Definition GiGeometry.h:878
OdArray< OdGeCurve2d *, OdMemoryAllocator< OdGeCurve2d * > > OdGiEdge2dArray
Definition GiGeometry.h:51
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:516
#define GETBIT(flags, bit)
Definition OdaDefs.h:517
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)
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)
OdGiWorldGeometry * getWorldGeometry() const
void circularArc(const OdGePoint3d &firstPoint, const OdGePoint3d &secondPoint, const OdGePoint3d &thirdPoint, OdGiArcType arcType=kOdGiArcSimple)
OdGiViewportGeometry * getViewportGeometry() const
bool isSetExtentsCalled() const
bool regenAbort() const
void getExtents(OdGeExtents3d &extents) 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
void polyPolygon(OdUInt32 numIndices, const OdUInt32 *pNumPositions, const OdGePoint3d *pPositions, const OdUInt32 *pNumPoints, const OdGePoint3d *pPoints, const OdCmEntityColor *pOutlineColors=NULL, const OdUInt32 *pOutlinePsLinetypes=NULL, const OdCmEntityColor *pFillColors=NULL, const OdCmTransparency *pFillTransparencies=NULL)
bool isDrawInvisibleNested() const
void nurbs(const OdGeNurbCurve3d &nurbsCurve)
void pointCloud(const OdGiPointCloud &pCloud)
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)
OdGiViewportDraw * getViewportDraw() const
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