IMaterialProperties.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 
10 #include <DgnPlatform/Handler.h> // For MissingHandlerPermissions
12 
14 
17 
18 
19 typedef bpair<WString, MaterialId> MaterialSubEntityAttachmentPair;
20 typedef bvector<MaterialSubEntityAttachmentPair> MaterialSubEntityAttachments;
21 
22 //=======================================================================================
25 // @remark Required library : DgnPlatform<ApiNumber>.lib i.e. DgnPlatform5.lib
26 // @bsiclass Bentley Systems
27 //=======================================================================================
29 {
30 private:
31  virtual void MakeClassAbstract() = 0;
32 public:
33 public:
34 
35 ELEMENTHANDLER_EXTENSION_DECLARE_MEMBERS(IMaterialPropertiesExtension, DGNPLATFORM_EXPORT)
36 
37 /*---------------------------------------------------------------------------------**/
47 DGNPLATFORM_EXPORT MaterialCP FindMaterialAttachment (ElementHandleCR eh, DgnModelRefR renderModelRef) const;
48 
49 /*---------------------------------------------------------------------------------**/
60 DGNPLATFORM_EXPORT BentleyStatus StoresAttachmentInfo (ElementHandleCR eh, MaterialIdR id) const;
61 
62 
63 
64 /*---------------------------------------------------------------------------------**/
77 DGNPLATFORM_EXPORT MaterialCP FindMaterial (ElementHandleCR eh, LevelId level, UInt32 colorIndex, DgnModelRefR renderModelRef, bool useSymbologyOverride) const;
78 
79 /*---------------------------------------------------------------------------------**/
86 DGNPLATFORM_EXPORT BentleyStatus AddMaterialAttachment (EditElementHandleR eeh, MaterialIdCR materialId);
87 
88 /*---------------------------------------------------------------------------------**/
94 DGNPLATFORM_EXPORT BentleyStatus DeleteMaterialAttachment (EditElementHandleR eeh);
95 
96 /*---------------------------------------------------------------------------------**/
102 DGNPLATFORM_EXPORT bool SupportsSubEntityAttachments (ElementHandleCR eh) const;
103 
104 /*---------------------------------------------------------------------------------**/
110 DGNPLATFORM_EXPORT bool HasSubEntityAttachments (ElementHandleCR eh) const;
111 
112 /*---------------------------------------------------------------------------------**/
119 DGNPLATFORM_EXPORT BentleyStatus GetSubEntityAttachments (ElementHandleCR eh, MaterialSubEntityAttachments& attachments) const;
120 
121 /*---------------------------------------------------------------------------------**/
131 DGNPLATFORM_EXPORT BentleyStatus AttachSubEntityMaterial (EditElementHandleR eeh, bvector<WString>& subEntities, MaterialIdCR materialId);
132 
133 /*---------------------------------------------------------------------------------**/
140 DGNPLATFORM_EXPORT BentleyStatus DetachSubEntityMaterial (EditElementHandleR eeh, bvector<WString>& subEntities);
141 
142 /*---------------------------------------------------------------------------------**/
148 DGNPLATFORM_EXPORT ProjectionAttachmentType FindMaterialProjection (ElementHandleCR eh) const;
149 
150 /*---------------------------------------------------------------------------------**/
159 DGNPLATFORM_EXPORT BentleyStatus GetMaterialProjectionParameters (ElementHandleCR eh, ProjectionAttachmentType type, MapUnits units, MaterialProjectionParametersR params) const;
160 
161 /*---------------------------------------------------------------------------------**/
172 DGNPLATFORM_EXPORT BentleyStatus AddElementProjection (EditElementHandleR eeh, DPoint3dCR offset, DPoint3dCR scale, DPoint3dCR angles, MapMode mode, ProjectionVariant variant);
173 
174 /*---------------------------------------------------------------------------------**/
180 DGNPLATFORM_EXPORT BentleyStatus DeleteElementProjection (EditElementHandleR eeh);
181 
182 }; // IMaterialPropertiesExtension
183 
185 
187 
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
defined (resource) && !defined (type_resource_generator)
Definition: MaterialSettings.h:94
UInt32 LevelId
Definition: DgnPlatformBaseType.r.h:85
struct DgnPlatform::MaterialId const & MaterialIdCR
Definition: DgnPlatform.h:394
A writeable "handle" to an MSElement.
Definition: ElementHandle.h:470
MapUnits
Definition: MaterialSettings.h:57
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
bpair< WString, MaterialId > MaterialSubEntityAttachmentPair
Definition: IMaterialProperties.h:19
uint32_t UInt32
Definition: Bentley.r.h:128
Provides methods for inspecting the current material properties of an element.
Definition: IMaterialProperties.h:28
struct DgnPlatform::Material const * MaterialCP
Definition: DgnPlatform.h:391
#define CLRPUBLIC
Definition: DgnPlatform/ExportMacros.h:12
BentleyStatus
Definition: Bentley.h:208
A DgnModelRef provides access to a model in a Bentley::DgnPlatform::DgnFile.
Definition: DgnModelRef.h:172
ProjectionAttachmentType
Definition: MaterialSettings.h:71
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
bvector< MaterialSubEntityAttachmentPair > MaterialSubEntityAttachments
Definition: IMaterialProperties.h:20
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
Definition: Material.h:421
A Handler::Extension can be used to add additional interfaces to a Handler at runtime.
Definition: Handler.h:222
struct DgnPlatform::ElementHandle const & ElementHandleCR
Definition: DgnPlatform.h:260
ProjectionVariant
Definition: MaterialSettings.h:82
MapMode
Definition: MaterialSettings.h:40

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