ElementGraphics.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
11 #include "DgnFontManager.h"
12 
14 
17 
18 /*=================================================================================**/
24 {
27 virtual bool _ExpandPatterns () const {return false;}
28 
32 virtual bool _ExpandLineStyles (ILineStyleCP lsStyle) const {return false;}
33 
36 virtual bool _WantClipping () const {return true;}
37 
44 virtual bool _ProcessAsFacets (bool isPolyface) const {return isPolyface;}
45 
54 virtual bool _ProcessAsBody (bool isCurved) const {return true;}
55 
58 virtual void _AnnounceContext (ViewContextR context) {}
59 
62 virtual void _AnnounceTransform (TransformCP trans) {}
63 
66 virtual void _AnnounceElemMatSymb (ElemMatSymbCR matSymb) {}
67 
70 virtual void _AnnounceElemDisplayParams (ElemDisplayParamsCR displayParams) {}
71 
75 virtual BentleyStatus _ProcessTextString (TextStringCR text) {return SUCCESS;} // Don't export glyph geometry...
76 
83 virtual BentleyStatus _ProcessCurvePrimitive (ICurvePrimitiveCR curve, bool isClosed, bool isFilled) {return ERROR;}
84 
89 virtual BentleyStatus _ProcessCurveVector (CurveVectorCR curves, bool isFilled) {return ERROR;}
90 
95 
100 
108 
114 virtual BentleyStatus _ProcessFacets (PolyfaceQueryCR meshData, bool isFilled) {return ERROR;}
115 
119 
121 virtual DrawPurpose _GetDrawPurpose () {return DrawPurpose::CaptureGeometry;}
122 
126 virtual void _OutputGraphics (ViewContextR context) {}
127 
128 }; // IElementGraphicsProcessor
129 
130 /*=================================================================================**/
138 {
144 DGNPLATFORM_EXPORT static void Process (ElementHandleCR eh, IElementGraphicsProcessorR processor, DgnModelRefP rootParent = NULL);
145 
151 DGNPLATFORM_EXPORT static void Process (IElementGraphicsProcessorR processor, DgnModelP dgnModel = NULL);
152 
153 
154 }; // ElementGraphicsOutput
155 
157 
159 
virtual BentleyStatus _ProcessSurface(MSBsplineSurfaceCR surface)
Collect output as a bspline surface.
Definition: ElementGraphics.h:99
struct PolyfaceQuery const & PolyfaceQueryCR
Definition: msgeomstructs_typedefs.h:178
Callback methods for collecting graphical output of an element's Draw method.
Definition: ElementGraphics.h:23
virtual bool _ProcessAsFacets(bool isPolyface) const
Process surfaces and solids not handled directly or are clipped through _ProcessFaceta.
Definition: ElementGraphics.h:44
Definition: Bentley.h:212
Definition: ViewContext.h:358
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
virtual bool _ProcessAsBody(bool isCurved) const
Process surfaces and solids not handled directly or are clipped through _ProcessBody.
Definition: ElementGraphics.h:54
struct DgnPlatform::ElemDisplayParams const & ElemDisplayParamsCR
Definition: DgnPlatform.h:255
virtual bool _ExpandLineStyles(ILineStyleCP lsStyle) const
Controls whether linestyle graphics will be output.
Definition: ElementGraphics.h:32
struct DgnPlatform::IFaceMaterialAttachments const * IFaceMaterialAttachmentsCP
Definition: DgnPlatform.h:333
virtual BentleyStatus _ProcessFacets(PolyfaceQueryCR meshData, bool isFilled)
Collect output for surfaces and solids as facets.
Definition: ElementGraphics.h:114
DrawPurpose
Definition: DgnPlatform.h:1548
virtual BentleyStatus _ProcessTextString(TextStringCR text)
Collect output as text.
Definition: ElementGraphics.h:75
struct CurveVector const & CurveVectorCR
Definition: msgeomstructs_typedefs.h:172
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
struct DgnPlatform::ElemMatSymb const & ElemMatSymbCR
Definition: DgnPlatform.h:257
FacetOptions carries tolerance and count data to be used in making surface facets and curve chords...
Definition: FacetOptions.h:34
#define NULL
Definition: Bentley.h:157
struct DgnPlatform::ILineStyle const * ILineStyleCP
Definition: DgnPlatform.h:317
struct MSBsplineSurface const & MSBsplineSurfaceCR
Definition: msgeomstructs_typedefs.h:159
virtual void _OutputGraphics(ViewContextR context)
Allow processor to output graphics to it's process methods.
Definition: ElementGraphics.h:126
virtual DrawPurpose _GetDrawPurpose()
Allow processor to override the default draw purpose.
Definition: ElementGraphics.h:121
struct DgnPlatform::ISolidKernelEntity const & ISolidKernelEntityCR
Definition: DgnPlatform.h:331
virtual void _AnnounceContext(ViewContextR context)
Supply the current context that is processing the geometry.
Definition: ElementGraphics.h:58
A DgnModel represents a DgnModel in memory.
Definition: DgnModel.h:236
virtual void _AnnounceElemMatSymb(ElemMatSymbCR matSymb)
Supply the current symbology that subsequent geometry is displayed with.
Definition: ElementGraphics.h:66
virtual bool _WantClipping() const
Controls whether to output clipped graphics if any clipping is pushed by display. ...
Definition: ElementGraphics.h:36
BentleyStatus
Definition: Bentley.h:208
virtual bool _ExpandPatterns() const
Controls whether pattern graphics will be output.
Definition: ElementGraphics.h:27
A DgnModelRef provides access to a model in a Bentley::DgnPlatform::DgnFile.
Definition: DgnModelRef.h:172
struct Transform const * TransformCP
Definition: msgeomstructs_typedefs.h:134
virtual BentleyStatus _ProcessBody(ISolidKernelEntityCR entity, IFaceMaterialAttachmentsCP attachments)
Collect output for surfaces and solids using a solid kernel entity.
Definition: ElementGraphics.h:107
virtual void _AnnounceTransform(TransformCP trans)
Supply the current transform that subsequent geometry is displayed through.
Definition: ElementGraphics.h:62
virtual IFacetOptionsP _GetFacetOptionsP()
Allow processor to override the default facet options.
Definition: ElementGraphics.h:118
struct DgnPlatform::TextString const & TextStringCR
Definition: DgnPlatform.h:460
struct ICurvePrimitive const & ICurvePrimitiveCR
Definition: msgeomstructs_typedefs.h:166
virtual void _AnnounceElemDisplayParams(ElemDisplayParamsCR displayParams)
Supply the current symbology used to generate the ElemMatSym values.
Definition: ElementGraphics.h:70
struct ISolidPrimitive const & ISolidPrimitiveCR
Definition: msgeomstructs_typedefs.h:185
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
Definition: Bentley.h:210
virtual BentleyStatus _ProcessCurveVector(CurveVectorCR curves, bool isFilled)
Collect output as a CurveVector.
Definition: ElementGraphics.h:89
virtual BentleyStatus _ProcessCurvePrimitive(ICurvePrimitiveCR curve, bool isClosed, bool isFilled)
Collect output as a single curve component.
Definition: ElementGraphics.h:83
struct DgnPlatform::ElementHandle const & ElementHandleCR
Definition: DgnPlatform.h:260
Provides an implementation of a ViewContext and IViewDraw suitable for collecting a "picture" of an e...
Definition: ElementGraphics.h:137
virtual BentleyStatus _ProcessSolidPrimitive(ISolidPrimitiveCR primitive)
Collect output as a solid primitive.
Definition: ElementGraphics.h:94

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.