CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GiLightTraits.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 __OD_GI_LIGHT_TRAITS__
25#define __OD_GI_LIGHT_TRAITS__
26
27#include "TD_PackPush.h"
28
29#include "OdaDefs.h"
30#include "Gi/Gi.h"
31#include "GiDrawable.h"
32#include "OdString.h"
33#include "Ge/GeVector3d.h"
34#include "Gs/GsFiler.h"
35
43{
44public:
46
52 virtual void setOn(bool on) = 0;
53
60 virtual bool isOn() const = 0;
61};
62
67
73{
74 double red, green, blue;
75
79 OdGiColorRGB() : red(0.0), green(0.0), blue(0.0) { }
80
88 OdGiColorRGB(double _red, double _green, double _blue) : red(_red), green(_green), blue(_blue) { }
89
90 friend OdGiColorRGB operator +(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
91 {
92 return OdGiColorRGB(c1.red + c2.red, c1.green + c2.green, c1.blue + c2.blue);
93 }
94 friend OdGiColorRGB operator +(const OdGiColorRGB &c, double s)
95 {
96 return OdGiColorRGB(c.red + s, c.green + s, c.blue + s);
97 }
98 friend OdGiColorRGB operator +(double s, const OdGiColorRGB &c)
99 {
100 return OdGiColorRGB(s + c.red, s + c.green, s + c.blue);
101 }
102
104 {
105 return OdGiColorRGB(c1.red - c2.red, c1.green - c2.green, c1.blue - c2.blue);
106 }
107 friend OdGiColorRGB operator -(const OdGiColorRGB &c, double s)
108 {
109 return OdGiColorRGB(c.red - s, c.green - s, c.blue - s);
110 }
111 friend OdGiColorRGB operator -(double s, const OdGiColorRGB &c)
112 {
113 return OdGiColorRGB(s - c.red, s - c.green, s - c.blue);
114 }
115
117 {
118 return OdGiColorRGB(c1.red * c2.red, c1.green * c2.green, c1.blue * c2.blue);
119 }
120 friend OdGiColorRGB operator *(const OdGiColorRGB &c, double s)
121 {
122 return OdGiColorRGB(c.red * s, c.green * s, c.blue * s);
123 }
124 friend OdGiColorRGB operator *(double s, const OdGiColorRGB &c)
125 {
126 return OdGiColorRGB(s * c.red, s * c.green, s * c.blue);
127 }
128
130 {
131 return OdGiColorRGB(c1.red / c2.red, c1.green / c2.green, c1.blue / c2.blue);
132 }
133 friend OdGiColorRGB operator /(const OdGiColorRGB &c, double s)
134 {
135 return OdGiColorRGB(c.red / s, c.green / s, c.blue / s);
136 }
137 friend OdGiColorRGB operator /(double s, const OdGiColorRGB &c)
138 {
139 return OdGiColorRGB(s / c.red, s / c.green, s / c.blue);
140 }
141};
142
150{
151public:
170
177
187
196 bool operator ==(const OdGiShadowParameters &parms) const;
197
206 bool operator !=(const OdGiShadowParameters &parms) const;
207
212 {
219 };
220
234 kSphere
235 };
236
242 void setShadowsOn(bool on);
243
250 bool shadowsOn() const;
251
252
253
259 void setShadowType(ShadowType typ);
260
267 ShadowType shadowType() const;
268
269
270
280 bool setShadowMapSize(OdUInt16 sz);
281
292 OdUInt16 shadowMapSize() const;
293
294
295
305 bool setShadowMapSoftness(OdUInt8 soft);
306
314
315
328 bool setShadowSamples(OdUInt16 nSamples);
329
340 OdUInt16 shadowSamples() const;
341
342
343
349 void setShapeVisibility(bool bVisibility);
350
357 bool shapeVisibility() const;
358
359
360
370
378
379
380
390 bool setExtendedLightLength(double dLength);
391
398 double extendedLightLength() const;
399
400
401
411 bool setExtendedLightWidth(double dWidth);
412
419 double extendedLightWidth() const;
420
421
422
435 bool setExtendedLightRadius(double dRadius);
436
443 double extendedLightRadius() const;
444
445
446
452 inline void save(OdGsFiler * pFiler) const {
453 pFiler->wrBool(shadowsOn());
454 pFiler->wrUInt8((OdUInt8)shadowType());
455 pFiler->wrUInt16(shadowMapSize());
456 pFiler->wrUInt8(shadowMapSoftness());
457 pFiler->wrBool(shapeVisibility());
459 pFiler->wrDouble(extendedLightLength());
460 pFiler->wrDouble(extendedLightWidth());
461 pFiler->wrDouble(extendedLightRadius());
462 }
463
469 inline void load(OdGsFiler * pFiler) {
470 setShadowsOn(pFiler->rdBool());
471 setShadowType((ShadowType)pFiler->rdUInt8());
472 setShadowMapSize(pFiler->rdUInt16());
473 setShadowMapSoftness(pFiler->rdUInt8());
474 setShapeVisibility(pFiler->rdBool());
479 }
480
481
482private:
483 bool m_bShadowsOn;
484 OdUInt8 m_shadowMapSoftness;
485 bool m_bShapeVisible;
486 ShadowType m_shadowType;
487 OdUInt16 m_shadowMapSize;
488 OdUInt16 m_shadowSamples;
489 ExtendedLightShape m_lightShape;
490 double m_lightLength;
491 double m_lightWidth;
492 double m_lightRadius;
493};
494
496 : m_bShadowsOn(true)
497 , m_shadowMapSoftness(1)
498 , m_bShapeVisible(false)
499 , m_shadowType(OdGiShadowParameters::kShadowsRayTraced)
500 , m_shadowMapSize(256)
501 , m_shadowSamples(16)
502 , m_lightShape(kSphere)
503 , m_lightLength(0.0)
504 , m_lightWidth(0.0)
505 , m_lightRadius(0.0)
506{
507}
508
510 : m_bShadowsOn(parms.m_bShadowsOn)
511 , m_shadowMapSoftness(parms.m_shadowMapSoftness)
512 , m_bShapeVisible(parms.m_bShapeVisible)
513 , m_shadowType(parms.m_shadowType)
514 , m_shadowMapSize(parms.m_shadowMapSize)
515 , m_shadowSamples(parms.m_shadowSamples)
516 , m_lightShape(parms.m_lightShape)
517 , m_lightLength(parms.m_lightLength)
518 , m_lightWidth(parms.m_lightWidth)
519 , m_lightRadius(parms.m_lightRadius)
520{
521}
522
524{
525 m_bShadowsOn = parms.m_bShadowsOn;
526 m_shadowType = parms.m_shadowType;
527 m_shadowMapSize = parms.m_shadowMapSize;
528 m_shadowMapSoftness = parms.m_shadowMapSoftness;
529 m_shadowSamples = parms.m_shadowSamples;
530 m_bShapeVisible = parms.m_bShapeVisible;
531 m_lightShape = parms.m_lightShape;
532 m_lightLength = parms.m_lightLength;
533 m_lightWidth = parms.m_lightWidth;
534 m_lightRadius = parms.m_lightRadius;
535 return *this;
536}
537
539{
540 return (m_bShadowsOn == parms.m_bShadowsOn) &&
541 (m_shadowType == parms.m_shadowType) &&
542 (m_shadowMapSize == parms.m_shadowMapSize) &&
543 (m_shadowMapSoftness == parms.m_shadowMapSoftness) &&
544 (m_shadowSamples == parms.m_shadowSamples) &&
545 (m_bShapeVisible == parms.m_bShapeVisible) &&
546 (m_lightShape == parms.m_lightShape) &&
547 OdEqual(m_lightLength , parms.m_lightLength) &&
548 OdEqual(m_lightWidth , parms.m_lightWidth) &&
549 OdEqual(m_lightRadius , parms.m_lightRadius);
550}
551
553{
554 return (m_bShadowsOn != parms.m_bShadowsOn) ||
555 (m_shadowType != parms.m_shadowType) ||
556 (m_shadowMapSize != parms.m_shadowMapSize) ||
557 (m_shadowMapSoftness != parms.m_shadowMapSoftness) ||
558 (m_shadowSamples != parms.m_shadowSamples) ||
559 (m_bShapeVisible != parms.m_bShapeVisible) ||
560 (m_lightShape != parms.m_lightShape) ||
561 !OdEqual(m_lightLength, parms.m_lightLength) ||
562 !OdEqual(m_lightWidth , parms.m_lightWidth) ||
563 !OdEqual(m_lightRadius, parms.m_lightRadius);
564}
565
567{
568 m_bShadowsOn = on;
569}
570
572{
573 return m_bShadowsOn;
574}
575
577{
578 m_shadowType = typ;
579}
580
582{
583 return m_shadowType;
584}
585
587{
588 if((sz & (sz-1)) == 0 && sz >= 64 && sz <= 4096) // valid values are 64, 128, 256, 512, 1024, 2048, and 4096
589 {
590 m_shadowMapSize = sz;
591 return true;
592 }
593 else
594 {
595 return false;
596 }
597}
598
600{
601 return m_shadowMapSize;
602}
603
605{
606 m_shadowMapSoftness = soft;
607 return true;
608}
609
611{
612 return m_shadowMapSoftness;
613}
614
616{
617 m_shadowSamples = nSamples;
618 return true;
619}
620
622{
623 return m_shadowSamples;
624}
625
626inline void OdGiShadowParameters::setShapeVisibility(bool bVisibility)
627{
628 m_bShapeVisible = bVisibility;
629}
630
632{
633 return m_bShapeVisible;
634}
635
637{
638 m_lightShape = lightShape;
639}
640
642{
643 return m_lightShape;
644}
645
647{
648 m_lightLength = dLength;
649 return true;
650}
651
653{
654 return m_lightLength;
655}
656
658{
659 m_lightWidth = dWidth;
660 return true;
661}
662
664{
665 return m_lightWidth;
666}
667
669{
670 m_lightRadius = dRadius;
671 return true;
672}
673
675{
676 return m_lightRadius;
677}
678
688{
689public:
702
705 {
707 kNone = 0,
712 };
713
714
715
722
730
731
732
738 void setUseLimits(bool on);
739
746 bool useLimits() const;
747
748
749
756 void setLimits(double startlim, double endlim);
757
767 double startLimit() const;
768
778 double endLimit() const;
779
780
781
787 void save(OdGsFiler *pFiler) const;
788
794 void load(OdGsFiler *pFiler);
795
802 bool operator ==(const OdGiLightAttenuation &other) const;
803
810 bool operator !=(const OdGiLightAttenuation &other) const;
811
812private:
813 AttenuationType m_attenType;
814 bool m_bUseAttenLimits;
815 double m_dAttenStartLimit;
816 double m_dAttenEndLimit;
817};
818
820: m_attenType(OdGiLightAttenuation::kNone)
821, m_bUseAttenLimits(false)
822, m_dAttenStartLimit(1.0)
823, m_dAttenEndLimit(10.0)
824{
825}
826
828{
829 m_attenType = typ;
830}
831
833{
834 return m_attenType;
835}
836
838{
839 m_bUseAttenLimits = on;
840}
841
843{
844 return m_bUseAttenLimits;
845}
846
847inline void OdGiLightAttenuation::setLimits(double startlim, double endlim)
848{
849 m_dAttenStartLimit = startlim;
850 m_dAttenEndLimit = endlim;
851}
852
854{
855 return m_dAttenStartLimit;
856}
857
859{
860 return m_dAttenEndLimit;
861}
862
863inline void OdGiLightAttenuation::save(OdGsFiler * pFiler) const {
864 pFiler->wrUInt8(OdUInt8(m_attenType));
865 pFiler->wrBool(m_bUseAttenLimits);
866 pFiler->wrDouble(m_dAttenStartLimit);
867 pFiler->wrDouble(m_dAttenEndLimit);
868}
869
871 m_attenType = AttenuationType(pFiler->rdUInt8());
872 m_bUseAttenLimits = pFiler->rdBool();
873 m_dAttenStartLimit = pFiler->rdDouble();
874 m_dAttenEndLimit = pFiler->rdDouble();
875}
876
878{
879 return (m_attenType == other.m_attenType) &&
880 (m_bUseAttenLimits == other.m_bUseAttenLimits) &&
881 (m_dAttenStartLimit == other.m_dAttenStartLimit) &&
882 (m_dAttenEndLimit == other.m_dAttenEndLimit);
883 }
884
886{
887 return (m_attenType != other.m_attenType) ||
888 (m_bUseAttenLimits != other.m_bUseAttenLimits) ||
889 (m_dAttenStartLimit != other.m_dAttenStartLimit) ||
890 (m_dAttenEndLimit != other.m_dAttenEndLimit);
891}
892
902{
903public:
928
937 bool operator==(const OdGiSkyParameters& params) const;
938
939
940
946 void setIllumination(bool enable);
947
954 bool illumination() const;
955
956
957
963 void setIntensityFactor(double intensity);
964
971 double intensityFactor() const;
972
973
974
980 void setHaze(double haze);
981
988 double haze() const;
989
990
991
997 void setHorizonHeight(double height);
998
1005 double horizonHeight() const;
1006
1007
1008
1014 void setHorizonBlur(double blur);
1015
1022 double horizonBlur() const;
1023
1024
1025
1031 void setGroundColor(const OdCmEntityColor& color);
1032
1040
1041
1042
1048 void setNightColor(const OdCmEntityColor& color);
1049
1057
1058
1059
1065 void setAerialPerspective(bool apply);
1066
1073 bool aerialPerspective() const;
1074
1075
1081 void setVisibilityDistance(double distance);
1082
1089 double visibilityDistance() const;
1090
1091
1092
1098 void setDiskScale(double scale);
1099
1106 double diskScale() const;
1107
1108
1109
1115 void setGlowIntensity(double intensity);
1116
1123 double glowIntensity() const;
1124
1125
1126
1132 void setDiskIntensity(double intensity);
1133
1140 double diskIntensity() const;
1141
1142
1143
1149 void setSolarDiskSamples(OdUInt16 samples);
1150
1157 OdUInt16 solarDiskSamples() const;
1158
1159
1160
1166 void setSunDirection(const OdGeVector3d& sundir);
1167
1174 const OdGeVector3d& sunDirection() const;
1175
1176
1177
1183 void setRedBlueShift(double redBlueShift);
1184
1191 double redBlueShift() const;
1192
1193
1194
1200 void setSaturation(double saturation);
1201
1208 double saturation() const;
1209private:
1210 bool m_status;
1211 double m_intensityFactor;
1212 double m_haze;
1213 double m_horizonHeight;
1214 double m_horizonBlur;
1215 OdCmEntityColor m_groundColor;
1216 OdCmEntityColor m_nightColor;
1217 bool m_aerialPerspective;
1218 double m_visibilityDistance;
1219 double m_diskScale;
1220 double m_glowIntensity;
1221 double m_diskIntensity;
1222 OdUInt16 m_solarDiskSamples;
1223 OdGeVector3d m_sunDirection;
1224 double m_redBlueShift;
1225 double m_saturation;
1226};
1227
1229: m_status(false)
1230, m_intensityFactor(1.0)
1231, m_haze(0.0)
1232, m_horizonHeight(0.0)
1233, m_horizonBlur(0.1)
1234, m_aerialPerspective(false)
1235, m_visibilityDistance(10000.0)
1236, m_diskScale(4.0)
1237, m_glowIntensity(1.0)
1238, m_diskIntensity(1.0)
1239, m_solarDiskSamples(8)
1240, m_redBlueShift(0.0)
1241, m_saturation(1.0)
1242{
1243 m_groundColor.setColor(0xc2808080);
1244 m_nightColor.setColor(0xc2010205);
1245 m_sunDirection.set(0.35, 1.0, -0.25);
1246}
1247
1249{
1250 if (m_status != params.m_status) return false;
1251 if (m_intensityFactor != params.m_intensityFactor) return false;
1252 if (m_haze != params.m_haze) return false;
1253 if (m_horizonHeight != params.m_horizonHeight) return false;
1254 if (m_horizonBlur != params.m_horizonBlur) return false;
1255 if (m_groundColor != params.m_groundColor) return false;
1256 if (m_nightColor != params.m_nightColor) return false;
1257 if (m_aerialPerspective != params.m_aerialPerspective) return false;
1258 if (m_visibilityDistance != params.m_visibilityDistance) return false;
1259 if (m_diskScale != params.m_diskScale) return false;
1260 if (m_glowIntensity != params.m_glowIntensity) return false;
1261 if (m_diskIntensity != params.m_diskIntensity) return false;
1262 if (m_solarDiskSamples != params.m_solarDiskSamples) return false;
1263 if (m_sunDirection != params.m_sunDirection) return false;
1264 if (m_redBlueShift != params.m_redBlueShift) return false;
1265 if (m_saturation != params.m_saturation) return false;
1266 return true;
1267}
1268
1270{
1271 m_status = enable;
1272}
1274{
1275 return m_status;
1276}
1277inline void OdGiSkyParameters::setIntensityFactor(double intensity)
1278{
1279 m_intensityFactor = intensity;
1280}
1282{
1283 return m_intensityFactor;
1284}
1285inline void OdGiSkyParameters::setHaze(double haze)
1286{
1287 m_haze = haze;
1288}
1289inline double OdGiSkyParameters::haze() const
1290{
1291 return m_haze;
1292}
1294{
1295 m_horizonHeight = height;
1296}
1298{
1299 return m_horizonHeight;
1300}
1302{
1303 m_horizonBlur = blur;
1304}
1306{
1307 return m_horizonBlur;
1308}
1310{
1311 m_groundColor = color;
1312}
1314{
1315 return m_groundColor;
1316}
1318{
1319 m_nightColor = color;
1320}
1322{
1323 return m_nightColor;
1324}
1326{
1327 m_aerialPerspective = apply;
1328}
1330{
1331 return m_aerialPerspective;
1332}
1334{
1335 m_visibilityDistance = distance;
1336}
1338{
1339 return m_visibilityDistance;
1340}
1342{
1343 m_diskScale = scale;
1344}
1345inline double OdGiSkyParameters::diskScale() const
1346{
1347 return m_diskScale;
1348}
1349inline void OdGiSkyParameters::setGlowIntensity(double intensity)
1350{
1351 m_glowIntensity = intensity;
1352}
1354{
1355 return m_glowIntensity;
1356}
1357inline void OdGiSkyParameters::setDiskIntensity(double intensity)
1358{
1359 m_diskIntensity = intensity;
1360}
1362{
1363 return m_diskIntensity;
1364}
1366{
1367 m_solarDiskSamples = samples;
1368}
1370{
1371 return m_solarDiskSamples;
1372}
1374{
1375 m_sunDirection = sundir;
1376}
1378{
1379 return m_sunDirection;
1380}
1381inline void OdGiSkyParameters::setRedBlueShift(double redBlueShift)
1382{
1383 m_redBlueShift = redBlueShift;
1384}
1386{
1387 return m_redBlueShift;
1388}
1389inline void OdGiSkyParameters::setSaturation(double saturation)
1390{
1391 m_saturation = saturation;
1392}
1394{
1395 return m_saturation;
1396}
1397
1407{
1408public:
1410
1416 virtual void setIntensity(double inten) = 0;
1417
1424 virtual double intensity() const = 0;
1425
1426
1427
1433 virtual void setLightColor(const OdCmEntityColor& color) = 0;
1434
1441 virtual OdCmEntityColor lightColor() const = 0;
1442
1443
1444
1451
1459};
1460
1465
1475{
1476public:
1478
1484 virtual void setPosition(const OdGePoint3d& pos) = 0;
1485
1492 virtual OdGePoint3d position() const = 0;
1493
1494
1495
1503
1509 virtual void setAttenuation(const OdGiLightAttenuation& atten) = 0;
1510
1511
1512
1518 virtual void setPhysicalIntensity(double fIntensity) = 0;
1519
1526 virtual double physicalIntensity() const = 0;
1527
1528
1529
1535 virtual void setLampColor(const OdGiColorRGB& color) = 0;
1536
1543 virtual OdGiColorRGB lampColor() const = 0;
1544
1545
1546
1552 virtual void setHasTarget(bool bTarget) = 0;
1553
1560 virtual bool hasTarget() const = 0;
1561
1562
1563
1569 virtual void setTargetLocation(const OdGePoint3d &loc) = 0;
1570
1577 virtual OdGePoint3d targetLocation() const = 0;
1578
1579
1580
1581 virtual void setHemisphericalDistribution(bool bHemisphere) = 0;
1582 virtual bool hemisphericalDistribution() const = 0;
1583};
1584
1589
1590
1599{
1600public:
1602
1608 virtual void setPosition(const OdGePoint3d& pos) = 0;
1609
1616 virtual OdGePoint3d position() const = 0;
1617
1618
1619
1625 virtual void setTargetLocation(const OdGePoint3d& loc) = 0;
1626
1633 virtual OdGePoint3d targetLocation() const = 0;
1634
1635
1636
1643 virtual bool setHotspotAndFalloff(double hotspot, double falloff) = 0;
1644
1651 virtual double hotspot() const = 0;
1652
1659 virtual double falloff() const = 0;
1660
1661
1662
1670
1676 virtual void setAttenuation(const OdGiLightAttenuation& atten) = 0;
1677
1678
1679
1685 virtual void setPhysicalIntensity(double fIntensity) = 0;
1686
1693 virtual double physicalIntensity() const = 0;
1694
1695
1696
1702 virtual void setLampColor(const OdGiColorRGB& color) = 0;
1703
1710 virtual OdGiColorRGB lampColor() const = 0;
1711};
1712
1717
1718
1727{
1728public:
1730
1736 virtual void setLightDirection(const OdGeVector3d& vec) = 0;
1737
1744 virtual OdGeVector3d lightDirection() const = 0;
1745
1746
1747
1753 virtual void setIsSunlight(bool isSunlight) = 0;
1754
1761 virtual bool isSunlight() const = 0;
1762
1763
1764
1770 virtual void setPhysicalIntensity(double fIntensity) = 0;
1771
1778 virtual double physicalIntensity() const = 0;
1779
1780
1781
1787 virtual void setLampColor(const OdGiColorRGB& color) = 0;
1788
1795 virtual OdGiColorRGB lampColor() const = 0;
1796
1797
1798
1805
1812 virtual void skyParameters(OdGiSkyParameters &params) const = 0;
1813};
1814
1819
1826{
1827public:
1829
1831 {
1832 kTypeA = 3,
1833 kTypeB = 2,
1834 kTypeC = 1
1836
1838 {
1839 kNoSymmetry = 0,
1842 kAxialSymmetry
1844
1845 virtual void setWebFile(const OdString &fileName) = 0;
1846 virtual OdString webFile() const = 0;
1847
1848 virtual void setWebRotation(OdGeVector3d fRot) = 0;
1849 virtual OdGeVector3d webRotation() const = 0;
1850
1851 virtual void setWebFlux(double fFlux) = 0;
1852 virtual double webFlux() const = 0;
1853
1855 virtual WebFileType webFileType() const = 0;
1856
1857 virtual void setWebSymmetry(WebSymmetry sym) = 0;
1858 virtual WebSymmetry webSymmetry() const = 0;
1859
1860 virtual void setWebHorzAng90to270(bool bFlag) = 0;
1861 virtual bool webHorzAng90to270() const = 0;
1862};
1863
1868
1869
1875{
1876public:
1878 // returned via subSetAttributes()
1879 enum
1880 {
1881 kVpDep = (OdGiDrawable::kLastFlag << 1)
1883 //
1884 virtual OdUInt32 viewportId() const = 0;
1885 virtual OdDbStub* viewportObjectId() const = 0;
1886 //
1887 virtual void setOn(bool on) = 0;
1888 virtual bool isOn() const = 0;
1889 //
1890 virtual void setDimming(double dim) = 0;
1891 virtual double dimming() const = 0;
1892};
1893
1898
1899#include "TD_PackPop.h"
1900
1901#endif // __OD_GI_LIGHT_TRAITS__
true
Definition: DimVarDefs.h:2046
scale
Definition: DimVarDefs.h:1684
false
Definition: DimVarDefs.h:165
OdSmartPtr< OdGiLightTraitsVpDep > OdGiLightTraitsVpDepPtr
OdSmartPtr< OdGiPointLightTraits > OdGiPointLightTraitsPtr
OdSmartPtr< OdGiWebLightTraits > OdGiWebLightTraitsPtr
OdSmartPtr< OdGiStandardLightTraits > OdGiStandardLightTraitsPtr
OdSmartPtr< OdGiSpotLightTraits > OdGiSpotLightTraitsPtr
OdSmartPtr< OdGiDistantLightTraits > OdGiDistantLightTraitsPtr
OdSmartPtr< OdGiLightTraits > OdGiLightTraitsPtr
Definition: GiLightTraits.h:66
unsigned int OdUInt32
unsigned short OdUInt16
unsigned char OdUInt8
bool OdEqual(double x, double y, double tol=1.e-10)
Definition: OdaDefs.h:542
#define FIRSTDLL_EXPORT
Definition: RootExport.h:39
void setColor(OdUInt32 color)
OdGeVector3d & set(double xx, double yy, double zz)
Definition: GeVector3d.h:725
virtual OdGiColorRGB lampColor() const =0
virtual void skyParameters(OdGiSkyParameters &params) const =0
virtual void setLightDirection(const OdGeVector3d &vec)=0
virtual bool isSunlight() const =0
virtual void setSkyParameters(const OdGiSkyParameters &params)=0
virtual void setLampColor(const OdGiColorRGB &color)=0
virtual void setPhysicalIntensity(double fIntensity)=0
virtual void setIsSunlight(bool isSunlight)=0
ODRX_DECLARE_MEMBERS(OdGiDistantLightTraits)
virtual double physicalIntensity() const =0
virtual OdGeVector3d lightDirection() const =0
void save(OdGsFiler *pFiler) const
double startLimit() const
AttenuationType attenuationType() const
bool operator==(const OdGiLightAttenuation &other) const
void setUseLimits(bool on)
void load(OdGsFiler *pFiler)
bool operator!=(const OdGiLightAttenuation &other) const
void setAttenuationType(AttenuationType typ)
double endLimit() const
void setLimits(double startlim, double endlim)
bool useLimits() const
virtual void setOn(bool on)=0
ODRX_DECLARE_MEMBERS(OdGiLightTraits)
virtual bool isOn() const =0
virtual double dimming() const =0
virtual void setDimming(double dim)=0
virtual OdDbStub * viewportObjectId() const =0
virtual bool isOn() const =0
virtual OdUInt32 viewportId() const =0
ODRX_DECLARE_MEMBERS(OdGiLightTraitsVpDep)
virtual void setOn(bool on)=0
virtual void setPosition(const OdGePoint3d &pos)=0
virtual OdGePoint3d targetLocation() const =0
virtual OdGePoint3d position() const =0
ODRX_DECLARE_MEMBERS(OdGiPointLightTraits)
virtual void setLampColor(const OdGiColorRGB &color)=0
virtual void setAttenuation(const OdGiLightAttenuation &atten)=0
virtual double physicalIntensity() const =0
virtual void setHemisphericalDistribution(bool bHemisphere)=0
virtual bool hasTarget() const =0
virtual void setPhysicalIntensity(double fIntensity)=0
virtual bool hemisphericalDistribution() const =0
virtual void setTargetLocation(const OdGePoint3d &loc)=0
virtual void setHasTarget(bool bTarget)=0
virtual OdGiLightAttenuation lightAttenuation() const =0
virtual OdGiColorRGB lampColor() const =0
bool setShadowSamples(OdUInt16 nSamples)
bool shadowsOn() const
double extendedLightWidth() const
void save(OdGsFiler *pFiler) const
OdUInt16 shadowMapSize() const
OdGiShadowParameters & operator=(const OdGiShadowParameters &parms)
double extendedLightLength() const
ShadowType shadowType() const
void setShapeVisibility(bool bVisibility)
bool setExtendedLightWidth(double dWidth)
ExtendedLightShape extendedLightShape() const
double extendedLightRadius() const
OdUInt8 shadowMapSoftness() const
bool shapeVisibility() const
void load(OdGsFiler *pFiler)
void setShadowType(ShadowType typ)
bool setExtendedLightLength(double dLength)
void setShadowsOn(bool on)
bool setShadowMapSize(OdUInt16 sz)
bool setShadowMapSoftness(OdUInt8 soft)
OdUInt16 shadowSamples() const
bool operator!=(const OdGiShadowParameters &parms) const
bool setExtendedLightRadius(double dRadius)
bool operator==(const OdGiShadowParameters &parms) const
void setExtendedLightShape(ExtendedLightShape lightShape)
void setRedBlueShift(double redBlueShift)
void setNightColor(const OdCmEntityColor &color)
void setSolarDiskSamples(OdUInt16 samples)
void setIntensityFactor(double intensity)
double diskIntensity() const
double visibilityDistance() const
double haze() const
double saturation() const
double horizonHeight() const
void setHorizonBlur(double blur)
OdCmEntityColor nightColor() const
bool aerialPerspective() const
void setDiskIntensity(double intensity)
void setGlowIntensity(double intensity)
bool operator==(const OdGiSkyParameters &params) const
double glowIntensity() const
void setSunDirection(const OdGeVector3d &sundir)
void setAerialPerspective(bool apply)
void setSaturation(double saturation)
double horizonBlur() const
OdCmEntityColor groundColor() const
OdUInt16 solarDiskSamples() const
void setIllumination(bool enable)
double diskScale() const
void setGroundColor(const OdCmEntityColor &color)
void setHaze(double haze)
void setDiskScale(double scale)
bool illumination() const
void setVisibilityDistance(double distance)
void setHorizonHeight(double height)
double redBlueShift() const
double intensityFactor() const
const OdGeVector3d & sunDirection() const
virtual double hotspot() const =0
ODRX_DECLARE_MEMBERS(OdGiSpotLightTraits)
virtual void setPhysicalIntensity(double fIntensity)=0
virtual OdGiColorRGB lampColor() const =0
virtual bool setHotspotAndFalloff(double hotspot, double falloff)=0
virtual OdGePoint3d position() const =0
virtual OdGiLightAttenuation lightAttenuation() const =0
virtual void setTargetLocation(const OdGePoint3d &loc)=0
virtual void setAttenuation(const OdGiLightAttenuation &atten)=0
virtual void setLampColor(const OdGiColorRGB &color)=0
virtual OdGePoint3d targetLocation() const =0
virtual double falloff() const =0
virtual void setPosition(const OdGePoint3d &pos)=0
virtual double physicalIntensity() const =0
virtual double intensity() const =0
virtual OdGiShadowParameters shadowParameters() const =0
ODRX_DECLARE_MEMBERS(OdGiStandardLightTraits)
virtual OdCmEntityColor lightColor() const =0
virtual void setIntensity(double inten)=0
virtual void setLightColor(const OdCmEntityColor &color)=0
virtual void setShadowParameters(const OdGiShadowParameters &params)=0
virtual void setWebFlux(double fFlux)=0
virtual OdString webFile() const =0
virtual void setWebFileType(WebFileType type)=0
virtual double webFlux() const =0
ODRX_DECLARE_MEMBERS(OdGiWebLightTraits)
virtual WebFileType webFileType() const =0
virtual void setWebSymmetry(WebSymmetry sym)=0
virtual OdGeVector3d webRotation() const =0
virtual void setWebHorzAng90to270(bool bFlag)=0
virtual void setWebRotation(OdGeVector3d fRot)=0
virtual void setWebFile(const OdString &fileName)=0
virtual WebSymmetry webSymmetry() const =0
virtual bool webHorzAng90to270() const =0
virtual void wrDouble(double val)
virtual void wrUInt16(OdUInt16 val)
virtual OdUInt8 rdUInt8() const
virtual void wrUInt8(OdUInt8 val)
virtual bool rdBool() const
virtual void wrBool(bool bVal)
virtual OdUInt16 rdUInt16() const
virtual double rdDouble() const
GLenum GLint * params
Definition: gles2_ext.h:184
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
GLfloat GLfloat blue
Definition: gles2_ext.h:147
GLint GLenum GLsizei GLsizei height
Definition: gles2_ext.h:110
GLfloat green
Definition: gles2_ext.h:147
friend OdGiColorRGB operator+(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
Definition: GiLightTraits.h:90
friend OdGiColorRGB operator*(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
OdGiColorRGB(double _red, double _green, double _blue)
Definition: GiLightTraits.h:88
friend OdGiColorRGB operator/(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
friend OdGiColorRGB operator-(const OdGiColorRGB &c1, const OdGiColorRGB &c2)