CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GiFastExtCalc.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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-2022 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 typedef OdGeExtents3d Extents;
55 OdGeExtents3d m_worldExt;
56 OdStack<Extents> m_extStack;
57 OdGeExtents3d* m_pCurrExt;
58
59 enum Flags
60 {
61 kSetExtentsCalledFlag = 1,
62 kDrawInvisiblesFlag = 2,
63 kDrawInvisiblesNestedFlag = 4,
64 kDrawingInitiatedFlag = 8,
65 kViewportDrawEnabledFlag = 16
66 };
67 OdUInt8 m_flags;
68
69 void setSetExtentsCalled(bool bSet);
70//FELIX_CHANGE_BEGIN
71public:
72 bool isSetExtentsCalled() const;
73//FELIX_CHANGE_END
74
75 void setDrawingInitiated(bool bSet);
76 bool isDrawingInitiated() const;
77
79 const OdGePoint3d& locExtMin,
80 const OdGePoint3d& locExtMax,
81 const OdGePoint3d& position,
82 const OdGeVector3d& normal,
83 const OdGeVector3d& direction);
84protected:
86
88public:
89
94
99 void getExtents(OdGeExtents3d& extents) const;
100
105 void setDrawInvisible(bool bSet);
106
110 bool isDrawInvisible() const;
111
116 void setDrawInvisibleNested(bool bSet);
117
121 bool isDrawInvisibleNested() const;
122
127 void resetFirstDrawFlag();
128
133 void setViewportDrawEnabled(bool bSet);
134
138 bool isViewportDrawEnabled() const;
139
144
149
154
159
161 // OdGiCommonDraw Overrides
162
163 bool regenAbort() const;
164 double deviation(const OdGiDeviationType deviationType, const OdGePoint3d& pointOnCurve) const;
166
168 // OdGiGeometry Overrides
169
170 void circle(const OdGePoint3d& center, double radius, const OdGeVector3d& normal);
171
172 void circle(const OdGePoint3d& firstPoint, const OdGePoint3d& secondPoint, const OdGePoint3d& thirdPoint);
173
174 void circularArc(const OdGePoint3d& center,
175 double radius,
176 const OdGeVector3d& normal,
177 const OdGeVector3d& startVector,
178 double sweepAngle,
179 OdGiArcType arcType = kOdGiArcSimple);
180
181 void circularArc(const OdGePoint3d& firstPoint,
182 const OdGePoint3d& secondPoint,
183 const OdGePoint3d& thirdPoint,
184 OdGiArcType arcType = kOdGiArcSimple);
185
186 void polyline(OdInt32 numVertices,
187 const OdGePoint3d* vertexList,
188 const OdGeVector3d* pNormal = 0,
189 OdGsMarker baseSubEntMarker = -1);
190
191 void polygon(OdInt32 numVertices, const OdGePoint3d* vertexList);
192
193 void pline(const OdGiPolyline& polyline, OdUInt32 fromIndex = 0, OdUInt32 numSegs = 0);
194
195
205 void shape(const OdGePoint3d& position,
206 const OdGeVector3d& normal, const OdGeVector3d& direction,
207 int shapeNumber, const OdGiTextStyle* pTextStyle);
208
209 void text(const OdGePoint3d& position,
210 const OdGeVector3d& normal, const OdGeVector3d& direction,
211 double height, double width, double oblique, const OdString& msg);
212
213 void text(const OdGePoint3d& position,
214 const OdGeVector3d& normal, const OdGeVector3d& direction,
215 const OdChar* msg, OdInt32 length, bool raw, const OdGiTextStyle* pTextStyle);
216
217
218 void xline(const OdGePoint3d& firstPoint, const OdGePoint3d& secondPoint);
219
220 void ray(const OdGePoint3d& basePoint, const OdGePoint3d& throughPoint );
221
222 void nurbs(const OdGeNurbCurve3d& nurbsCurve);
223
224 void ellipArc(const OdGeEllipArc3d& ellipArc,
225 const OdGePoint3d* endPointsOverrides = 0,
226 OdGiArcType arcType = kOdGiArcSimple);
227
228 void mesh(OdInt32 numRows,
229 OdInt32 numColumns,
230 const OdGePoint3d* vertexList,
231 const OdGiEdgeData* pEdgeData = 0,
232 const OdGiFaceData* pFaceData = 0,
233 const OdGiVertexData* pVertexData = 0);
234
235 void shell(OdInt32 numVertices,
236 const OdGePoint3d* vertexList,
237 OdInt32 faceListSize,
238 const OdInt32* faceList,
239 const OdGiEdgeData* pEdgeData = 0,
240 const OdGiFaceData* pFaceData = 0,
241 const OdGiVertexData* pVertexData = 0);
242
243 void worldLine(const OdGePoint3d points[2]);
244
245 void image(const OdGiImageBGRA32& img,
246 const OdGePoint3d& origin,
247 const OdGeVector3d& uVec,
248 const OdGeVector3d& vVec,
250
251 void edge(const OdGiEdge2dArray& edges);
252
253 void polypoint(OdInt32 numPoints, const OdGePoint3d* vertexList, const OdCmEntityColor* pColors, const OdCmTransparency* pTransparency,
254 const OdGeVector3d* pNormals, const OdGsMarker* pSubEntMarkers, OdInt32 nPointSize);
255
256 void polyPolygon(OdUInt32 numIndices, const OdUInt32 *pNumPositions, const OdGePoint3d *pPositions,
257 const OdUInt32 *pNumPoints, const OdGePoint3d *pPoints,
258 const OdCmEntityColor *pOutlineColors = NULL, const OdUInt32 *pOutlinePsLinetypes = NULL,
259 const OdCmEntityColor *pFillColors = NULL, const OdCmTransparency *pFillTransparencies = NULL);
260
261 void rowOfDots(OdInt32 numPoints, const OdGePoint3d& startPoint, const OdGeVector3d& dirToNextPoint);
262
263 void pointCloud(const OdGiPointCloud &pCloud);
264
265 void setExtents(const OdGePoint3d *newExtents);
266
269
272
273 void draw(const OdGiDrawable* pDrawable);
274};
275
276inline void OdGiFastExtCalc::setSetExtentsCalled(bool bSet)
277{
278 SETBIT(m_flags, kSetExtentsCalledFlag, bSet);
279}
280
282{
283 return GETBIT(m_flags, kSetExtentsCalledFlag);
284}
285
287{
288 SETBIT(m_flags, kDrawingInitiatedFlag, bSet);
289}
290
292{
293 return GETBIT(m_flags, kDrawingInitiatedFlag);
294}
295
297{
298 SETBIT(m_flags, kDrawInvisiblesFlag, bSet);
299}
300
302{
303 return GETBIT(m_flags, kDrawInvisiblesFlag);
304}
305
307{
308 SETBIT(m_flags, kDrawInvisiblesNestedFlag, bSet);
309}
310
312{
313 return GETBIT(m_flags, kDrawInvisiblesNestedFlag);
314}
315
317{
318 m_flags &= ~kDrawingInitiatedFlag;
319}
320
322{
323 SETBIT(m_flags, kViewportDrawEnabledFlag, bSet);
324}
325
327{
328 return GETBIT(m_flags, kViewportDrawEnabledFlag);
329}
330
331#include "TD_PackPop.h"
332
333#endif // #ifndef _ODGIFASTEXTCALC_INCLUDED_
OdGiRegenType
Definition: GiCommonDraw.h:51
OdGiDeviationType
Definition: GiCommonDraw.h:65
#define ODGI_EXPORT
Definition: GiExport.h:35
OdGiTransformed< OdGiJoinCommonDraw< OdGiWorldDrawImpl, OdGiFastExtCalcViewportDrawImpl > > OdGiFastExtCalcBase
Definition: GiFastExtCalc.h:43
OdGiArcType
Definition: GiGeometry.h:787
@ kOdGiArcSimple
Definition: GiGeometry.h:788
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