zjf
2023-03-06 392b76515f40376b6d36f40a114850ef63650384
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
/////////////////////////////////////////////////////////////////////////////// 
// Copyright (C) 2002-2016, Open Design Alliance (the "Alliance"). 
// All rights reserved. 
// 
// This software and its documentation and related materials are owned by 
// the Alliance. The software may only be incorporated into application 
// programs owned by members of the Alliance, subject to a signed 
// Membership Agreement and Supplemental Software License Agreement with the
// Alliance. The structure and organization of this software are the valuable  
// trade secrets of the Alliance and its suppliers. The software is also 
// protected by copyright law and international treaty provisions. Application  
// programs incorporating this software must include the following statement 
// with their copyright notices:
//   
//   This application incorporates Teigha(R) software pursuant to a license 
//   agreement with Open Design Alliance.
//   Teigha(R) Copyright (C) 2002-2016 by Open Design Alliance. 
//   All rights reserved.
//
// By use of this software, its documentation or related materials, you 
// acknowledge and accept the above terms.
///////////////////////////////////////////////////////////////////////////////
 
#ifndef _ODGIMATERIALTRAITSDATA_INCLUDED_
#define _ODGIMATERIALTRAITSDATA_INCLUDED_
 
#include "CmColor.h"
#include "Gi/GiMaterial.h"
 
class OdDbStub;
 
#include "TD_PackPush.h"
 
