CFx SDK Documentation  2022 SP0
FxBIMMaterial.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2020-2021 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 
21 #include <StringArray.h>
22 #include <DbMaterial.h>
23 
24 class CFxBIMMaterialImpl;
25 
26 class CFxBIMMaterial;
28 
30 {
31  friend class CFxBIMMaterialImpl;
32 public:
34 
35  virtual ~CFxBIMMaterial();
36 
37  virtual bool IsEqual( CFxBIMMaterialPtr p ) const;
38  virtual bool IsSame( CFxBIMMaterialPtr p ) const;
39 
40  virtual OdString Name() const;
41  virtual OdResult SetName( const OdString& name );
42 
43  virtual const OdString& MappedName() const;
44  virtual void SetMappedName( const OdString& mappedName );
45 
46  // HATCH
47 
49 
50  enum class PatternType
51  {
52  eHatch,
53  eCustom
54  };
55 
56  virtual PatternType CutPatternType() const;
58 
59  virtual const OdString& CutPatternName() const;
60  virtual void SetCutPatternName( const OdString& patternName );
61 
62  virtual double CutPatternScale() const;
63  virtual void SetCutPatternScale( double patternScale );
64 
65  virtual bool CutPatternScaleWithViewPort() const;
66  virtual void SetCutPatternScaleWithViewPort( bool ScaleWithViewport );
67 
68  virtual double CutPatternRotation() const;
69  virtual void SetCutPatternRotation( double angle );
70 
72  virtual void SetCutPatternRotationRelativeToElementBaseline( bool RotationRelativeToElementBaseline );
73 
75  virtual void SetCutPatternLineweight( OdDb::LineWeight lineweight );
76 
77  virtual OdCmColor CutPatternColor() const;
78  virtual void SetCutPatternColor( OdCmColor color );
79 
82 
83  virtual const OdString& SurfacePatternName() const;
84  virtual void SetSurfacePatternName( const OdString& patternName );
85 
86  virtual double SurfacePatternScale() const;
87  virtual void SetSurfacePatternScale( double patternScale );
88 
89  virtual bool SurfacePatternScaleWithViewPort() const;
90  virtual void SetSurfacePatternScaleWithViewPort( bool ScaleWithViewport );
91 
92  virtual double SurfacePatternRotation() const;
93  virtual void SetSurfacePatternRotation( double angle );
94 
96  virtual void SetSurfacePatternRotationRelativeToElementBaseline( bool RotationRelativeToElementBaseline );
97 
99  virtual void SetSurfacePatternLineweight( OdDb::LineWeight lineweight );
100 
102  virtual void SetSurfacePatternColor( OdCmColor color );
103 
104  // BOUNDARY
105 
106  virtual bool CutBoundaryUnify() const;
107  virtual void SetCutBoundaryUnify( bool unify );
108 
110  virtual void SetCutBoundaryLineweight( OdDb::LineWeight lineweight );
111 
112  virtual OdCmColor CutBoundaryColor() const;
113  virtual void SetCutBoundaryColor( OdCmColor color );
114 
115  virtual bool SurfaceBoundaryUnify() const;
116  virtual void SetSurfaceBoundaryUnify( bool unify );
117 
119  virtual void SetSurfaceBoundaryLineweight( OdDb::LineWeight lineweight );
120 
122  virtual void SetSurfaceBoundaryColor( OdCmColor color );
123 
124  // SHADING
125 
126  virtual OdCmColor CutColor() const;
127  virtual void SetCutColor( OdCmColor color );
128 
129  virtual double CutTransparency() const;
130  virtual void SetCutTransparency( double transparencyPercentage );
131 
132  virtual OdCmColor SurfaceColor() const;
133  virtual void SetSurfaceColor( OdCmColor color );
134 
135  virtual double SurfaceTransparency() const;
136  virtual void SetSurfaceTransparency( double transparencyPercentage );
137 
138 public:
139  OdResult dwgInFields( OdDbDwgFiler* pFiler ) override;
140  void dwgOutFields( OdDbDwgFiler* pFiler ) const override;
141 
142  OdResult dxfInFields( OdDbDxfFiler* pFiler ) override;
143  void dxfOutFields( OdDbDxfFiler* pFiler ) const override;
144 
145  void copyFrom( const OdRxObject* pSource ) override;
146 
147 protected:
149 };
150 
151 //-------------------------------------------------------------------------------------------------------------------------------------------------------------
152 
154 {
155 public:
157 
158  virtual void Appended( CFxBIMMaterial* pM, bool appended, CFxBIMDatabaseReference* pDbRef ) {};
159 };
#define FXBIM_API
Definition: FxBIM.h:20
OdSmartPtr< CFxBIMMaterial > CFxBIMMaterialPtr
Definition: FxBIMMaterial.h:26
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 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()
GLuint const GLchar * name
Definition: gles2_ext.h:265
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
MeasurementValue
Definition: OdaDefs.h:437
LineWeight
Definition: OdaDefs.h:382