CFx SDK Documentation  2022 SP0
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
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdDbMaterial > OdDbMaterialPtr
Definition: DbMaterial.h:458
scale
Definition: DimVarDefs.h:1684
unsigned int OdUInt32
OdResult
Definition: OdResult.h:29
virtual double translucence() const
virtual OdGiMaterialTraits::LuminanceMode luminanceMode() const
virtual void setTransmittanceScale(double scale)
virtual OdResult setName(const OdString &name)
virtual void setSpecular(const OdGiMaterialColor &specularColor, const OdGiMaterialMap &specularMap, double glossFactor)
virtual OdGiMaterialTraits::Mode mode() const
virtual void reflection(OdGiMaterialMap &reflectionMap) const
virtual double shininess() const
virtual void setOpacity(double opacityPercentage, const OdGiMaterialMap &opacityMap)
virtual void setRefraction(double refractionIndex, const OdGiMaterialMap &refractionMap)
virtual void bump(OdGiMaterialMap &map) const
virtual void ambient(OdGiMaterialColor &ambientColor) const
virtual OdGiMaterialTraits::IlluminationModel illuminationModel() const
virtual void setDiffuse(const OdGiMaterialColor &diffuseColor, const OdGiMaterialMap &diffuseMap)
virtual void specular(OdGiMaterialColor &specularColor, OdGiMaterialMap &specularMap, double &glossFactor) const
virtual void setShininess(double value)
ODDB_DECLARE_MEMBERS(OdDbMaterial)
virtual bool twoSided() const
virtual double selfIllumination() const
virtual void setChannelFlags(OdGiMaterialTraits::ChannelFlags channelFlags)
OdResult subErase(bool erasing)
virtual void setAmbient(const OdGiMaterialColor &ambientColor)
virtual void setReflectivity(double reflectivity)
virtual double reflectanceScale() const
virtual void setNormalMap(const OdGiMaterialMap &normalMap, OdGiMaterialTraits::NormalMapMethod method, double strength)
virtual double luminance() const
virtual void setTwoSided(bool flag)
virtual void setMode(OdGiMaterialTraits::Mode mode)
virtual OdUInt32 subSetAttributes(OdGiDrawableTraits *pTraits) const
virtual void setIlluminationModel(OdGiMaterialTraits::IlluminationModel illuminationMode)
virtual void setDescription(const OdString &description)
virtual void setTranslucence(double translucence)
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
virtual void setReflectanceScale(double scale)
virtual bool isAnonymous() const
virtual OdResult subGetClassID(void *pClsid) const
virtual void refraction(double &refractionIndex, OdGiMaterialMap &refractionMap) const
virtual void normalMap(OdGiMaterialMap &normalMap, OdGiMaterialTraits::NormalMapMethod &method, double &strength) const
virtual void setLuminance(double value)
virtual OdGiDrawable * drawable()
virtual void setSelfIllumination(double selfIllumination)
virtual OdString description() const
virtual void setIndirectBumpScale(double scale)
virtual void opacity(double &opacityPercentage, OdGiMaterialMap &opacityMap) const
virtual OdGiMaterialTraits::ChannelFlags channelFlags() const
virtual void setFinalGather(OdGiMaterialTraits::FinalGatherMode mode)
virtual OdGiMaterialTraits::FinalGatherMode finalGather() const
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
virtual void setColorBleedScale(double scale)
virtual void setAnonymous(bool flag)
virtual double reflectivity() const
virtual void setReflection(const OdGiMaterialMap &reflectionMap)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
virtual void setGlobalIllumination(OdGiMaterialTraits::GlobalIlluminationMode mode)
virtual double transmittanceScale() const
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
virtual OdString name() const
virtual void setBump(const OdGiMaterialMap &bumpMap)
virtual void diffuse(OdGiMaterialColor &diffuseColor, OdGiMaterialMap &diffuseMap) const
virtual double indirectBumpScale() const
virtual double colorBleedScale() const
virtual OdGiMaterialTraits::GlobalIlluminationMode globalIllumination() const
virtual void setLuminanceMode(OdGiMaterialTraits::LuminanceMode mode)
GLuint const GLchar * name
Definition: gles2_ext.h:265
GLsizei const GLfloat * value
Definition: gles2_ext.h:302