/** \details
 
    <group !!RECORDS_TD_APIRef>
*/
struct OdGiMaterialTraitsData
{
protected:
  OdGiMaterialColor                     m_ambientColor;
  OdGiMaterialColor                     m_diffuseColor;
  OdGiMaterialMap                       m_diffuseMap;
  OdGiMaterialColor                     m_specularColor;
  OdGiMaterialMap                       m_specularMap;
  double                                m_glossFactor;
  OdGiMaterialMap                       m_reflectionMap;
  double                                m_opacity;
  OdGiMaterialMap                       m_opacityMap;
  OdGiMaterialMap                       m_bumpMap;
  double                                m_refractionIndex;
  OdGiMaterialMap                       m_refractionMap;
  double                                m_translucenceVal;
  double                                m_selfIllumVal;
  double                                m_reflectivityVal;
  OdGiMaterialTraits::IlluminationModel m_illumModel;
  OdGiMaterialTraits::ChannelFlags      m_channelFlags;
  OdGiMaterialTraits::Mode              m_mode;
  // Extended material properties
  double                                     m_bleedScale;
  double                                     m_indirectBumpScale;
  double                                     m_reflectScale;
  double                                     m_transmitScale;
  bool                                       m_twoSided;
  OdGiMaterialTraits::LuminanceMode          m_lumiMode;
  double                                     m_lumiVal;
  OdGiMaterialMap                            m_normalMap;
  OdGiMaterialTraits::NormalMapMethod        m_normalMethod;
  double                                     m_normalStrength;
  OdGiMaterialTraits::GlobalIlluminationMode m_globIllum;
  OdGiMaterialTraits::FinalGatherMode        m_fgMode;
  // ODA extensions
  OdGiMaterialColor                     m_emissionColor;
  OdGiMaterialMap                       m_emissionMap;
 
public:
  OdGiMaterialTraitsData()
    : m_ambientColor()
    , m_diffuseColor()
    , m_diffuseMap()
    , m_specularColor()
    , m_specularMap()
    , m_glossFactor(0.0)
    , m_reflectionMap()
    , m_opacity(1.0)
    , m_opacityMap()
    , m_bumpMap()
    , m_refractionIndex(0.0)
    , m_refractionMap()
    , m_translucenceVal(0.0)
    , m_selfIllumVal(0.0)
    , m_reflectivityVal(0.0)
    , m_illumModel(OdGiMaterialTraits::kBlinnShader)
    , m_channelFlags(OdGiMaterialTraits::kUseDiffuse)
    , m_mode(OdGiMaterialTraits::kRealistic)
    // Extended material properties
    , m_bleedScale(100.0)
    , m_indirectBumpScale(100.0)
    , m_reflectScale(100.0)
    , m_transmitScale(100.0)
    , m_twoSided(true)
    , m_lumiMode(OdGiMaterialTraits::kSelfIllumination)
    , m_lumiVal(0.0)
    , m_normalMap()
    , m_normalMethod(OdGiMaterialTraits::kTangentSpace)
    , m_normalStrength(1.0)
    , m_globIllum(OdGiMaterialTraits::kGlobalIlluminationCastAndReceive)
    , m_fgMode(OdGiMaterialTraits::kFinalGatherCastAndReceive)
    // ODA extensions
    , m_emissionColor()
    , m_emissionMap()
  {
  }
  void operator =(const OdGiMaterialTraitsData& other)
  {
    m_ambientColor      = other.m_ambientColor;
    m_diffuseColor      = other.m_diffuseColor;
    m_diffuseMap        = other.m_diffuseMap;
    m_specularColor     = other.m_specularColor;
    m_specularMap       = other.m_specularMap;
    m_glossFactor       = other.m_glossFactor;
    m_reflectionMap     = other.m_reflectionMap;
    m_opacity           = other.m_opacity;
    m_opacityMap        = other.m_opacityMap;
    m_bumpMap           = other.m_bumpMap;
    m_refractionIndex   = other.m_refractionIndex;
    m_refractionMap     = other.m_refractionMap;
    m_translucenceVal   = other.m_translucenceVal;
    m_selfIllumVal      = other.m_selfIllumVal;
    m_reflectivityVal   = other.m_reflectivityVal;
    m_illumModel        = other.m_illumModel;
    m_channelFlags      = other.m_channelFlags;
    m_mode              = other.m_mode;
    // Extended material properties
    m_bleedScale        = other.m_bleedScale;
    m_indirectBumpScale = other.m_indirectBumpScale;
    m_reflectScale      = other.m_reflectScale;
    m_transmitScale     = other.m_transmitScale;
    m_twoSided          = other.m_twoSided;
    m_lumiMode          = other.m_lumiMode;
    m_lumiVal           = other.m_lumiVal;
    m_normalMap         = other.m_normalMap;
    m_normalMethod      = other.m_normalMethod;
    m_normalStrength    = other.m_normalStrength;
    m_globIllum         = other.m_globIllum;
    m_fgMode            = other.m_fgMode;
    // ODA extensions
    m_emissionColor     = other.m_emissionColor;
    m_emissionMap       = other.m_emissionMap;
  }
  bool operator ==(const OdGiMaterialTraitsData& other) const
  {
    if (m_ambientColor      != other.m_ambientColor)      return false;
    if (m_diffuseColor      != other.m_diffuseColor)      return false;
    if (m_diffuseMap        != other.m_diffuseMap)        return false;
    if (m_specularColor     != other.m_specularColor)     return false;
    if (m_specularMap       != other.m_specularMap)       return false;
    if (m_glossFactor       != other.m_glossFactor)       return false;
    if (m_reflectionMap     != other.m_reflectionMap)     return false;
    if (m_opacity           != other.m_opacity)           return false;
    if (m_opacityMap        != other.m_opacityMap)        return false;
    if (m_bumpMap           != other.m_bumpMap)           return false;
    if (m_refractionIndex   != other.m_refractionIndex)   return false;
    if (m_refractionMap     != other.m_refractionMap)     return false;
    if (m_translucenceVal   != other.m_translucenceVal)   return false;
    if (m_selfIllumVal      != other.m_selfIllumVal)      return false;
    if (m_reflectivityVal   != other.m_reflectivityVal)   return false;
    if (m_illumModel        != other.m_illumModel)        return false;
    if (m_channelFlags      != other.m_channelFlags)      return false;
    if (m_mode              != other.m_mode)              return false;
    // Extended material properties
    if (m_bleedScale        != other.m_bleedScale)        return false;
    if (m_indirectBumpScale != other.m_indirectBumpScale) return false;
    if (m_reflectScale      != other.m_reflectScale)      return false;
    if (m_transmitScale     != other.m_transmitScale)     return false;
    if (m_twoSided          != other.m_twoSided)          return false;
    if (m_lumiMode          != other.m_lumiMode)          return false;
    if (m_lumiVal           != other.m_lumiVal)           return false;
    if (m_normalMap         != other.m_normalMap)         return false;
    if (m_normalMethod      != other.m_normalMethod)      return false;
    if (m_normalStrength    != other.m_normalStrength)    return false;
    if (m_globIllum         != other.m_globIllum)         return false;
    if (m_fgMode            != other.m_fgMode)            return false;
    // ODA extensions
    if (m_emissionColor     != other.m_emissionColor)     return false;
    if (m_emissionMap       != other.m_emissionMap)       return false;
    return true;
  }
  bool operator !=(const OdGiMaterialTraitsData& other) const
  {
    if (m_ambientColor      != other.m_ambientColor)      return true;
    if (m_diffuseColor      != other.m_diffuseColor)      return true;
    if (m_diffuseMap        != other.m_diffuseMap)        return true;
    if (m_specularColor     != other.m_specularColor)     return true;
    if (m_specularMap       != other.m_specularMap)       return true;
    if (m_glossFactor       != other.m_glossFactor)       return true;
    if (m_reflectionMap     != other.m_reflectionMap)     return true;
    if (m_opacity           != other.m_opacity)           return true;
    if (m_opacityMap        != other.m_opacityMap)        return true;
    if (m_bumpMap           != other.m_bumpMap)           return true;
    if (m_refractionIndex   != other.m_refractionIndex)   return true;
    if (m_refractionMap     != other.m_refractionMap)     return true;
    if (m_translucenceVal   != other.m_translucenceVal)   return true;
    if (m_selfIllumVal      != other.m_selfIllumVal)      return true;
    if (m_reflectivityVal   != other.m_reflectivityVal)   return true;
    if (m_illumModel        != other.m_illumModel)        return true;
    if (m_channelFlags      != other.m_channelFlags)      return true;
    if (m_mode              != other.m_mode)              return true;    
    // Extended material properties
    if (m_bleedScale        != other.m_bleedScale)        return true;
    if (m_indirectBumpScale != other.m_indirectBumpScale) return true;
    if (m_reflectScale      != other.m_reflectScale)      return true;
    if (m_transmitScale     != other.m_transmitScale)     return true;
    if (m_twoSided          != other.m_twoSided)          return true;
    if (m_lumiMode          != other.m_lumiMode)          return true;
    if (m_lumiVal           != other.m_lumiVal)           return true;
    if (m_normalMap         != other.m_normalMap)         return true;
    if (m_normalMethod      != other.m_normalMethod)      return true;
    if (m_normalStrength    != other.m_normalStrength)    return true;
    if (m_globIllum         != other.m_globIllum)         return true;
    if (m_fgMode            != other.m_fgMode)            return true;
    // ODA extensions
    if (m_emissionColor     != other.m_emissionColor)     return true;
    if (m_emissionMap       != other.m_emissionMap)       return true;
    return false;
  }
 
