CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GiMaterialTraitsData.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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
29class OdDbStub;
30
31#include "TD_PackPush.h"
32
40{
41protected:
49 double m_opacity;
60 // Extended material properties
67 double m_lumiVal;
73 // BIM extensions
82 // Visualize extensions
86
87public:
94 , m_diffuseMap()
97 , m_glossFactor(0.0)
99 , m_opacity(1.0)
100 , m_opacityMap()
101 , m_bumpMap()
102 , m_refractionIndex(0.0)
104 , m_translucenceVal(0.0)
105 , m_selfIllumVal(0.0)
106 , m_reflectivityVal(0.0)
107 , m_illumModel(OdGiMaterialTraits::kBlinnShader)
108 , m_channelFlags(OdGiMaterialTraits::kUseDiffuse)
109 , m_mode(OdGiMaterialTraits::kRealistic)
110 // Extended material properties
111 , m_bleedScale(100.0)
112 , m_indirectBumpScale(100.0)
113 , m_reflectScale(100.0)
114 , m_transmitScale(100.0)
116 , m_lumiMode(OdGiMaterialTraits::kSelfIllumination)
117 , m_lumiVal(0.0)
118 , m_normalMap()
119 , m_normalMethod(OdGiMaterialTraits::kTangentSpace)
120 , m_normalStrength(1.0)
121 , m_globIllum(OdGiMaterialTraits::kGlobalIlluminationCastAndReceive)
122 , m_fgMode(OdGiMaterialTraits::kFinalGatherCastAndReceive)
123 // BIM extensions
125 , m_emissionMap()
126 , m_tintColor(OdCmEntityColor(255, 255, 255))
130 , m_shadingOpacity(1.0)
131 , m_diffuseColorMode(OdGiMaterialTraits::kDiffuseRealisticColor)
132 // Visualize extensions
133 , m_shadowsOpacity(1.0)
134 , m_specularOverride(0.0)
135 , m_nslmEffect(1.0)
136 {
137 }
138
146 {
154 m_opacity = other.m_opacity;
156 m_bumpMap = other.m_bumpMap;
164 m_mode = other.m_mode;
165 // Extended material properties
170 m_twoSided = other.m_twoSided;
171 m_lumiMode = other.m_lumiMode;
172 m_lumiVal = other.m_lumiVal;
173 m_normalMap = other.m_normalMap;
176 m_globIllum = other.m_globIllum;
177 m_fgMode = other.m_fgMode;
178 // BIM extensions
181 m_tintColor = other.m_tintColor;
187 // Visualize extensions
191 }
192
202 bool operator ==(const OdGiMaterialTraitsData& other) const
203 {
204 if (m_ambientColor != other.m_ambientColor) return false;
205 if (m_diffuseColor != other.m_diffuseColor) return false;
206 if (m_diffuseMap != other.m_diffuseMap) return false;
207 if (m_specularColor != other.m_specularColor) return false;
208 if (m_specularMap != other.m_specularMap) return false;
209 if (m_glossFactor != other.m_glossFactor) return false;
210 if (m_reflectionMap != other.m_reflectionMap) return false;
211 if (m_opacity != other.m_opacity) return false;
212 if (m_opacityMap != other.m_opacityMap) return false;
213 if (m_bumpMap != other.m_bumpMap) return false;
214 if (m_refractionIndex != other.m_refractionIndex) return false;
215 if (m_refractionMap != other.m_refractionMap) return false;
216 if (m_translucenceVal != other.m_translucenceVal) return false;
217 if (m_selfIllumVal != other.m_selfIllumVal) return false;
218 if (m_reflectivityVal != other.m_reflectivityVal) return false;
219 if (m_illumModel != other.m_illumModel) return false;
220 if (m_channelFlags != other.m_channelFlags) return false;
221 if (m_mode != other.m_mode) return false;
222 // Extended material properties
223 if (m_bleedScale != other.m_bleedScale) return false;
224 if (m_indirectBumpScale != other.m_indirectBumpScale) return false;
225 if (m_reflectScale != other.m_reflectScale) return false;
226 if (m_transmitScale != other.m_transmitScale) return false;
227 if (m_twoSided != other.m_twoSided) return false;
228 if (m_lumiMode != other.m_lumiMode) return false;
229 if (m_lumiVal != other.m_lumiVal) return false;
230 if (m_normalMap != other.m_normalMap) return false;
231 if (m_normalMethod != other.m_normalMethod) return false;
232 if (m_normalStrength != other.m_normalStrength) return false;
233 if (m_globIllum != other.m_globIllum) return false;
234 if (m_fgMode != other.m_fgMode) return false;
235 // BIM extensions
236 if (m_emissionColor != other.m_emissionColor) return false;
237 if (m_emissionMap != other.m_emissionMap) return false;
238 if (m_tintColor != other.m_tintColor) return false;
239 if (m_shadingAmbientColor != other.m_shadingAmbientColor) return false;
240 if (m_shadingDiffuseColor != other.m_shadingDiffuseColor) return false;
241 if (m_shadingSpeclrColor != other.m_shadingSpeclrColor) return false;
242 if (m_shadingOpacity != other.m_shadingOpacity) return false;
243 if (m_diffuseColorMode != other.m_diffuseColorMode) return false;
244 // Visualize extensions
245 if (m_shadowsOpacity != other.m_shadowsOpacity) return false;
246 if (m_specularOverride != other.m_specularOverride) return false;
247 if (m_nslmEffect != other.m_nslmEffect) return false;
248 return true;
249 }
250
260 bool operator !=(const OdGiMaterialTraitsData& other) const
261 {
262 if (m_ambientColor != other.m_ambientColor) return true;
263 if (m_diffuseColor != other.m_diffuseColor) return true;
264 if (m_diffuseMap != other.m_diffuseMap) return true;
265 if (m_specularColor != other.m_specularColor) return true;
266 if (m_specularMap != other.m_specularMap) return true;
267 if (m_glossFactor != other.m_glossFactor) return true;
268 if (m_reflectionMap != other.m_reflectionMap) return true;
269 if (m_opacity != other.m_opacity) return true;
270 if (m_opacityMap != other.m_opacityMap) return true;
271 if (m_bumpMap != other.m_bumpMap) return true;
272 if (m_refractionIndex != other.m_refractionIndex) return true;
273 if (m_refractionMap != other.m_refractionMap) return true;
274 if (m_translucenceVal != other.m_translucenceVal) return true;
275 if (m_selfIllumVal != other.m_selfIllumVal) return true;
276 if (m_reflectivityVal != other.m_reflectivityVal) return true;
277 if (m_illumModel != other.m_illumModel) return true;
278 if (m_channelFlags != other.m_channelFlags) return true;
279 if (m_mode != other.m_mode) return true;
280 // Extended material properties
281 if (m_bleedScale != other.m_bleedScale) return true;
282 if (m_indirectBumpScale != other.m_indirectBumpScale) return true;
283 if (m_reflectScale != other.m_reflectScale) return true;
284 if (m_transmitScale != other.m_transmitScale) return true;
285 if (m_twoSided != other.m_twoSided) return true;
286 if (m_lumiMode != other.m_lumiMode) return true;
287 if (m_lumiVal != other.m_lumiVal) return true;
288 if (m_normalMap != other.m_normalMap) return true;
289 if (m_normalMethod != other.m_normalMethod) return true;
290 if (m_normalStrength != other.m_normalStrength) return true;
291 if (m_globIllum != other.m_globIllum) return true;
292 if (m_fgMode != other.m_fgMode) return true;
293 // BIM extensions
294 if (m_emissionColor != other.m_emissionColor) return true;
295 if (m_emissionMap != other.m_emissionMap) return true;
296 if (m_tintColor != other.m_tintColor) return true;
297 if (m_shadingAmbientColor != other.m_shadingAmbientColor) return true;
298 if (m_shadingDiffuseColor != other.m_shadingDiffuseColor) return true;
299 if (m_shadingSpeclrColor != other.m_shadingSpeclrColor) return true;
300 if (m_shadingOpacity != other.m_shadingOpacity) return true;
301 if (m_diffuseColorMode != other.m_diffuseColorMode) return true;
302 // Visualize extensions
303 if (m_shadowsOpacity != other.m_shadowsOpacity) return true;
304 if (m_specularOverride != other.m_specularOverride) return true;
305 if (m_nslmEffect != other.m_nslmEffect) return true;
306 return false;
307 }
308
313 void ambient(OdGiMaterialColor& ambientColor) const
314 {
315 ambientColor = m_ambientColor;
316 }
317
323 void diffuse(OdGiMaterialColor& diffuseColor, OdGiMaterialMap& diffuseMap) const
324 {
325 diffuseColor = m_diffuseColor;
326 diffuseMap = m_diffuseMap;
327 }
328
335 void specular(OdGiMaterialColor& specularColor, OdGiMaterialMap& specularMap, double& glossFactor) const
336 {
337 specularColor = m_specularColor;
338 specularMap = m_specularMap;
339 glossFactor = m_glossFactor;
340 }
341
346 void reflection(OdGiMaterialMap& reflectionMap) const
347 {
348 reflectionMap = m_reflectionMap;
349 }
350
356 void opacity(double& opacity, OdGiMaterialMap& opacityMap) const
357 {
359 opacityMap = m_opacityMap;
360 }
361
366 void bump(OdGiMaterialMap& bumpMap) const
367 {
368 bumpMap = m_bumpMap;
369 }
370
376 void refraction(double& refractionIndex, OdGiMaterialMap& refractionMap) const
377 {
378 refractionIndex = m_refractionIndex;
379 refractionMap = m_refractionMap;
380 }
381
387 double translucence() const
388 {
389 return m_translucenceVal;
390 }
391
397 double selfIllumination() const
398 {
399 return m_selfIllumVal;
400 }
401
407 double reflectivity() const
408 {
409 return m_reflectivityVal;
410 }
417 {
418 return m_illumModel;
419 }
420
427 {
428 return m_channelFlags;
429 }
430
437 {
438 return m_mode;
439 }
440
449 void setAmbient(const OdGiMaterialColor& ambientColor)
450 {
451 m_ambientColor = ambientColor;
452 }
453
463 void setDiffuse(const OdGiMaterialColor& diffuseColor, const OdGiMaterialMap& diffuseMap)
464 {
465 m_diffuseColor = diffuseColor;
466 m_diffuseMap = diffuseMap;
467 }
468
479 void setSpecular(const OdGiMaterialColor& specularColor, const OdGiMaterialMap& specularMap, double glossFactor)
480 {
481 m_specularColor = specularColor;
482 m_specularMap = specularMap;
483 m_glossFactor = glossFactor;
484 }
485
494 void setReflection(const OdGiMaterialMap& reflectionMap)
495 {
496 m_reflectionMap = reflectionMap;
497 }
498
505 void setOpacity(double opacity, const OdGiMaterialMap& opacityMap)
506 {
508 m_opacityMap = opacityMap;
509 }
510
516 void setBump(const OdGiMaterialMap& bumpMap)
517 {
518 m_bumpMap = bumpMap;
519 }
520
527 void setRefraction(double refractionIndex, const OdGiMaterialMap& refractionMap)
528 {
529 m_refractionIndex = refractionIndex;
530 m_refractionMap = refractionMap;
531 }
532
539 {
541 }
542
549 {
551 }
552
559 {
561 }
562
569 {
570 m_illumModel = model;
571 }
572
579 {
580 m_channelFlags = flags;
581 }
582
589 {
590 m_mode = value;
591 }
592
593 // Extended material properties
594
595
602 {
604 }
605
612 double colorBleedScale() const
613 {
614 return m_bleedScale;
615 }
616
623 {
625 }
626
633 double indirectBumpScale() const
634 {
635 return m_indirectBumpScale;
636 }
637
644 {
646 }
647
654 double reflectanceScale() const
655 {
656 return m_reflectScale;
657 }
658
665 {
667 }
668
675 double transmittanceScale() const
676 {
677 return m_transmitScale;
678 }
679
685 void setTwoSided(bool flag)
686 {
687 m_twoSided = flag;
688 }
689
695 bool twoSided() const
696 {
697 return m_twoSided;
698 }
699
706 {
708 }
709
717 {
718 return m_lumiMode;
719 }
720
726 void setLuminance(double value)
727 {
729 }
730
737 double luminance() const
738 {
739 return m_lumiVal;
740 }
741
750 {
752 m_normalMethod = method;
753 m_normalStrength = strength;
754 }
755
764 {
766 method = m_normalMethod;
767 strength = m_normalStrength;
768 }
769
776 {
778 }
779
787 {
788 return m_globIllum;
789 }
790
797 {
798 m_fgMode = mode;
799 }
800
808 {
809 return m_fgMode;
810 }
811
812 // BIM extensions
813
814
821 void setEmission(const OdGiMaterialColor& emissionColor, const OdGiMaterialMap& emissionMap)
822 {
823 m_emissionColor = emissionColor;
824 m_emissionMap = emissionMap;
825 }
826
833 void emission(OdGiMaterialColor& emissionColor, OdGiMaterialMap& emissionMap) const
834 {
835 emissionMap = m_emissionMap;
836 emissionColor = m_emissionColor;
837 }
838
844 void setTint(const OdGiMaterialColor& tintColor)
845 {
846 m_tintColor = tintColor;
847 }
848
854 void tint(OdGiMaterialColor& tintColor) const
855 {
856 tintColor = m_tintColor;
857 }
858
864 void setShadingAmbient(const OdGiMaterialColor& ambientColor)
865 {
866 m_shadingAmbientColor = ambientColor;
867 }
868
874 void shadingAmbient(OdGiMaterialColor& ambientColor) const
875 {
876 ambientColor = m_shadingAmbientColor;
877 }
878
884 void setShadingDiffuse(const OdGiMaterialColor& diffuseColor)
885 {
886 m_shadingDiffuseColor = diffuseColor;
887 }
888
894 void shadingDiffuse(OdGiMaterialColor& diffuseColor) const
895 {
896 diffuseColor = m_shadingDiffuseColor;
897 }
898
904 void setShadingSpecular(const OdGiMaterialColor& specularColor)
905 {
906 m_shadingSpeclrColor = specularColor;
907 }
908
914 void shadingSpecular(OdGiMaterialColor& specularColor) const
915 {
916 specularColor = m_shadingSpeclrColor;
917 }
918
924 void setShadingOpacity(double opacityPercentage)
925 {
926 m_shadingOpacity = opacityPercentage;
927 }
928
934 void shadingOpacity(double &opacityPercentage) const
935 {
936 opacityPercentage = m_shadingOpacity;
937 }
938
945 {
947 }
948
955 {
956 return m_diffuseColorMode;
957 }
958
959 // Visualize extensions
960
961 void setShadowsOpacityEffect(double shadowsOpacity, double nonShadowLightsMergeEffect)
962 {
963 m_shadowsOpacity = shadowsOpacity;
964 m_nslmEffect = nonShadowLightsMergeEffect;
965 }
966 double shadowsOpacityEffect(double &nonShadowLightsMergeEffect) const
967 {
968 nonShadowLightsMergeEffect = m_nslmEffect;
969 return m_shadowsOpacity;
970 }
971
972 void setSpecularHighlightingOverride(double overrideVal)
973 {
974 m_specularOverride = overrideVal;
975 }
977 {
978 return m_specularOverride;
979 }
980};
981
990{
991protected:
993public:
994 //ODRX_DECLARE_MEMBERS(OdGiMaterialTraitsTaker);
996
1000 void addRef() { }
1001
1005 void release() { }
1006
1011 virtual void ambient(OdGiMaterialColor& ambientColor) const
1012 {
1013 m_data.ambient(ambientColor);
1014 }
1015
1021 virtual void diffuse(OdGiMaterialColor& diffuseColor, OdGiMaterialMap& diffuseMap) const
1022 {
1023 m_data.diffuse(diffuseColor, diffuseMap);
1024 }
1025
1032 virtual void specular(OdGiMaterialColor& specularColor, OdGiMaterialMap& specularMap, double& glossFactor) const
1033 {
1034 m_data.specular(specularColor, specularMap, glossFactor);
1035 }
1036
1041 virtual void reflection(OdGiMaterialMap& reflectionMap) const
1042 {
1043 m_data.reflection(reflectionMap);
1044 }
1045
1051 virtual void opacity(double& opacityPercentage, OdGiMaterialMap& opacityMap) const
1052 {
1053 m_data.opacity(opacityPercentage, opacityMap);
1054 }
1055
1060 virtual void bump(OdGiMaterialMap& bumpMap) const
1061 {
1062 m_data.bump(bumpMap);
1063 }
1064
1070 virtual void refraction(double& refractionIndex, OdGiMaterialMap& refractionMap) const
1071 {
1072 m_data.refraction(refractionIndex, refractionMap);
1073 }
1074
1080 virtual double translucence() const
1081 {
1082 return m_data.translucence();
1083 }
1084
1090 virtual double selfIllumination() const
1091 {
1092 return m_data.selfIllumination();
1093 }
1094
1100 virtual double reflectivity() const
1101 {
1102 return m_data.reflectivity();
1103 }
1104
1111 {
1112 return m_data.illuminationModel();
1113 }
1114
1121 {
1122 return m_data.channelFlags();
1123 }
1124
1130 virtual Mode mode() const
1131 {
1132 return m_data.mode();
1133 }
1134
1143 virtual void setAmbient(const OdGiMaterialColor& ambientColor)
1144 {
1145 m_data.setAmbient(ambientColor);
1146 }
1147
1157 virtual void setDiffuse(const OdGiMaterialColor& diffuseColor, const OdGiMaterialMap& diffuseMap)
1158 {
1159 m_data.setDiffuse(diffuseColor, diffuseMap);
1160 }
1161
1172 virtual void setSpecular(const OdGiMaterialColor& specularColor, const OdGiMaterialMap& specularMap, double glossFactor)
1173 {
1174 m_data.setSpecular(specularColor, specularMap, glossFactor);
1175 }
1176
1185 virtual void setReflection(const OdGiMaterialMap& reflectionMap)
1186 {
1187 m_data.setReflection(reflectionMap);
1188 }
1189
1196 virtual void setOpacity(double opacityPercentage, const OdGiMaterialMap& opacityMap)
1197 {
1198 m_data.setOpacity(opacityPercentage, opacityMap);
1199 }
1200
1206 virtual void setBump(const OdGiMaterialMap& bumpMap)
1207 {
1208 m_data.setBump(bumpMap);
1209 }
1210
1217 virtual void setRefraction(double refractionIndex, const OdGiMaterialMap& refractionMap)
1218 {
1219 m_data.setRefraction(refractionIndex, refractionMap);
1220 }
1221
1227 virtual void setTranslucence(double value)
1228 {
1229 m_data.setTranslucence(value);
1230 }
1231
1237 virtual void setSelfIllumination(double value)
1238 {
1239 m_data.setSelfIllumination(value);
1240 }
1241
1247 virtual void setReflectivity(double value)
1248 {
1249 m_data.setReflectivity(value);
1250 }
1251
1258 {
1259 m_data.setIlluminationModel(model);
1260 }
1261
1267 virtual void setChannelFlags(ChannelFlags flags)
1268 {
1269 m_data.setChannelFlags(flags);
1270 }
1271
1277 virtual void setMode(Mode value)
1278 {
1279 m_data.setMode(value);
1280 }
1281
1287 virtual void setColorBleedScale(double scale)
1288 {
1289 m_data.setColorBleedScale(scale);
1290 }
1291
1298 virtual double colorBleedScale() const
1299 {
1300 return m_data.colorBleedScale();
1301 }
1302
1308 virtual void setIndirectBumpScale(double scale)
1309 {
1311 }
1312
1319 virtual double indirectBumpScale() const
1320 {
1321 return m_data.indirectBumpScale();
1322 }
1323
1329 virtual void setReflectanceScale(double scale)
1330 {
1331 m_data.setReflectanceScale(scale);
1332 }
1333
1340 virtual double reflectanceScale() const
1341 {
1342 return m_data.reflectanceScale();
1343 }
1344
1350 virtual void setTransmittanceScale(double scale)
1351 {
1353 }
1354
1361 virtual double transmittanceScale() const
1362 {
1363 return m_data.transmittanceScale();
1364 }
1365
1371 virtual void setTwoSided(bool flag)
1372 {
1373 m_data.setTwoSided(flag);
1374 }
1375
1381 virtual bool twoSided() const
1382 {
1383 return m_data.twoSided();
1384 }
1385
1392 {
1393 m_data.setLuminanceMode(mode);
1394 }
1395
1403 {
1404 return m_data.luminanceMode();
1405 }
1406
1412 virtual void setLuminance(double value)
1413 {
1414 m_data.setLuminance(value);
1415 }
1416
1423 virtual double luminance() const
1424 {
1425 return m_data.luminance();
1426 }
1427
1435 virtual void setNormalMap(const OdGiMaterialMap &normalMap, NormalMapMethod method, double strength)
1436 {
1437 m_data.setNormalMap(normalMap, method, strength);
1438 }
1439
1447 virtual void normalMap(OdGiMaterialMap &normalMap, NormalMapMethod &method, double &strength) const
1448 {
1449 m_data.normalMap(normalMap, method, strength);
1450 }
1451
1458 {
1459 m_data.setGlobalIllumination(mode);
1460 }
1461
1469 {
1470 return m_data.globalIllumination();
1471 }
1472
1479 {
1480 m_data.setFinalGather(mode);
1481 }
1482
1490 {
1491 return m_data.finalGather();
1492 }
1493
1500 virtual void setEmission(const OdGiMaterialColor& emissionColor, const OdGiMaterialMap& emissionMap)
1501 {
1502 m_data.setEmission(emissionColor, emissionMap);
1503 }
1504
1511 virtual void emission(OdGiMaterialColor& emissionColor, OdGiMaterialMap& emissionMap) const
1512 {
1513 m_data.emission(emissionColor, emissionMap);
1514 }
1515
1521 virtual void setTint(const OdGiMaterialColor& tintColor)
1522 {
1523 m_data.setTint(tintColor);
1524 }
1525
1531 virtual void tint(OdGiMaterialColor& tintColor) const
1532 {
1533 m_data.tint(tintColor);
1534 }
1535
1541 virtual void setShadingAmbient(const OdGiMaterialColor& ambientColor)
1542 {
1543 m_data.setShadingAmbient(ambientColor);
1544 }
1545
1551 virtual void shadingAmbient(OdGiMaterialColor& ambientColor) const
1552 {
1553 m_data.shadingAmbient(ambientColor);
1554 }
1555
1561 virtual void setShadingDiffuse(const OdGiMaterialColor& diffuseColor)
1562 {
1563 m_data.setShadingDiffuse(diffuseColor);
1564 }
1565
1571 virtual void shadingDiffuse(OdGiMaterialColor& diffuseColor) const
1572 {
1573 m_data.shadingDiffuse(diffuseColor);
1574 }
1575
1581 virtual void setShadingSpecular(const OdGiMaterialColor& specularColor)
1582 {
1583 m_data.setShadingSpecular(specularColor);
1584 }
1585
1591 virtual void shadingSpecular(OdGiMaterialColor& specularColor) const
1592 {
1593 m_data.shadingSpecular(specularColor);
1594 }
1595
1596
1602 virtual void setShadingOpacity(double opacityPercentage)
1603 {
1604 m_data.setShadingOpacity(opacityPercentage);
1605 }
1606
1612 virtual void shadingOpacity(double &opacityPercentage) const
1613 {
1614 m_data.shadingOpacity(opacityPercentage);
1615 }
1616
1622 virtual void setDiffuseColorMode(DiffuseColorMode diffuseColorMode)
1623 {
1624 m_data.setDiffuseColorMode(diffuseColorMode);
1625 }
1626
1633 {
1634 return m_data.diffuseColorMode();
1635 }
1636
1637virtual void setShadowsOpacityEffect(double effectPercentage, double nonShadowLightsMergeEffect)
1638 {
1639 m_data.setShadowsOpacityEffect(effectPercentage, nonShadowLightsMergeEffect);
1640 }
1641 virtual double shadowsOpacityEffect(double &nonShadowLightsMergeEffect) const
1642 {
1643 return m_data.shadowsOpacityEffect(nonShadowLightsMergeEffect);
1644 }
1645
1646 void setSpecularHighlightingOverride(double overrideVal)
1647 {
1648 m_data.setSpecularHighlightingOverride(overrideVal);
1649 }
1651 {
1652 return m_data.specularHighlightingOverride();
1653 } void getData(OdGiMaterialTraitsData& data) const { data = m_data; }
1657
1663 const OdGiMaterialTraitsData &getData() const { return m_data; }
1664
1665 void setData(const OdGiMaterialTraitsData& data) { m_data = data; }
1666};
1667
1672
1681{
1682public:
1684
1686
1690 void addRef() { }
1691
1695 void release() { }
1696
1697 void ambient(OdGiMaterialColor& /*ambientColor*/) const { }
1698 void diffuse(OdGiMaterialColor& /*diffuseColor*/, OdGiMaterialMap& /*diffuseMap*/) const { }
1699 void specular(OdGiMaterialColor& /*specularColor*/, OdGiMaterialMap& /*specularMap*/, double& /*glossFactor*/) const { }
1700 void reflection(OdGiMaterialMap& /*reflectionMap*/) const { }
1701 void opacity(double& /*opacityPercentage*/, OdGiMaterialMap& /*opacityMap*/) const { }
1702 void bump(OdGiMaterialMap& /*bumpMap*/) const { }
1703 void refraction(double& /*refractionIndex*/, OdGiMaterialMap& /*refractionMap*/) const { }
1704 double translucence() const { return 0.0; }
1705 double selfIllumination() const { return 0.0; }
1706 double reflectivity() const { return 0.0; }
1709 Mode mode() const { return kRealistic; }
1710
1711 void setAmbient(const OdGiMaterialColor& /*ambientColor*/) { }
1712 void setDiffuse(const OdGiMaterialColor& /*diffuseColor*/, const OdGiMaterialMap& /*diffuseMap*/) { }
1713 void setSpecular(const OdGiMaterialColor& /*specularColor*/, const OdGiMaterialMap& /*specularMap*/, double /*glossFactor*/) { }
1714 void setReflection(const OdGiMaterialMap& /*reflectionMap*/) { }
1715 void setOpacity(double /*opacityPercentage*/, const OdGiMaterialMap& /*opacityMap*/) { }
1716 void setBump(const OdGiMaterialMap& /*bumpMap*/) { }
1717 void setRefraction(double /*refractionIndex*/, const OdGiMaterialMap& /*refractionMap*/) { }
1718 void setTranslucence(double /*value*/) { }
1719 void setSelfIllumination(double /*value*/) { }
1720 void setReflectivity(double /*value*/) { }
1722 void setChannelFlags(ChannelFlags /*flags*/) { }
1723 void setMode(Mode /*value*/) { }
1724
1725 void setColorBleedScale(double /*scale*/) { }
1726 double colorBleedScale() const { return 0.0; }
1727
1728 void setIndirectBumpScale(double /*scale*/) { }
1729 double indirectBumpScale() const { return 0.0; }
1730
1731 void setReflectanceScale(double /*scale*/) { }
1732 double reflectanceScale() const { return 0.0; }
1733
1734 void setTransmittanceScale(double /*scale*/) { }
1735 double transmittanceScale() const { return 0.0; }
1736
1737 void setTwoSided(bool /*flag*/) { }
1738 bool twoSided() const { return true; }
1739
1742
1743 void setLuminance(double /*value*/) { }
1744 double luminance() const { return 0.0; }
1745
1746 void setNormalMap(const OdGiMaterialMap &/*normalMap*/, NormalMapMethod /*method*/, double /*strength*/) { }
1747 void normalMap(OdGiMaterialMap &/*normalMap*/, NormalMapMethod &/*method*/, double &/*strength*/) const { }
1748
1751
1754
1755 void setEmission(const OdGiMaterialColor& /*emissionColor*/, const OdGiMaterialMap& /*emissionMap*/) { }
1756 void emission(OdGiMaterialColor& /*emissionColor*/, OdGiMaterialMap& /*emissionMap*/) const { }
1757
1758 void setTint(const OdGiMaterialColor& /*tintColor*/) { }
1759 void tint(OdGiMaterialColor& /*tintColor*/) const { }
1760
1761 void setShadingAmbient(const OdGiMaterialColor& /*ambientColor*/) { }
1762 void shadingAmbient(OdGiMaterialColor& /*ambientColor*/) const { }
1763
1764 void setShadingDiffuse(const OdGiMaterialColor& /*diffuseColor*/) { }
1765 void shadingDiffuse(OdGiMaterialColor& /*diffuseColor*/) const { }
1766
1767 void setShadingSpecular(const OdGiMaterialColor& /*specularColor*/) { }
1768 void shadingSpecular(OdGiMaterialColor& /*specularColor*/) const { }
1769
1770 void setShadingOpacity(double /*opacityPercentage*/) { }
1771 void shadingOpacity(double& /*opacityPercentage*/) const { }
1772
1773 void setDiffuseColorMode(DiffuseColorMode /*diffuseColorMode*/) { }
1775
1776 void setShadowsOpacityEffect(double /*effectPercentage*/, double /*nonShadowLightsMergeEffect*/) { }
1777 double shadowsOpacityEffect(double& /*nonShadowLightsMergeEffect*/) const { return 1.0; }
1778
1779 void setSpecularHighlightingOverride(double /*overrideVal*/) { }
1780 double specularHighlightingOverride() const { return 0.0; }
1781};
1782
1787
1788#include "TD_PackPop.h"
1789
1790#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 setShadowsOpacityEffect(double, double)
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 setSpecularHighlightingOverride(double)
double shadowsOpacityEffect(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
double specularHighlightingOverride() 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:151
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)
const OdGiMaterialTraitsData & getData() const
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
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 setShadowsOpacityEffect(double effectPercentage, double nonShadowLightsMergeEffect)
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
void setSpecularHighlightingOverride(double overrideVal)
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
double specularHighlightingOverride() const
virtual double shadowsOpacityEffect(double &nonShadowLightsMergeEffect) 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
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
double shadowsOpacityEffect(double &nonShadowLightsMergeEffect) 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 setShadowsOpacityEffect(double shadowsOpacity, double nonShadowLightsMergeEffect)
void setReflection(const OdGiMaterialMap &reflectionMap)
OdGiMaterialColor m_shadingDiffuseColor
OdGiMaterialTraits::Mode mode() const
void setSpecularHighlightingOverride(double overrideVal)
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)
double specularHighlightingOverride() const
void normalMap(OdGiMaterialMap &normalMap, OdGiMaterialTraits::NormalMapMethod &method, double &strength) const
void emission(OdGiMaterialColor &emissionColor, OdGiMaterialMap &emissionMap) const
bool operator!=(const OdGiMaterialTraitsData &other) const