CFx SDK Documentation  2020SP3
DbMaterial.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, 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 Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 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 
25 #ifndef __ODDBMATERIAL_H__
26 #define __ODDBMATERIAL_H__
27 
28 #include "TD_PackPush.h"
29 
30 #include "Gi/GiMaterial.h"
31 #include "DbObject.h"
32 
39 {
40 public:
42 
44 
53  virtual OdResult setName(
54  const OdString& name);
58  virtual OdString name() const;
59 
60 
69  virtual void setDescription(
70  const OdString& description);
74  virtual OdString description() const;
75 
76 
83  virtual void setAmbient(
84  const OdGiMaterialColor& ambientColor);
85 
92  virtual void ambient(
93  OdGiMaterialColor& ambientColor) const;
94 
101  virtual void setDiffuse(
102  const OdGiMaterialColor& diffuseColor,
103  const OdGiMaterialMap& diffuseMap);
104 
112  virtual void diffuse(
113  OdGiMaterialColor& diffuseColor,
114  OdGiMaterialMap& diffuseMap) const;
115 
116 
127  virtual void setSpecular(
128  const OdGiMaterialColor& specularColor,
129  const OdGiMaterialMap& specularMap,
130  double glossFactor);
131 
142  virtual void specular(
143  OdGiMaterialColor& specularColor,
144  OdGiMaterialMap& specularMap,
145  double& glossFactor) const;
146 
155  virtual void setReflection(const OdGiMaterialMap& reflectionMap);
156 
165  virtual void reflection(OdGiMaterialMap& reflectionMap) const;
166 
167 
174  virtual void setOpacity(
175  double opacityPercentage,
176  const OdGiMaterialMap& opacityMap);
177 
184  virtual void opacity(
185  double& opacityPercentage,
186  OdGiMaterialMap& opacityMap) const;
187 
193  virtual void setBump(const OdGiMaterialMap& bumpMap);
194 
200  virtual void bump(OdGiMaterialMap& map) const;
201 
208  virtual void setRefraction(
209  double refractionIndex,
210  const OdGiMaterialMap& refractionMap);
211 
218  virtual void refraction(
219  double& refractionIndex,
220  OdGiMaterialMap& refractionMap) const;
221 
223 
224  virtual void dwgOutFields(OdDbDwgFiler* pFiler) const;
225 
227 
228  virtual void dxfOutFields(OdDbDxfFiler* pFiler) const;
229 
230  virtual OdGiDrawable* drawable();
231 
233 
234 
235 /*-------------- New in AC21--------------------*/
236 
240  virtual double translucence() const;
241 
246  virtual void setTranslucence(double translucence);
247 
251  virtual double selfIllumination() const;
252 
257  virtual void setSelfIllumination(double selfIllumination);
258 
262  virtual double reflectivity() const;
263 
268  virtual void setReflectivity(double reflectivity);
269 
274 
279  virtual void setMode(OdGiMaterialTraits::Mode mode);
280 
293 
300 
306 
307  /*---- Advanced material properties in AC21 XRec ----*/
308 
312  virtual double colorBleedScale() const;
313 
318  virtual void setColorBleedScale(double scale);
319 
323  virtual double indirectBumpScale() const;
324 
329  virtual void setIndirectBumpScale(double scale);
330 
334  virtual double reflectanceScale() const;
335 
340  virtual void setReflectanceScale(double scale);
341 
345  virtual double transmittanceScale() const;
346 
351  virtual void setTransmittanceScale(double scale);
352 
356  virtual bool twoSided() const;
357 
362  virtual void setTwoSided(bool flag);
363 
368 
374 
378  virtual double luminance() const;
379 
384  virtual void setLuminance(double value);
385 
391  virtual double shininess() const;
392 
399  virtual void setShininess(double value);
400 
407  virtual void normalMap(OdGiMaterialMap &normalMap, OdGiMaterialTraits::NormalMapMethod &method, double &strength) const;
408 
416  virtual void setNormalMap(const OdGiMaterialMap &normalMap, OdGiMaterialTraits::NormalMapMethod method, double strength);
417 
421  virtual bool isAnonymous() const;
422 
427  virtual void setAnonymous(bool flag);
428 
433 
439 
444 
450 
451  virtual OdResult subGetClassID(void* pClsid) const;
452 
453  OdResult subErase( bool erasing );
454 };
459 
460 #include "TD_PackPop.h"
461 
462 #endif
OdDbMaterial::setSelfIllumination
virtual void setSelfIllumination(double selfIllumination)
OdDbMaterial::specular
virtual void specular(OdGiMaterialColor &specularColor, OdGiMaterialMap &specularMap, double &glossFactor) const
OdResult
OdResult
Definition: OdResult.h:29
OdDbMaterial::bump
virtual void bump(OdGiMaterialMap &map) const
OdString
Definition: OdString.h:95
OdDbMaterial::dxfOutFields
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdDbMaterial::setMode
virtual void setMode(OdGiMaterialTraits::Mode mode)
scale
scale
Definition: DimVarDefs.h:1684
OdDbMaterial::dxfInFields
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
name
GLuint const GLchar * name
Definition: gles2_ext.h:265
OdDbMaterial::OdDbMaterial
OdDbMaterial()
OdDbMaterial::refraction
virtual void refraction(double &refractionIndex, OdGiMaterialMap &refractionMap) const
DbObject.h
OdDbMaterial::opacity
virtual void opacity(double &opacityPercentage, OdGiMaterialMap &opacityMap) const
OdDbMaterial::setTranslucence
virtual void setTranslucence(double translucence)
OdDbMaterial::setFinalGather
virtual void setFinalGather(OdGiMaterialTraits::FinalGatherMode mode)
OdDbMaterial::reflectivity
virtual double reflectivity() const
OdDbMaterial::illuminationModel
virtual OdGiMaterialTraits::IlluminationModel illuminationModel() const
OdDbMaterial::setNormalMap
virtual void setNormalMap(const OdGiMaterialMap &normalMap, OdGiMaterialTraits::NormalMapMethod method, double strength)
OdDbMaterial::name
virtual OdString name() const
OdGiMaterialTraits::FinalGatherMode
FinalGatherMode
Definition: GiMaterial.h:133
OdDbMaterial::setReflectivity
virtual void setReflectivity(double reflectivity)
OdDbMaterial::normalMap
virtual void normalMap(OdGiMaterialMap &normalMap, OdGiMaterialTraits::NormalMapMethod &method, double &strength) const
OdDbMaterial::finalGather
virtual OdGiMaterialTraits::FinalGatherMode finalGather() const
OdDbMaterial::setReflection
virtual void setReflection(const OdGiMaterialMap &reflectionMap)
OdDbMaterialPtr
OdSmartPtr< OdDbMaterial > OdDbMaterialPtr
Definition: DbMaterial.h:458
OdDbMaterial::diffuse
virtual void diffuse(OdGiMaterialColor &diffuseColor, OdGiMaterialMap &diffuseMap) const
TD_PackPop.h
OdDbMaterial::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdDbMaterial::isAnonymous
virtual bool isAnonymous() const
OdDbMaterial::setName
virtual OdResult setName(const OdString &name)
OdDbMaterial::setReflectanceScale
virtual void setReflectanceScale(double scale)
OdDbMaterial::setIlluminationModel
virtual void setIlluminationModel(OdGiMaterialTraits::IlluminationModel illuminationMode)
OdDbMaterial::setLuminanceMode
virtual void setLuminanceMode(OdGiMaterialTraits::LuminanceMode mode)
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdDbMaterial::transmittanceScale
virtual double transmittanceScale() const
OdDbMaterial::channelFlags
virtual OdGiMaterialTraits::ChannelFlags channelFlags() const
OdDbMaterial::setRefraction
virtual void setRefraction(double refractionIndex, const OdGiMaterialMap &refractionMap)
OdGiMaterialTraits::IlluminationModel
IlluminationModel
Definition: GiMaterial.h:55
OdDbMaterial::setDescription
virtual void setDescription(const OdString &description)
OdDbMaterial::description
virtual OdString description() const
OdDbMaterial::twoSided
virtual bool twoSided() const
OdDbMaterial::luminance
virtual double luminance() const
OdDbMaterial::ambient
virtual void ambient(OdGiMaterialColor &ambientColor) const
OdSmartPtr
Definition: SmartPtr.h:58
OdDbMaterial::mode
virtual OdGiMaterialTraits::Mode mode() const
OdGiMaterialTraits::Mode
Mode
Definition: GiMaterial.h:86
OdDbMaterial::reflection
virtual void reflection(OdGiMaterialMap &reflectionMap) const
OdGiMaterialTraits::GlobalIlluminationMode
GlobalIlluminationMode
Definition: GiMaterial.h:122
GiMaterial.h
OdGiDrawable
Definition: GiDrawable.h:49
OdDbMaterial::setTransmittanceScale
virtual void setTransmittanceScale(double scale)
OdDbMaterial::setChannelFlags
virtual void setChannelFlags(OdGiMaterialTraits::ChannelFlags channelFlags)
OdDbMaterial::setTwoSided
virtual void setTwoSided(bool flag)
OdDbDxfFiler
Definition: DbFiler.h:194
OdDbMaterial::setColorBleedScale
virtual void setColorBleedScale(double scale)
OdDbMaterial::drawable
virtual OdGiDrawable * drawable()
OdDbMaterial::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbMaterial)
TD_PackPush.h
OdDbMaterial::setOpacity
virtual void setOpacity(double opacityPercentage, const OdGiMaterialMap &opacityMap)
OdDbMaterial::subSetAttributes
virtual OdUInt32 subSetAttributes(OdGiDrawableTraits *pTraits) const
OdDbMaterial::subErase
OdResult subErase(bool erasing)
OdGiMaterialTraits::ChannelFlags
ChannelFlags
Definition: GiMaterial.h:64
OdDbMaterial::setShininess
virtual void setShininess(double value)
OdDbMaterial::setAnonymous
virtual void setAnonymous(bool flag)
OdDbMaterial::setIndirectBumpScale
virtual void setIndirectBumpScale(double scale)
OdDbMaterial::translucence
virtual double translucence() const
OdGiMaterialColor
Definition: GiMaterial.h:599
OdDbMaterial::setBump
virtual void setBump(const OdGiMaterialMap &bumpMap)
OdGiDrawableTraits
Definition: Gi.h:71
OdDbMaterial::reflectanceScale
virtual double reflectanceScale() const
OdDbMaterial::selfIllumination
virtual double selfIllumination() const
OdDbMaterial::setSpecular
virtual void setSpecular(const OdGiMaterialColor &specularColor, const OdGiMaterialMap &specularMap, double glossFactor)
OdDbMaterial::setAmbient
virtual void setAmbient(const OdGiMaterialColor &ambientColor)
OdDbMaterial::subGetClassID
virtual OdResult subGetClassID(void *pClsid) const
value
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
OdDbMaterial::setDiffuse
virtual void setDiffuse(const OdGiMaterialColor &diffuseColor, const OdGiMaterialMap &diffuseMap)
OdDbMaterial::shininess
virtual double shininess() const
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdDbMaterial::setGlobalIllumination
virtual void setGlobalIllumination(OdGiMaterialTraits::GlobalIlluminationMode mode)
OdDbMaterial::indirectBumpScale
virtual double indirectBumpScale() const
OdDbMaterial::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdDbMaterial::luminanceMode
virtual OdGiMaterialTraits::LuminanceMode luminanceMode() const
OdGiMaterialTraits::LuminanceMode
LuminanceMode
Definition: GiMaterial.h:104
OdGiMaterialTraits::NormalMapMethod
NormalMapMethod
Definition: GiMaterial.h:114
OdDbMaterial::colorBleedScale
virtual double colorBleedScale() const
OdDbMaterial::globalIllumination
virtual OdGiMaterialTraits::GlobalIlluminationMode globalIllumination() const
OdDbMaterial
Definition: DbMaterial.h:39
OdDbObject
Definition: DbObject.h:211
OdDbDwgFiler
Definition: DbFiler.h:1031
OdDbMaterial::setLuminance
virtual void setLuminance(double value)
OdGiMaterialMap
Definition: GiMaterial.h:1362