  void ambient(OdGiMaterialColor& ambientColor) const
  {
    ambientColor = m_ambientColor;
  }
  void diffuse(OdGiMaterialColor& diffuseColor, OdGiMaterialMap& diffuseMap) const
  {
    diffuseColor = m_diffuseColor;
    diffuseMap = m_diffuseMap;
  }
  void specular(OdGiMaterialColor& specularColor, OdGiMaterialMap& specularMap, double& glossFactor) const
  {
    specularColor = m_specularColor;
    specularMap = m_specularMap;
    glossFactor = m_glossFactor;
  }
  void reflection(OdGiMaterialMap& reflectionMap) const
  {
    reflectionMap = m_reflectionMap;
  }
  void opacity(double& opacity, OdGiMaterialMap& opacityMap) const
  {
    opacity = m_opacity;
    opacityMap = m_opacityMap;
  }
  void bump(OdGiMaterialMap& bumpMap) const
  {
    bumpMap = m_bumpMap;
  }
  void refraction(double& refractionIndex, OdGiMaterialMap& refractionMap) const
  {
    refractionIndex = m_refractionIndex;
    refractionMap = m_refractionMap;
  }
  double translucence() const
  {
    return m_translucenceVal;
  }
  double selfIllumination() const
  {
    return m_selfIllumVal;
  }
  double reflectivity() const
  {
    return m_reflectivityVal;
  }
  OdGiMaterialTraits::IlluminationModel illuminationModel() const
  {
    return m_illumModel;
  }
  OdGiMaterialTraits::ChannelFlags channelFlags() const
  {
    return m_channelFlags;
  }
  OdGiMaterialTraits::Mode mode() const
  {
    return m_mode;
  }
 
