CFx SDK Documentation  2022 SP0
GiMaterialTraitsData.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 #ifndef _ODGIMATERIALTRAITSDATA_INCLUDED_
25 #define _ODGIMATERIALTRAITSDATA_INCLUDED_
26 
27 #include "Gi/GiMaterial.h"
28 
29 class OdDbStub;
30 
31 #include "TD_PackPush.h"
32 
38 {
39 protected:
45  double m_glossFactor;
47  double m_opacity;
58  // Extended material properties
59  double m_bleedScale;
63  bool m_twoSided;
65  double m_lumiVal;
71  // BIM extensions
80 
81 public:
83  : m_ambientColor()
84  , m_diffuseColor()
85  , m_diffuseMap()
86  , m_specularColor()
87  , m_specularMap()
88  , m_glossFactor(0.0)
89  , m_reflectionMap()
90  , m_opacity(1.0)
91  , m_opacityMap()
92  , m_bumpMap()
93  , m_refractionIndex(0.0)
94  , m_refractionMap()
95  , m_translucenceVal(0.0)
96  , m_selfIllumVal(0.0)
97  , m_reflectivityVal(0.0)
98  , m_illumModel(OdGiMaterialTraits::kBlinnShader)
99  , m_channelFlags(OdGiMaterialTraits::kUseDiffuse)
100  , m_mode(OdGiMaterialTraits::kRealistic)
101  // Extended material properties
102  , m_bleedScale(100.0)
103  , m_indirectBumpScale(100.0)
104  , m_reflectScale(100.0)
105  , m_transmitScale(100.0)
106  , m_twoSided(true)
107  , m_lumiMode(OdGiMaterialTraits::kSelfIllumination)
108  , m_lumiVal(0.0)
109  , m_normalMap()
110  , m_normalMethod(OdGiMaterialTraits::kTangentSpace)
111  , m_normalStrength(1.0)
112  , m_globIllum(OdGiMaterialTraits::kGlobalIlluminationCastAndReceive)
113  , m_fgMode(OdGiMaterialTraits::kFinalGatherCastAndReceive)
114  // BIM extensions
115  , m_emissionColor(OdCmEntityColor(0, 0, 0))
116  , m_emissionMap()
117  , m_tintColor(OdCmEntityColor(255, 255, 255))
121  , m_shadingOpacity(1.0)
122  , m_diffuseColorMode(OdGiMaterialTraits::kDiffuseRealisticColor)
123  {
124  }
126  {
129  m_diffuseMap = other.m_diffuseMap;
134  m_opacity = other.m_opacity;
135  m_opacityMap = other.m_opacityMap;
136  m_bumpMap = other.m_bumpMap;
142  m_illumModel = other.m_illumModel;
144  m_mode = other.m_mode;
145  // Extended material properties
146  m_bleedScale = other.m_bleedScale;
150  m_twoSided = other.m_twoSided;
151  m_lumiMode = other.m_lumiMode;
152  m_lumiVal = other.m_lumiVal;
153  m_normalMap = other.m_normalMap;
156  m_globIllum = other.m_globIllum;
157  m_fgMode = other.m_fgMode;
158  // BIM extensions
161  m_tintColor = other.m_tintColor;
167  }
168  bool operator ==(const OdGiMaterialTraitsData& other) const
169  {
170  if (m_ambientColor != other.m_ambientColor) return false;
171  if (m_diffuseColor != other.m_diffuseColor) return false;
172  if (m_diffuseMap != other.m_diffuseMap) return false;
173  if (m_specularColor != other.m_specularColor) return false;
174  if (m_specularMap != other.m_specularMap) return false;
175  if (m_glossFactor != other.m_glossFactor) return false;
176  if (m_reflectionMap != other.m_reflectionMap) return false;
177  if (m_opacity != other.m_opacity) return false;
178  if (m_opacityMap != other.m_opacityMap) return false;
179  if (m_bumpMap != other.m_bumpMap) return false;
180  if (m_refractionIndex != other.m_refractionIndex) return false;
181  if (m_refractionMap != other.m_refractionMap) return false;
182  if (m_translucenceVal != other.m_translucenceVal) return false;
183  if (m_selfIllumVal != other.m_selfIllumVal) return false;
184  if (m_reflectivityVal != other.m_reflectivityVal) return false;
185  if (m_illumModel != other.m_illumModel) return false;
186  if (m_channelFlags != other.m_channelFlags) return false;
187  if (m_mode != other.m_mode) return false;
188  // Extended material properties
189  if (m_bleedScale != other.m_bleedScale) return false;
190  if (m_indirectBumpScale != other.m_indirectBumpScale) return false;
191  if (m_reflectScale != other.m_reflectScale) return false;
192  if (m_transmitScale != other.m_transmitScale) return false;
193  if (m_twoSided != other.m_twoSided) return false;
194  if (m_lumiMode != other.m_lumiMode) return false;
195  if (m_lumiVal != other.m_lumiVal) return false;
196  if (m_normalMap != other.m_normalMap) return false;
197  if (m_normalMethod != other.m_normalMethod) return false;
198  if (m_normalStrength != other.m_normalStrength) return false;
199  if (m_globIllum != other.m_globIllum) return false;
200  if (m_fgMode != other.m_fgMode) return false;
201  // BIM extensions
202  if (m_emissionColor != other.m_emissionColor) return false;
203  if (m_emissionMap != other.m_emissionMap) return false;
204  if (m_tintColor != other.m_tintColor) return false;
205  if (m_shadingAmbientColor != other.m_shadingAmbientColor) return false;
206  if (m_shadingDiffuseColor != other.m_shadingDiffuseColor) return false;
207  if (m_shadingSpeclrColor != other.m_shadingSpeclrColor) return false;
208  if (m_shadingOpacity != other.m_shadingOpacity) return false;
209  if (m_diffuseColorMode != other.m_diffuseColorMode) return false;
210  return true;
211  }
212  bool operator !=(const OdGiMaterialTraitsData& other) const
213  {
214  if (m_ambientColor != other.m_ambientColor) return true;
215  if (m_diffuseColor != other.m_diffuseColor) return true;
216  if (m_diffuseMap != other.m_diffuseMap) return true;
217  if (m_specularColor != other.m_specularColor) return true;
218  if (m_specularMap != other.m_specularMap) return true;
219  if (m_glossFactor != other.m_glossFactor) return true;
220  if (m_reflectionMap != other.m_reflectionMap) return true;
221  if (m_opacity != other.m_opacity) return true;
222  if (m_opacityMap != other.m_opacityMap) return true;
223  if (m_bumpMap != other.m_bumpMap) return true;
224  if (m_refractionIndex != other.m_refractionIndex) return true;
225  if (m_refractionMap != other.m_refractionMap) return true;
226  if (m_translucenceVal != other.m_translucenceVal) return true;
227  if (m_selfIllumVal != other.m_selfIllumVal) return true;
228  if (m_reflectivityVal != other.m_reflectivityVal) return true;
229  if (m_illumModel != other.m_illumModel) return true;
230  if (m_channelFlags != other.m_channelFlags) return true;
231  if (m_mode != other.m_mode) return true;
232  // Extended material properties
233  if (m_bleedScale != other.m_bleedScale) return true;
234  if (m_indirectBumpScale != other.m_indirectBumpScale) return true;
235  if (m_reflectScale != other.m_reflectScale) return true;
236  if (m_transmitScale != other.m_transmitScale) return true;
237  if (m_twoSided != other.m_twoSided) return true;
238  if (m_lumiMode != other.m_lumiMode) return true;
239  if (m_lumiVal != other.m_lumiVal) return true;
240  if (m_normalMap != other.m_normalMap) return true;
241  if (m_normalMethod != other.m_normalMethod) return true;
242  if (m_normalStrength != other.m_normalStrength) return true;
243  if (m_globIllum != other.m_globIllum) return true;
244  if (m_fgMode != other.m_fgMode) return true;
245  // BIM extensions
246  if (m_emissionColor != other.m_emissionColor) return true;
247  if (m_emissionMap != other.m_emissionMap) return true;
248  if (m_tintColor != other.m_tintColor) return true;
249  if (m_shadingAmbientColor != other.m_shadingAmbientColor) return true;
250  if (m_shadingDiffuseColor != other.m_shadingDiffuseColor) return true;
251  if (m_shadingSpeclrColor != other.m_shadingSpeclrColor) return true;
252  if (m_shadingOpacity != other.m_shadingOpacity) return true;
253  if (m_diffuseColorMode != other.m_diffuseColorMode) return true;
254  return false;
255  }
256 
257  void ambient(OdGiMaterialColor& ambientColor) const
258  {
259  ambientColor = m_ambientColor;
260  }
261  void diffuse(OdGiMaterialColor& diffuseColor, OdGiMaterialMap& diffuseMap) const
262  {
263  diffuseColor = m_diffuseColor;
264  diffuseMap = m_diffuseMap;
265  }
266  void specular(OdGiMaterialColor& specularColor, OdGiMaterialMap& specularMap, double& glossFactor) const
267  {
268  specularColor = m_specularColor;
269  specularMap = m_specularMap;
270  glossFactor = m_glossFactor;
271  }
272  void reflection(OdGiMaterialMap& reflectionMap) const
273  {
274  reflectionMap = m_reflectionMap;
275  }
276  void opacity(double& opacity, OdGiMaterialMap& opacityMap) const
277  {
278  opacity = m_opacity;
279  opacityMap = m_opacityMap;
280  }
281  void bump(OdGiMaterialMap& bumpMap) const
282  {
283  bumpMap = m_bumpMap;
284  }
285  void refraction(double& refractionIndex, OdGiMaterialMap& refractionMap) const
286  {
287  refractionIndex = m_refractionIndex;
288  refractionMap = m_refractionMap;
289  }
290  double translucence() const
291  {
292  return m_translucenceVal;
293  }
294  double selfIllumination() const
295  {
296  return m_selfIllumVal;
297  }
298  double reflectivity() const
299  {
300  return m_reflectivityVal;
301  }
303  {
304  return m_illumModel;
305  }
307  {
308  return m_channelFlags;
309  }
311  {
312  return m_mode;
313  }
314 
315  void setAmbient(const OdGiMaterialColor& ambientColor)
316  {
317  m_ambientColor = ambientColor;
318  }
319  void setDiffuse(const OdGiMaterialColor& diffuseColor, const OdGiMaterialMap& diffuseMap)
320  {
321  m_diffuseColor = diffuseColor;
322  m_diffuseMap = diffuseMap;
323  }
324  void setSpecular(const OdGiMaterialColor& specularColor, const OdGiMaterialMap& specularMap, double glossFactor)
325  {
326  m_specularColor = specularColor;
327  m_specularMap = specularMap;
328  m_glossFactor = glossFactor;
329  }
330  void setReflection(const OdGiMaterialMap& reflectionMap)
331  {
332  m_reflectionMap = reflectionMap;
333  }
334  void setOpacity(double opacity, const OdGiMaterialMap& opacityMap)
335  {
336  m_opacity = opacity;
337  m_opacityMap = opacityMap;
338  }
339  void setBump(const OdGiMaterialMap& bumpMap)
340  {
341  m_bumpMap = bumpMap;
342  }
343  void setRefraction(double refractionIndex, const OdGiMaterialMap& refractionMap)
344  {
345  m_refractionIndex = refractionIndex;
346  m_refractionMap = refractionMap;
347  }
348  void setTranslucence(double value)
349  {
351  }
353  {
355  }
356  void setReflectivity(double value)
357  {
359  }
361  {
362  m_illumModel = model;
363  }
365  {
366  m_channelFlags = flags;
367  }
369  {
370  m_mode = value;
371  }
372 
373  // Extended material properties
374 
376  {
378  }
379  double colorBleedScale() const
380  {
381  return m_bleedScale;
382  }
383 
385  {
387  }
388  double indirectBumpScale() const
389  {
390  return m_indirectBumpScale;
391  }
392 
394  {
396  }
397  double reflectanceScale() const
398  {
399  return m_reflectScale;
400  }
401 
403  {
405  }
406  double transmittanceScale() const
407  {
408  return m_transmitScale;
409  }
410 
411  void setTwoSided(bool flag)
412  {
413  m_twoSided = flag;
414  }
415  bool twoSided() const
416  {
417  return m_twoSided;
418  }
419 
421  {
422  m_lumiMode = mode;
423  }
425  {
426  return m_lumiMode;
427  }
428 
429  void setLuminance(double value)
430  {
431  m_lumiVal = value;
432  }
433  double luminance() const
434  {
435  return m_lumiVal;
436  }
437 
439  {
441  m_normalMethod = method;
442  m_normalStrength = strength;
443  }
445  {
447  method = m_normalMethod;
448  strength = m_normalStrength;
449  }
450 
452  {
453  m_globIllum = mode;
454  }
456  {
457  return m_globIllum;
458  }
459 
461  {
462  m_fgMode = mode;
463  }
465  {
466  return m_fgMode;
467  }
468 
469  // BIM extensions
470 
471  void setEmission(const OdGiMaterialColor& emissionColor, const OdGiMaterialMap& emissionMap)
472  {
473  m_emissionColor = emissionColor;
474  m_emissionMap = emissionMap;
475  }
476  void emission(OdGiMaterialColor& emissionColor, OdGiMaterialMap& emissionMap) const
477  {
478  emissionMap = m_emissionMap;
479  emissionColor = m_emissionColor;
480  }
481 
482  void setTint(const OdGiMaterialColor& tintColor)
483  {
484  m_tintColor = tintColor;
485  }
486  void tint(OdGiMaterialColor& tintColor) const
487  {
488  tintColor = m_tintColor;
489  }
490 
491  void setShadingAmbient(const OdGiMaterialColor& ambientColor)
492  {
493  m_shadingAmbientColor = ambientColor;
494  }
495  void shadingAmbient(OdGiMaterialColor& ambientColor) const
496  {
497  ambientColor = m_shadingAmbientColor;
498  }
499 
500  void setShadingDiffuse(const OdGiMaterialColor& diffuseColor)
501  {
502  m_shadingDiffuseColor = diffuseColor;
503  }
504  void shadingDiffuse(OdGiMaterialColor& diffuseColor) const
505  {
506  diffuseColor = m_shadingDiffuseColor;
507  }
508 
509  void setShadingSpecular(const OdGiMaterialColor& specularColor)
510  {
511  m_shadingSpeclrColor = specularColor;
512  }
513  void shadingSpecular(OdGiMaterialColor& specularColor) const
514  {
515  specularColor = m_shadingSpeclrColor;
516  }
517 
518  void setShadingOpacity(double opacityPercentage)
519  {
520  m_shadingOpacity = opacityPercentage;
521  }
522  void shadingOpacity(double &opacityPercentage) const
523  {
524  opacityPercentage = m_shadingOpacity;
525  }
526 
528  {
530  }
532  {
533  return m_diffuseColorMode;
534  }
535 };
536 
545 {
546 protected:
548 public:
549  //ODRX_DECLARE_MEMBERS(OdGiMaterialTraitsTaker);
551 
552  void addRef() { }
553  void release() { }
554 
555  virtual void ambient(OdGiMaterialColor& ambientColor) const
556  {
557  m_data.ambient(ambientColor);
558  }
559  virtual void diffuse(OdGiMaterialColor& diffuseColor, OdGiMaterialMap& diffuseMap) const
560  {
561  m_data.diffuse(diffuseColor, diffuseMap);
562  }
563  virtual void specular(OdGiMaterialColor& specularColor, OdGiMaterialMap& specularMap, double& glossFactor) const
564  {
565  m_data.specular(specularColor, specularMap, glossFactor);
566  }
567  virtual void reflection(OdGiMaterialMap& reflectionMap) const
568  {
569  m_data.reflection(reflectionMap);
570  }
571  virtual void opacity(double& opacityPercentage, OdGiMaterialMap& opacityMap) const
572  {
573  m_data.opacity(opacityPercentage, opacityMap);
574  }
575  virtual void bump(OdGiMaterialMap& bumpMap) const
576  {
577  m_data.bump(bumpMap);
578  }
579  virtual void refraction(double& refractionIndex, OdGiMaterialMap& refractionMap) const
580  {
581  m_data.refraction(refractionIndex, refractionMap);
582  }
583  virtual double translucence() const
584  {
585  return m_data.translucence();
586  }
587  virtual double selfIllumination() const
588  {
589  return m_data.selfIllumination();
590  }
591  virtual double reflectivity() const
592  {
593  return m_data.reflectivity();
594  }
596  {
597  return m_data.illuminationModel();
598  }
599  virtual ChannelFlags channelFlags() const
600  {
601  return m_data.channelFlags();
602  }
603  virtual Mode mode() const
604  {
605  return m_data.mode();
606  }
607 
608  virtual void setAmbient(const OdGiMaterialColor& ambientColor)
609  {
610  m_data.setAmbient(ambientColor);
611  }
612  virtual void setDiffuse(const OdGiMaterialColor& diffuseColor, const OdGiMaterialMap& diffuseMap)
613  {
614  m_data.setDiffuse(diffuseColor, diffuseMap);
615  }
616  virtual void setSpecular(const OdGiMaterialColor& specularColor, const OdGiMaterialMap& specularMap, double glossFactor)
617  {
618  m_data.setSpecular(specularColor, specularMap, glossFactor);
619  }
620  virtual void setReflection(const OdGiMaterialMap& reflectionMap)
621  {
622  m_data.setReflection(reflectionMap);
623  }
624  virtual void setOpacity(double opacityPercentage, const OdGiMaterialMap& opacityMap)
625  {
626  m_data.setOpacity(opacityPercentage, opacityMap);
627  }
628  virtual void setBump(const OdGiMaterialMap& bumpMap)
629  {
630  m_data.setBump(bumpMap);
631  }
632  virtual void setRefraction(double refractionIndex, const OdGiMaterialMap& refractionMap)
633  {
634  m_data.setRefraction(refractionIndex, refractionMap);
635  }
636  virtual void setTranslucence(double value)
637  {
638  m_data.setTranslucence(value);
639  }
640  virtual void setSelfIllumination(double value)
641  {
642  m_data.setSelfIllumination(value);
643  }
644  virtual void setReflectivity(double value)
645  {
646  m_data.setReflectivity(value);
647  }
649  {
650  m_data.setIlluminationModel(model);
651  }
652  virtual void setChannelFlags(ChannelFlags flags)
653  {
654  m_data.setChannelFlags(flags);
655  }
656  virtual void setMode(Mode value)
657  {
658  m_data.setMode(value);
659  }
660 
661  virtual void setColorBleedScale(double scale)
662  {
663  m_data.setColorBleedScale(scale);
664  }
665  virtual double colorBleedScale() const
666  {
667  return m_data.colorBleedScale();
668  }
669 
670  virtual void setIndirectBumpScale(double scale)
671  {
672  m_data.setIndirectBumpScale(scale);
673  }
674  virtual double indirectBumpScale() const
675  {
676  return m_data.indirectBumpScale();
677  }
678 
679  virtual void setReflectanceScale(double scale)
680  {
681  m_data.setReflectanceScale(scale);
682  }
683  virtual double reflectanceScale() const
684  {
685  return m_data.reflectanceScale();
686  }
687 
688  virtual void setTransmittanceScale(double scale)
689  {
691  }
692  virtual double transmittanceScale() const
693  {
694  return m_data.transmittanceScale();
695  }
696 
697  virtual void setTwoSided(bool flag)
698  {
699  m_data.setTwoSided(flag);
700  }
701  virtual bool twoSided() const
702  {
703  return m_data.twoSided();
704  }
705 
706  virtual void setLuminanceMode(LuminanceMode mode)
707  {
708  m_data.setLuminanceMode(mode);
709  }
710  virtual LuminanceMode luminanceMode() const
711  {
712  return m_data.luminanceMode();
713  }
714 
715  virtual void setLuminance(double value)
716  {
717  m_data.setLuminance(value);
718  }
719  virtual double luminance() const
720  {
721  return m_data.luminance();
722  }
723 
724  virtual void setNormalMap(const OdGiMaterialMap &normalMap, NormalMapMethod method, double strength)
725  {
726  m_data.setNormalMap(normalMap, method, strength);
727  }
728  virtual void normalMap(OdGiMaterialMap &normalMap, NormalMapMethod &method, double &strength) const
729  {
730  m_data.normalMap(normalMap, method, strength);
731  }
732 
734  {
735  m_data.setGlobalIllumination(mode);
736  }
738  {
739  return m_data.globalIllumination();
740  }
741 
742  virtual void setFinalGather(FinalGatherMode mode)
743  {
744  m_data.setFinalGather(mode);
745  }
746  virtual FinalGatherMode finalGather() const
747  {
748  return m_data.finalGather();
749  }
750 
751  virtual void setEmission(const OdGiMaterialColor& emissionColor, const OdGiMaterialMap& emissionMap)
752  {
753  m_data.setEmission(emissionColor, emissionMap);
754  }
755  virtual void emission(OdGiMaterialColor& emissionColor, OdGiMaterialMap& emissionMap) const
756  {
757  m_data.emission(emissionColor, emissionMap);
758  }
759 
760  virtual void setTint(const OdGiMaterialColor& tintColor)
761  {
762  m_data.setTint(tintColor);
763  }
764  virtual void tint(OdGiMaterialColor& tintColor) const
765  {
766  m_data.tint(tintColor);
767  }
768 
769  virtual void setShadingAmbient(const OdGiMaterialColor& ambientColor)
770  {
771  m_data.setShadingAmbient(ambientColor);
772  }
773  virtual void shadingAmbient(OdGiMaterialColor& ambientColor) const
774  {
775  m_data.shadingAmbient(ambientColor);
776  }
777 
778  virtual void setShadingDiffuse(const OdGiMaterialColor& diffuseColor)
779  {
780  m_data.setShadingDiffuse(diffuseColor);
781  }
782  virtual void shadingDiffuse(OdGiMaterialColor& diffuseColor) const
783  {
784  m_data.shadingDiffuse(diffuseColor);
785  }
786 
787  virtual void setShadingSpecular(const OdGiMaterialColor& specularColor)
788  {
789  m_data.setShadingSpecular(specularColor);
790  }
791  virtual void shadingSpecular(OdGiMaterialColor& specularColor) const
792  {
793  m_data.shadingSpecular(specularColor);
794  }
795 
796  virtual void setShadingOpacity(double opacityPercentage)
797  {
798  m_data.setShadingOpacity(opacityPercentage);
799  }
800  virtual void shadingOpacity(double &opacityPercentage) const
801  {
802  m_data.shadingOpacity(opacityPercentage);
803  }
804 
805  virtual void setDiffuseColorMode(DiffuseColorMode diffuseColorMode)
806  {
807  m_data.setDiffuseColorMode(diffuseColorMode);
808  }
810  {
811  return m_data.diffuseColorMode();
812  }
813 
814  void getData(OdGiMaterialTraitsData& data) const { data = m_data; }
815  const OdGiMaterialTraitsData &getData() const { return m_data; }
816 
817  void setData(const OdGiMaterialTraitsData& data) { m_data = data; }
818 };
819 
821 
830 {
831 public:
833 
835 
836  void addRef() { }
837  void release() { }
838 
839  void ambient(OdGiMaterialColor& /*ambientColor*/) const { }
840  void diffuse(OdGiMaterialColor& /*diffuseColor*/, OdGiMaterialMap& /*diffuseMap*/) const { }
841  void specular(OdGiMaterialColor& /*specularColor*/, OdGiMaterialMap& /*specularMap*/, double& /*glossFactor*/) const { }
842  void reflection(OdGiMaterialMap& /*reflectionMap*/) const { }
843  void opacity(double& /*opacityPercentage*/, OdGiMaterialMap& /*opacityMap*/) const { }
844  void bump(OdGiMaterialMap& /*bumpMap*/) const { }
845  void refraction(double& /*refractionIndex*/, OdGiMaterialMap& /*refractionMap*/) const { }
846  double translucence() const { return 0.0; }
847  double selfIllumination() const { return 0.0; }
848  double reflectivity() const { return 0.0; }
850  ChannelFlags channelFlags() const { return kUseAll; }
851  Mode mode() const { return kRealistic; }
852 
853  void setAmbient(const OdGiMaterialColor& /*ambientColor*/) { }
854  void setDiffuse(const OdGiMaterialColor& /*diffuseColor*/, const OdGiMaterialMap& /*diffuseMap*/) { }
855  void setSpecular(const OdGiMaterialColor& /*specularColor*/, const OdGiMaterialMap& /*specularMap*/, double /*glossFactor*/) { }
856  void setReflection(const OdGiMaterialMap& /*reflectionMap*/) { }
857  void setOpacity(double /*opacityPercentage*/, const OdGiMaterialMap& /*opacityMap*/) { }
858  void setBump(const OdGiMaterialMap& /*bumpMap*/) { }
859  void setRefraction(double /*refractionIndex*/, const OdGiMaterialMap& /*refractionMap*/) { }
860  void setTranslucence(double /*value*/) { }
861  void setSelfIllumination(double /*value*/) { }
862  void setReflectivity(double /*value*/) { }
864  void setChannelFlags(ChannelFlags /*flags*/) { }
865  void setMode(Mode /*value*/) { }
866 
867  void setColorBleedScale(double /*scale*/) { }
868  double colorBleedScale() const { return 0.0; }
869 
870  void setIndirectBumpScale(double /*scale*/) { }
871  double indirectBumpScale() const { return 0.0; }
872 
873  void setReflectanceScale(double /*scale*/) { }
874  double reflectanceScale() const { return 0.0; }
875 
876  void setTransmittanceScale(double /*scale*/) { }
877  double transmittanceScale() const { return 0.0; }
878 
879  void setTwoSided(bool /*flag*/) { }
880  bool twoSided() const { return true; }
881 
882  void setLuminanceMode(LuminanceMode /*mode*/) { }
884 
885  void setLuminance(double /*value*/) { }
886  double luminance() const { return 0.0; }
887 
888  void setNormalMap(const OdGiMaterialMap &/*normalMap*/, NormalMapMethod /*method*/, double /*strength*/) { }
889  void normalMap(OdGiMaterialMap &/*normalMap*/, NormalMapMethod &/*method*/, double &/*strength*/) const { }
890 
893 
894  void setFinalGather(FinalGatherMode /*mode*/) { }
896 
897  void setEmission(const OdGiMaterialColor& /*emissionColor*/, const OdGiMaterialMap& /*emissionMap*/) { }
898  void emission(OdGiMaterialColor& /*emissionColor*/, OdGiMaterialMap& /*emissionMap*/) const { }
899 
900  void setTint(const OdGiMaterialColor& /*tintColor*/) { }
901  void tint(OdGiMaterialColor& /*tintColor*/) const { }
902 
903  void setShadingAmbient(const OdGiMaterialColor& /*ambientColor*/) { }
904  void shadingAmbient(OdGiMaterialColor& /*ambientColor*/) const { }
905 
906  void setShadingDiffuse(const OdGiMaterialColor& /*diffuseColor*/) { }
907  void shadingDiffuse(OdGiMaterialColor& /*diffuseColor*/) const { }
908 
909  void setShadingSpecular(const OdGiMaterialColor& /*specularColor*/) { }
910  void shadingSpecular(OdGiMaterialColor& /*specularColor*/) const { }
911 
912  void setShadingOpacity(double /*opacityPercentage*/) { }
913  void shadingOpacity(double& /*opacityPercentage*/) const { }
914 
915  void setDiffuseColorMode(DiffuseColorMode /*diffuseColorMode*/) { }
917 };
918 
920 
921 #include "TD_PackPop.h"
922 
923 #endif // #ifndef _ODGIMATERIALTRAITSDATA_INCLUDED_
true
Definition: DimVarDefs.h:2046
scale
Definition: DimVarDefs.h:1684
#define ODGI_EXPORT
Definition: GiExport.h:35
OdSmartPtr< OdGiMaterialTraitsTaker > OdGiMaterialTraitsTakerPtr
OdSmartPtr< OdGiMaterialTraits_Stub > OdGiMaterialTraits_StubPtr
void refraction(double &, OdGiMaterialMap &) const
void setChannelFlags(ChannelFlags)
void setBump(const OdGiMaterialMap &)
void specular(OdGiMaterialColor &, OdGiMaterialMap &, double &) const
void setShadingSpecular(const OdGiMaterialColor &)
void shadingDiffuse(OdGiMaterialColor &) const
void emission(OdGiMaterialColor &, OdGiMaterialMap &) const
void shadingAmbient(OdGiMaterialColor &) const
void setLuminanceMode(LuminanceMode)
void setSpecular(const OdGiMaterialColor &, const OdGiMaterialMap &, double)
void setDiffuse(const OdGiMaterialColor &, const OdGiMaterialMap &)
ODRX_USING_HEAP_OPERATORS(OdGiMaterialTraits)
void shadingOpacity(double &) const
void opacity(double &, OdGiMaterialMap &) const
void setOpacity(double, const OdGiMaterialMap &)
void reflection(OdGiMaterialMap &) const
void setShadingAmbient(const OdGiMaterialColor &)
IlluminationModel illuminationModel() const
void bump(OdGiMaterialMap &) const
void setDiffuseColorMode(DiffuseColorMode)
void setRefraction(double, const OdGiMaterialMap &)
void setNormalMap(const OdGiMaterialMap &, NormalMapMethod, double)
void ambient(OdGiMaterialColor &) const
GlobalIlluminationMode globalIllumination() const
void setIlluminationModel(IlluminationModel)
LuminanceMode luminanceMode() const
DiffuseColorMode diffuseColorMode() const
void shadingSpecular(OdGiMaterialColor &) const
void normalMap(OdGiMaterialMap &, NormalMapMethod &, double &) const
void setTint(const OdGiMaterialColor &)
void diffuse(OdGiMaterialColor &, OdGiMaterialMap &) const
FinalGatherMode finalGather() const
void setShadingDiffuse(const OdGiMaterialColor &)
void setAmbient(const OdGiMaterialColor &)
void setFinalGather(FinalGatherMode)
void setEmission(const OdGiMaterialColor &, const OdGiMaterialMap &)
void setReflection(const OdGiMaterialMap &)
void tint(OdGiMaterialColor &) const
void setGlobalIllumination(GlobalIlluminationMode)
ChannelFlags channelFlags() const
@ kGlobalIlluminationCastAndReceive
Definition: GiMaterial.h:126
virtual void setLuminanceMode(LuminanceMode mode)
OdGiMaterialTraitsData m_data
virtual void setFinalGather(FinalGatherMode mode)
virtual void setSelfIllumination(double value)
virtual void setRefraction(double refractionIndex, const OdGiMaterialMap &refractionMap)
virtual void setMode(Mode value)
virtual void opacity(double &opacityPercentage, OdGiMaterialMap &opacityMap) const
virtual IlluminationModel illuminationModel() const
virtual void setTransmittanceScale(double scale)
virtual void emission(OdGiMaterialColor &emissionColor, OdGiMaterialMap &emissionMap) const
virtual void setIlluminationModel(IlluminationModel model)
virtual DiffuseColorMode diffuseColorMode() const
virtual void refraction(double &refractionIndex, OdGiMaterialMap &refractionMap) const
void getData(OdGiMaterialTraitsData &data) const
virtual void specular(OdGiMaterialColor &specularColor, OdGiMaterialMap &specularMap, double &glossFactor) const
virtual void ambient(OdGiMaterialColor &ambientColor) const
virtual ChannelFlags channelFlags() const
virtual double reflectanceScale() const
virtual void setTint(const OdGiMaterialColor &tintColor)
virtual void setColorBleedScale(double scale)
virtual void shadingOpacity(double &opacityPercentage) const
virtual void shadingSpecular(OdGiMaterialColor &specularColor) const
virtual void setShadingDiffuse(const OdGiMaterialColor &diffuseColor)
virtual bool twoSided() const
virtual void setEmission(const OdGiMaterialColor &emissionColor, const OdGiMaterialMap &emissionMap)
virtual void setNormalMap(const OdGiMaterialMap &normalMap, NormalMapMethod method, double strength)
virtual double indirectBumpScale() const
virtual void tint(OdGiMaterialColor &tintColor) const
virtual void diffuse(OdGiMaterialColor &diffuseColor, OdGiMaterialMap &diffuseMap) const
virtual void shadingAmbient(OdGiMaterialColor &ambientColor) const
virtual GlobalIlluminationMode globalIllumination() const
virtual double transmittanceScale() const
virtual void setReflection(const OdGiMaterialMap &reflectionMap)
virtual void setIndirectBumpScale(double scale)
virtual void setReflectivity(double value)
virtual void reflection(OdGiMaterialMap &reflectionMap) const
virtual FinalGatherMode finalGather() const
virtual Mode mode() const
virtual void setGlobalIllumination(GlobalIlluminationMode mode)
virtual void setSpecular(const OdGiMaterialColor &specularColor, const OdGiMaterialMap &specularMap, double glossFactor)
virtual void setLuminance(double value)
virtual void setDiffuse(const OdGiMaterialColor &diffuseColor, const OdGiMaterialMap &diffuseMap)
virtual void setShadingOpacity(double opacityPercentage)
void setData(const OdGiMaterialTraitsData &data)
virtual double reflectivity() const
virtual void bump(OdGiMaterialMap &bumpMap) const
const OdGiMaterialTraitsData & getData() const
virtual double luminance() const
virtual void setOpacity(double opacityPercentage, const OdGiMaterialMap &opacityMap)
virtual void setTwoSided(bool flag)
virtual void setShadingSpecular(const OdGiMaterialColor &specularColor)
virtual void setReflectanceScale(double scale)
virtual double selfIllumination() const
virtual void shadingDiffuse(OdGiMaterialColor &diffuseColor) const
virtual void setChannelFlags(ChannelFlags flags)
virtual void setBump(const OdGiMaterialMap &bumpMap)
virtual void setAmbient(const OdGiMaterialColor &ambientColor)
virtual double colorBleedScale() const
virtual void setShadingAmbient(const OdGiMaterialColor &ambientColor)
ODRX_USING_HEAP_OPERATORS(OdGiMaterialTraits)
virtual LuminanceMode luminanceMode() const
virtual double translucence() const
virtual void setDiffuseColorMode(DiffuseColorMode diffuseColorMode)
virtual void setTranslucence(double value)
virtual void normalMap(OdGiMaterialMap &normalMap, NormalMapMethod &method, double &strength) const
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
void setShadingDiffuse(const OdGiMaterialColor &diffuseColor)
void ambient(OdGiMaterialColor &ambientColor) const
void setAmbient(const OdGiMaterialColor &ambientColor)
OdGiMaterialTraits::GlobalIlluminationMode globalIllumination() const
OdGiMaterialTraits::LuminanceMode m_lumiMode
OdGiMaterialColor m_ambientColor
OdGiMaterialTraits::ChannelFlags m_channelFlags
void opacity(double &opacity, OdGiMaterialMap &opacityMap) const
void setColorBleedScale(double scale)
void setTransmittanceScale(double scale)
void setShadingOpacity(double opacityPercentage)
void setSpecular(const OdGiMaterialColor &specularColor, const OdGiMaterialMap &specularMap, double glossFactor)
OdGiMaterialColor m_specularColor
OdGiMaterialTraits::NormalMapMethod m_normalMethod
void setChannelFlags(OdGiMaterialTraits::ChannelFlags flags)
OdGiMaterialColor m_shadingSpeclrColor
OdGiMaterialColor m_tintColor
void setIndirectBumpScale(double scale)
OdGiMaterialTraits::FinalGatherMode m_fgMode
void shadingOpacity(double &opacityPercentage) const
void setTranslucence(double value)
OdGiMaterialMap m_refractionMap
void setFinalGather(OdGiMaterialTraits::FinalGatherMode mode)
OdGiMaterialTraits::IlluminationModel m_illumModel
void shadingSpecular(OdGiMaterialColor &specularColor) const
OdGiMaterialColor m_emissionColor
OdGiMaterialTraits::DiffuseColorMode m_diffuseColorMode
OdGiMaterialTraits::ChannelFlags channelFlags() const
OdGiMaterialTraits::Mode m_mode
void setShadingAmbient(const OdGiMaterialColor &ambientColor)
void bump(OdGiMaterialMap &bumpMap) const
void reflection(OdGiMaterialMap &reflectionMap) const
OdGiMaterialColor m_diffuseColor
void refraction(double &refractionIndex, OdGiMaterialMap &refractionMap) const
OdGiMaterialTraits::IlluminationModel illuminationModel() const
void setGlobalIllumination(OdGiMaterialTraits::GlobalIlluminationMode mode)
void setEmission(const OdGiMaterialColor &emissionColor, const OdGiMaterialMap &emissionMap)
void setIlluminationModel(OdGiMaterialTraits::IlluminationModel model)
void specular(OdGiMaterialColor &specularColor, OdGiMaterialMap &specularMap, double &glossFactor) const
void setLuminanceMode(OdGiMaterialTraits::LuminanceMode mode)
OdGiMaterialTraits::DiffuseColorMode diffuseColorMode() const
OdGiMaterialColor m_shadingAmbientColor
void setTint(const OdGiMaterialColor &tintColor)
void tint(OdGiMaterialColor &tintColor) const
void setBump(const OdGiMaterialMap &bumpMap)
void setRefraction(double refractionIndex, const OdGiMaterialMap &refractionMap)
void setNormalMap(const OdGiMaterialMap &normalMap, OdGiMaterialTraits::NormalMapMethod method, double strength)
void setReflectivity(double value)
void setSelfIllumination(double value)
bool operator==(const OdGiMaterialTraitsData &other) const
void diffuse(OdGiMaterialColor &diffuseColor, OdGiMaterialMap &diffuseMap) const
OdGiMaterialMap m_reflectionMap
void setOpacity(double opacity, const OdGiMaterialMap &opacityMap)
OdGiMaterialTraits::GlobalIlluminationMode m_globIllum
void setMode(OdGiMaterialTraits::Mode value)
void shadingDiffuse(OdGiMaterialColor &diffuseColor) const
void setDiffuseColorMode(OdGiMaterialTraits::DiffuseColorMode diffuseColorMode)
void shadingAmbient(OdGiMaterialColor &ambientColor) const
void setLuminance(double value)
void setReflection(const OdGiMaterialMap &reflectionMap)
OdGiMaterialColor m_shadingDiffuseColor
OdGiMaterialTraits::Mode mode() const
void setShadingSpecular(const OdGiMaterialColor &specularColor)
OdGiMaterialTraits::LuminanceMode luminanceMode() const
OdGiMaterialTraits::FinalGatherMode finalGather() const
void setReflectanceScale(double scale)
void operator=(const OdGiMaterialTraitsData &other)
void setDiffuse(const OdGiMaterialColor &diffuseColor, const OdGiMaterialMap &diffuseMap)
void normalMap(OdGiMaterialMap &normalMap, OdGiMaterialTraits::NormalMapMethod &method, double &strength) const
void emission(OdGiMaterialColor &emissionColor, OdGiMaterialMap &emissionMap) const
bool operator!=(const OdGiMaterialTraitsData &other) const