CFx SDK Documentation  2023 SP0
FxBIMMaterial.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2020-2022 by Graebert GmbH.
3 //
4 // Permission to use, copy, modify, and distribute this software in
5 // object code form for any purpose and without fee is hereby granted,
6 // provided that the above copyright notice appears in all copies and
7 // that both that copyright notice and the limited warranty and
8 // restricted rights notice below appear in all supporting
9 // documentation.
10 //
11 // GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12 // GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14 // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15 // UNINTERRUPTED OR ERROR FREE.
16 
17 #pragma once
18 
19 #include "FxBIM.h"
20 #include "sdk/FxBIMDatabase.h"
21 
22 #include <StringArray.h>
23 #include <DbMaterial.h>
24 
25 class CFxBIMMaterialImpl;
26 class CFxMaterialLayerSetImpl;
27 
28 class CFxBIMMaterial;
30 
32 {
33  friend class CFxBIMMaterialImpl;
34 public:
36 
37  virtual ~CFxBIMMaterial();
38 
39  virtual bool IsEqual( CFxBIMMaterialPtr p ) const;
40  virtual bool IsSame( CFxBIMMaterialPtr p ) const;
41 
42  virtual OdString Name() const;
43  virtual OdResult SetName( const OdString& name );
44 
45  virtual const OdString& MappedName() const;
46  virtual void SetMappedName( const OdString& mappedName );
47 
48  enum class MaterialType
49  {
50  eBasic,
51  eLayer
52  };
53 
55 
56  // HATCH
57 
59 
60  enum class PatternType
61  {
62  eHatch,
63  eCustom
64  };
65 
66  virtual PatternType CutPatternType() const;
68 
69  virtual const OdString& CutPatternName() const;
70  virtual void SetCutPatternName( const OdString& patternName );
71 
72  virtual double CutPatternScale() const;
73  virtual void SetCutPatternScale( double patternScale );
74 
75  virtual bool CutPatternScaleWithViewPort() const;
76  virtual void SetCutPatternScaleWithViewPort( bool ScaleWithViewport );
77 
78  virtual double CutPatternRotation() const;
79  virtual void SetCutPatternRotation( double angle );
80 
82  virtual void SetCutPatternRotationRelativeToElementBaseline( bool RotationRelativeToElementBaseline );
83 
85  virtual void SetCutPatternLineweight( OdDb::LineWeight lineweight );
86 
87  virtual OdCmColor CutPatternColor() const;
88  virtual void SetCutPatternColor( OdCmColor color );
89 
92 
93  virtual const OdString& SurfacePatternName() const;
94  virtual void SetSurfacePatternName( const OdString& patternName );
95 
96  virtual double SurfacePatternScale() const;
97  virtual void SetSurfacePatternScale( double patternScale );
98 
99  virtual bool SurfacePatternScaleWithViewPort() const;
100  virtual void SetSurfacePatternScaleWithViewPort( bool ScaleWithViewport );
101 
102  virtual double SurfacePatternRotation() const;
103  virtual void SetSurfacePatternRotation( double angle );
104 
106  virtual void SetSurfacePatternRotationRelativeToElementBaseline( bool RotationRelativeToElementBaseline );
107 
109  virtual void SetSurfacePatternLineweight( OdDb::LineWeight lineweight );
110 
112  virtual void SetSurfacePatternColor( OdCmColor color );
113 
114  // BOUNDARY
115 
116  virtual bool CutBoundaryUnify() const;
117  virtual void SetCutBoundaryUnify( bool unify );
118 
120  virtual void SetCutBoundaryLineweight( OdDb::LineWeight lineweight );
121 
122  virtual OdCmColor CutBoundaryColor() const;
123  virtual void SetCutBoundaryColor( OdCmColor color );
124 
125  virtual bool SurfaceBoundaryUnify() const;
126  virtual void SetSurfaceBoundaryUnify( bool unify );
127 
129  virtual void SetSurfaceBoundaryLineweight( OdDb::LineWeight lineweight );
130 
132  virtual void SetSurfaceBoundaryColor( OdCmColor color );
133 
134  // SHADING
135 
136  virtual OdCmColor CutColor() const;
137  virtual void SetCutColor( OdCmColor color );
138 
139  virtual double CutTransparency() const;
140  virtual void SetCutTransparency( double transparencyPercentage );
141 
142  virtual OdCmColor SurfaceColor() const;
143  virtual void SetSurfaceColor( OdCmColor color );
144 
145  virtual double SurfaceTransparency() const;
146  virtual void SetSurfaceTransparency( double transparencyPercentage );
147 
148 public:
149  OdResult dwgInFields( OdDbDwgFiler* pFiler ) override;
150  void dwgOutFields( OdDbDwgFiler* pFiler ) const override;
151 
152  OdResult dxfInFields( OdDbDxfFiler* pFiler ) override;
153  void dxfOutFields( OdDbDxfFiler* pFiler ) const override;
154 
155  void copyFrom( const OdRxObject* pSource ) override;
156 
157 protected:
159 };
160 
161 //-------------------------------------------------------------------------------------------------------------------------------------------------------------
162 
164 {
165 public:
167 
168  virtual void Appended( CFxBIMMaterial* pM, bool appended, CFxBIMDatabaseReference* pDbRef ) {};
169 };
170 
171 //==========================================================================================================================
172 //==========================================================================================================================
173 //======================================== ===========================================================
174 //======================================== CFxMaterialLayerSet ===========================================================
175 //======================================== ===========================================================
176 //==========================================================================================================================
177 //==========================================================================================================================
178 
180 {
181  friend class CFxMaterialLayerSetImpl;
182 
183 public:
185 
187 
188  bool IsEqual( CFxBIMMaterialPtr p ) const override;
189  bool IsSame( CFxBIMMaterialPtr p ) const override;
190 
191  /*
192  Following functions are not needed to be overriden for now:
193  OdResult dwgInFields( OdDbDwgFiler* pFiler ) override;
194  void dwgOutFields( OdDbDwgFiler* pFiler ) const override;
195  OdResult dxfInFields( OdDbDxfFiler* pFiler ) override;
196  void dxfOutFields( OdDbDxfFiler* pFiler ) const override;*/
197 
198  void copyFrom( const OdRxObject* pSource ) override;
199 
200 protected:
202 };
203 
#define FXBIM_API
Definition: FxBIM.h:20
OdSmartPtr< CFxMaterialLayerSet > CFxMaterialLayerSetPtr
OdSmartPtr< CFxBIMMaterial > CFxBIMMaterialPtr
Definition: FxBIMMaterial.h:28
OdResult
Definition: OdResult.h:29
virtual double CutTransparency() const
virtual const OdString & SurfacePatternName() const
virtual void SetSurfaceTransparency(double transparencyPercentage)
virtual bool CutPatternScaleWithViewPort() const
virtual void SetSurfacePatternColor(OdCmColor color)
virtual void SetSurfacePatternRotationRelativeToElementBaseline(bool RotationRelativeToElementBaseline)
virtual OdResult SetName(const OdString &name)
virtual bool IsEqual(CFxBIMMaterialPtr p) const
virtual OdCmColor CutColor() const
virtual OdDb::LineWeight SurfaceBoundaryLineweight() const
virtual const OdString & CutPatternName() const
virtual void SetCutBoundaryLineweight(OdDb::LineWeight lineweight)
virtual void SetSurfacePatternType(PatternType type)
virtual bool SurfacePatternRotationRelativeToElementBaseline() const
virtual void SetSurfacePatternRotation(double angle)
virtual void SetCutPatternScaleWithViewPort(bool ScaleWithViewport)
virtual OdDb::LineWeight CutPatternLineweight() const
virtual void SetCutPatternScale(double patternScale)
virtual double SurfacePatternRotation() const
virtual PatternType CutPatternType() const
virtual double SurfacePatternScale() const
virtual double CutPatternScale() const
virtual bool CutBoundaryUnify() const
virtual double CutPatternRotation() const
virtual void SetSurfaceBoundaryColor(OdCmColor color)
virtual void SetCutPatternName(const OdString &patternName)
virtual double SurfaceTransparency() const
virtual bool CutPatternRotationRelativeToElementBaseline() const
virtual void SetCutPatternRotationRelativeToElementBaseline(bool RotationRelativeToElementBaseline)
virtual void SetCutBoundaryUnify(bool unify)
virtual OdString Name() const
OdResult dwgInFields(OdDbDwgFiler *pFiler) override
void dwgOutFields(OdDbDwgFiler *pFiler) const override
virtual MaterialType GetMaterialType()
virtual OdDb::LineWeight SurfacePatternLineweight() const
virtual bool SurfacePatternScaleWithViewPort() const
void dxfOutFields(OdDbDxfFiler *pFiler) const override
virtual void SetCutColor(OdCmColor color)
virtual bool IsSame(CFxBIMMaterialPtr p) const
static OdStringArray PatternList(OdDb::MeasurementValue measurement)
virtual void SetSurfacePatternScaleWithViewPort(bool ScaleWithViewport)
virtual void SetCutPatternColor(OdCmColor color)
virtual OdDb::LineWeight CutBoundaryLineweight() const
virtual void SetCutPatternLineweight(OdDb::LineWeight lineweight)
virtual PatternType SurfacePatternType() const
virtual void SetSurfaceBoundaryLineweight(OdDb::LineWeight lineweight)
virtual void SetCutPatternType(PatternType type)
virtual void SetSurfacePatternLineweight(OdDb::LineWeight lineweight)
virtual void SetCutTransparency(double transparencyPercentage)
virtual bool SurfaceBoundaryUnify() const
virtual OdCmColor CutBoundaryColor() const
virtual void SetSurfacePatternName(const OdString &patternName)
virtual void SetMappedName(const OdString &mappedName)
virtual OdCmColor CutPatternColor() const
OdResult dxfInFields(OdDbDxfFiler *pFiler) override
virtual void SetCutBoundaryColor(OdCmColor color)
ODDB_DECLARE_MEMBERS(CFxBIMMaterial)
virtual OdCmColor SurfacePatternColor() const
virtual OdCmColor SurfaceColor() const
virtual void SetSurfaceColor(OdCmColor color)
virtual void SetSurfacePatternScale(double patternScale)
virtual OdCmColor SurfaceBoundaryColor() const
virtual ~CFxBIMMaterial()
virtual void SetCutPatternRotation(double angle)
virtual const OdString & MappedName() const
virtual void SetSurfaceBoundaryUnify(bool unify)
void copyFrom(const OdRxObject *pSource) override
virtual void Appended(CFxBIMMaterial *pM, bool appended, CFxBIMDatabaseReference *pDbRef)
virtual ~CFxBIMMaterialReactor()
bool IsSame(CFxBIMMaterialPtr p) const override
virtual ~CFxMaterialLayerSet()
void copyFrom(const OdRxObject *pSource) override
ODDB_DECLARE_MEMBERS(CFxMaterialLayerSet)
bool IsEqual(CFxBIMMaterialPtr p) const override
GLuint const GLchar * name
Definition: gles2_ext.h:265
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
MeasurementValue
Definition: OdaDefs.h:439
LineWeight
Definition: OdaDefs.h:384