  void setAmbient(const OdGiMaterialColor& ambientColor)
  {
    m_ambientColor = ambientColor;
  }
  void setDiffuse(const OdGiMaterialColor& diffuseColor, const OdGiMaterialMap& diffuseMap)
  {
    m_diffuseColor = diffuseColor;
    m_diffuseMap = diffuseMap;
  }
  void setSpecular(const OdGiMaterialColor& specularColor, const OdGiMaterialMap& specularMap, double glossFactor)
  {
    m_specularColor = specularColor;
    m_specularMap = specularMap;
    m_glossFactor = glossFactor;
  }
  void setReflection(const OdGiMaterialMap& reflectionMap)
  {
    m_reflectionMap = reflectionMap;
  }
  void setOpacity(double opacity, const OdGiMaterialMap& opacityMap)
  {
    m_opacity = opacity;
    m_opacityMap = opacityMap;
  }
  void setBump(const OdGiMaterialMap& bumpMap)
  {
    m_bumpMap = bumpMap;
  }
  void setRefraction(double refractionIndex, const OdGiMaterialMap& refractionMap)
  {
    m_refractionIndex = refractionIndex;
    m_refractionMap = refractionMap;
  }
  void setTranslucence(double value)
  {
    m_translucenceVal = value;
  }
  void setSelfIllumination(double value)
  {
    m_selfIllumVal = value;
  }
  void setReflectivity(double value)
  {
    m_reflectivityVal = value;
  }
  void setIlluminationModel(OdGiMaterialTraits::IlluminationModel model)
  {
    m_illumModel = model;
  }
  void setChannelFlags(OdGiMaterialTraits::ChannelFlags flags)
  {
    m_channelFlags = flags;
  }
  void setMode(OdGiMaterialTraits::Mode value)
  {
    m_mode = value;
  }
 
  // Extended material properties
 
  void setColorBleedScale(double scale)
  {
    m_bleedScale = scale;
  }
  double colorBleedScale() const
  {
    return m_bleedScale;
  }
 
  void setIndirectBumpScale(double scale)
  {
    m_indirectBumpScale = scale;
  }
  double indirectBumpScale() const
  {
    return m_indirectBumpScale;
  }
 
  void setReflectanceScale(double scale)
  {
    m_reflectScale = scale;
  }
  double reflectanceScale() const
  {
    return m_reflectScale;
  }
 
  void setTransmittanceScale(double scale)
  {
    m_transmitScale = scale;
  }
  double transmittanceScale() const
  {
    return m_transmitScale;
  }
 
  void setTwoSided(bool flag)
  {
    m_twoSided = flag;
  }
  bool twoSided() const
  {
    return m_twoSided;
  }
 
  void setLuminanceMode(OdGiMaterialTraits::LuminanceMode mode)
  {
    m_lumiMode = mode;
  }
  OdGiMaterialTraits::LuminanceMode luminanceMode() const
  {
    return m_lumiMode;
  }
 
  void setLuminance(double value)
  {
    m_lumiVal = value;
  }
  double luminance() const
  {
    return m_lumiVal;
  }
 
  void setNormalMap(const OdGiMaterialMap &normalMap, OdGiMaterialTraits::NormalMapMethod method, double strength)
  {
    m_normalMap = normalMap;
    m_normalMethod = method;
    m_normalStrength = strength;
  }
  void normalMap(OdGiMaterialMap &normalMap, OdGiMaterialTraits::NormalMapMethod &method, double &strength) const
  {
    normalMap = m_normalMap;
    method = m_normalMethod;
    strength = m_normalStrength;
  }
 
  void setGlobalIllumination(OdGiMaterialTraits::GlobalIlluminationMode mode)
  {
    m_globIllum = mode;
  }
  OdGiMaterialTraits::GlobalIlluminationMode globalIllumination() const
  {
    return m_globIllum;
  }
 
  void setFinalGather(OdGiMaterialTraits::FinalGatherMode mode)
  {
    m_fgMode = mode;
  }
  OdGiMaterialTraits::FinalGatherMode finalGather() const
  {
    return m_fgMode;
  }
 
  // ODA extensions
  void setEmission(const OdGiMaterialColor& emissionColor, const OdGiMaterialMap& emissionMap)
  {
    m_emissionColor = emissionColor;
    m_emissionMap = emissionMap;
  }
 
  void emission(OdGiMaterialColor& emissionColor, OdGiMaterialMap& emissionMap) const
  {
    emissionMap = m_emissionMap;
    emissionColor = m_emissionColor;
  }
};
 
/** \details
    
    \sa
    TD_Gi
   
    <group OdGi_Classes>
*/
class ODGI_EXPORT OdGiMaterialTraitsTaker : public OdGiMaterialTraits
{
protected:
  OdGiMaterialTraitsData m_data;
public:
  //ODRX_DECLARE_MEMBERS(OdGiMaterialTraitsTaker);
  ODRX_USING_HEAP_OPERATORS(OdGiMaterialTraits);
 
  void addRef() { }
  void release() { }
 
  virtual void ambient(OdGiMaterialColor& ambientColor) const
  {
    m_data.ambient(ambientColor);
  }
  virtual void diffuse(OdGiMaterialColor& diffuseColor, OdGiMaterialMap& diffuseMap) const
  {
    m_data.diffuse(diffuseColor, diffuseMap);
  }
  virtual void specular(OdGiMaterialColor& specularColor, OdGiMaterialMap& specularMap, double& glossFactor) const
  {
    m_data.specular(specularColor, specularMap, glossFactor);
  }
  virtual void reflection(OdGiMaterialMap& reflectionMap) const
  {
    m_data.reflection(reflectionMap);
  }
  virtual void opacity(double& opacityPercentage, OdGiMaterialMap& opacityMap) const
  {
    m_data.opacity(opacityPercentage, opacityMap);
  }
  virtual void bump(OdGiMaterialMap& bumpMap) const
  {
    m_data.bump(bumpMap);
  }
  virtual void refraction(double& refractionIndex, OdGiMaterialMap& refractionMap) const
  {
    m_data.refraction(refractionIndex, refractionMap);
  }
  virtual double translucence() const
  {
    return m_data.translucence();
  }
  virtual double selfIllumination() const
  {
    return m_data.selfIllumination();
  }
  virtual double reflectivity() const
  {
    return m_data.reflectivity();
  }
  virtual IlluminationModel illuminationModel() const
  {
    return m_data.illuminationModel();
  }
  virtual ChannelFlags channelFlags() const
  {
    return m_data.channelFlags();
  }
  virtual Mode mode() const
  {
    return m_data.mode();
  }
 
  virtual void setAmbient(const OdGiMaterialColor& ambientColor)
  {
    m_data.setAmbient(ambientColor);
  }
  virtual void setDiffuse(const OdGiMaterialColor& diffuseColor, const OdGiMaterialMap& diffuseMap)
  {
    m_data.setDiffuse(diffuseColor, diffuseMap);
  }
  virtual void setSpecular(const OdGiMaterialColor& specularColor, const OdGiMaterialMap& specularMap, double glossFactor)
  {
    m_data.setSpecular(specularColor, specularMap, glossFactor);
  }
  virtual void setReflection(const OdGiMaterialMap& reflectionMap)
  {
    m_data.setReflection(reflectionMap);
  }
  virtual void setOpacity(double opacityPercentage, const OdGiMaterialMap& opacityMap)
  {
    m_data.setOpacity(opacityPercentage, opacityMap);
  }
  virtual void setBump(const OdGiMaterialMap& bumpMap)
  {
    m_data.setBump(bumpMap);
  }
  virtual void setRefraction(double refractionIndex, const OdGiMaterialMap& refractionMap)
  {
    m_data.setRefraction(refractionIndex, refractionMap);
  }
  virtual void setTranslucence(double value)
  {
    m_data.setTranslucence(value);
  }
  virtual void setSelfIllumination(double value)
  {
    m_data.setSelfIllumination(value);
  }
  virtual void setReflectivity(double value)
  {
    m_data.setReflectivity(value);
  }
  virtual void setIlluminationModel(IlluminationModel model)
  {
    m_data.setIlluminationModel(model);
  }
  virtual void setChannelFlags(ChannelFlags flags)
  {
    m_data.setChannelFlags(flags);
  }
  virtual void setMode(Mode value)
  {
    m_data.setMode(value);
  }
 
  virtual void setColorBleedScale(double scale)
  {
    m_data.setColorBleedScale(scale);
  }
  virtual double colorBleedScale() const
  {
    return m_data.colorBleedScale();
  }
 
  virtual void setIndirectBumpScale(double scale)
  {
    m_data.setIndirectBumpScale(scale);
  }
  virtual double indirectBumpScale() const
  {
    return m_data.indirectBumpScale();
  }
 
  virtual void setReflectanceScale(double scale)
  {
    m_data.setReflectanceScale(scale);
  }
  virtual double reflectanceScale() const
  {
    return m_data.reflectanceScale();
  }
 
  virtual void setTransmittanceScale(double scale)
  {
    m_data.setTransmittanceScale(scale);
  }
  virtual double transmittanceScale() const
  {
    return m_data.transmittanceScale();
  }
 
  virtual void setTwoSided(bool flag)
  {
    m_data.setTwoSided(flag);
  }
  virtual bool twoSided() const
  {
    return m_data.twoSided();
  }
 
  virtual void setLuminanceMode(LuminanceMode mode)
  {
    m_data.setLuminanceMode(mode);
  }
  virtual LuminanceMode luminanceMode() const
  {
    return m_data.luminanceMode();
  }
 
  virtual void setLuminance(double value)
  {
    m_data.setLuminance(value);
  }
  virtual double luminance() const
  {
    return m_data.luminance();
  }
 
  virtual void setNormalMap(const OdGiMaterialMap &normalMap, NormalMapMethod method, double strength)
  {
    m_data.setNormalMap(normalMap, method, strength);
  }
  virtual void normalMap(OdGiMaterialMap &normalMap, NormalMapMethod &method, double &strength) const
  {
    m_data.normalMap(normalMap, method, strength);
  }
 
  virtual void setGlobalIllumination(GlobalIlluminationMode mode)
  {
    m_data.setGlobalIllumination(mode);
  }
  virtual GlobalIlluminationMode globalIllumination() const
  {
    return m_data.globalIllumination();
  }
 
  virtual void setFinalGather(FinalGatherMode mode)
  {
    m_data.setFinalGather(mode);
  }
  virtual FinalGatherMode finalGather() const
  {
    return m_data.finalGather();
  }
 
  void setEmission(const OdGiMaterialColor& emissionColor, const OdGiMaterialMap& emissionMap)
  {
    m_data.setEmission(emissionColor, emissionMap);
  }
 
  void emission(OdGiMaterialColor& emissionColor, OdGiMaterialMap& emissionMap) const
  {
    m_data.emission(emissionColor, emissionMap);
  }
 
  void getData(OdGiMaterialTraitsData& data) const { data = m_data; }
  const OdGiMaterialTraitsData &getData() const { return m_data; }
 
  void setData(const OdGiMaterialTraitsData& data) { m_data = data; }
};
 
typedef OdSmartPtr<OdGiMaterialTraitsTaker> OdGiMaterialTraitsTakerPtr;
 
/** \details
    
    \sa
    TD_Gi
   
    <group OdGi_Classes>
*/
class ODGI_EXPORT OdGiMaterialTraits_Stub : public OdGiMaterialTraits
{
public:
  ODRX_USING_HEAP_OPERATORS(OdGiMaterialTraits);
 
  OdGiMaterialTraits_Stub() { }
 
  void addRef() { }
  void release() { }
 
  void ambient(OdGiMaterialColor& /*ambientColor*/) const { }
  void diffuse(OdGiMaterialColor& /*diffuseColor*/, OdGiMaterialMap& /*diffuseMap*/) const { }
  void specular(OdGiMaterialColor& /*specularColor*/, OdGiMaterialMap& /*specularMap*/, double& /*glossFactor*/) const { }
  void reflection(OdGiMaterialMap& /*reflectionMap*/) const { }
  void opacity(double& /*opacityPercentage*/, OdGiMaterialMap& /*opacityMap*/) const { }
  void bump(OdGiMaterialMap& /*bumpMap*/) const { }
  void refraction(double& /*refractionIndex*/, OdGiMaterialMap& /*refractionMap*/) const { }
  double translucence() const { return 0.0; }
  double selfIllumination() const { return 0.0; }
  double reflectivity() const { return 0.0; }
  IlluminationModel illuminationModel() const { return kBlinnShader; }
  ChannelFlags channelFlags() const { return kUseAll; }
  Mode mode() const { return kRealistic; }
 
  void setAmbient(const OdGiMaterialColor& /*ambientColor*/) { }
  void setDiffuse(const OdGiMaterialColor& /*diffuseColor*/, const OdGiMaterialMap& /*diffuseMap*/) { }
  void setSpecular(const OdGiMaterialColor& /*specularColor*/, const OdGiMaterialMap& /*specularMap*/, double /*glossFactor*/) { }
  void setReflection(const OdGiMaterialMap& /*reflectionMap*/) { }
  void setOpacity(double /*opacityPercentage*/, const OdGiMaterialMap& /*opacityMap*/) { }
  void setBump(const OdGiMaterialMap& /*bumpMap*/) { }
  void setRefraction(double /*refractionIndex*/, const OdGiMaterialMap& /*refractionMap*/) { }
  void setTranslucence(double /*value*/) { }
  void setSelfIllumination(double /*value*/) { }
  void setReflectivity(double /*value*/) { }
  void setIlluminationModel(IlluminationModel /*model*/) { }
  void setChannelFlags(ChannelFlags /*flags*/) { }
  void setMode(Mode /*value*/) { }
 
  void setColorBleedScale(double /*scale*/) { }
  double colorBleedScale() const { return 0.0; }
 
  void setIndirectBumpScale(double /*scale*/) { }
  double indirectBumpScale() const { return 0.0; }
 
  void setReflectanceScale(double /*scale*/) { }
  double reflectanceScale() const { return 0.0; }
 
  void setTransmittanceScale(double /*scale*/) { }
  double transmittanceScale() const { return 0.0; }
 
  void setTwoSided(bool /*flag*/) { }
  bool twoSided() const { return true; }
 
  void setLuminanceMode(LuminanceMode /*mode*/) { }
  LuminanceMode luminanceMode() const { return kSelfIllumination; }
 
  void setLuminance(double /*value*/) { }
  double luminance() const { return 0.0; }
 
  void setNormalMap(const OdGiMaterialMap &/*normalMap*/, NormalMapMethod /*method*/, double /*strength*/) { }
  void normalMap(OdGiMaterialMap &/*normalMap*/, NormalMapMethod &/*method*/, double &/*strength*/) const { }
 
  void setGlobalIllumination(GlobalIlluminationMode /*mode*/) { }
  GlobalIlluminationMode globalIllumination() const { return kGlobalIlluminationCastAndReceive; }
 
  void setFinalGather(FinalGatherMode /*mode*/) { }
  FinalGatherMode finalGather() const { return kFinalGatherCastAndReceive; }
 
  void setEmission(const OdGiMaterialColor& /*emissionColor*/, const OdGiMaterialMap& /*emissionMap*/) { }
  void emission(OdGiMaterialColor& /*emissionColor*/, OdGiMaterialMap& /*emissionMap*/) const { }
};
 
typedef OdSmartPtr<OdGiMaterialTraits_Stub> OdGiMaterialTraits_StubPtr;
 
#include "TD_PackPop.h"
 
#endif // #ifndef _ODGIMATERIALTRAITSDATA_INCLUDED_