CFx SDK Documentation  2020SP3
GiLightTraits.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef __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 
41 {
42 public:
44 
45  virtual void setOn(bool on) = 0;
46  virtual bool isOn() const = 0;
47 };
48 
50 
56 {
57  double red, green, blue;
58 
59  OdGiColorRGB() : red(0.0), green(0.0), blue(0.0) { }
60  OdGiColorRGB(double _red, double _green, double _blue) : red(_red), green(_green), blue(_blue) { }
61 
62  friend OdGiColorRGB operator +(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
63  {
64  return OdGiColorRGB(c1.red + c2.red, c1.green + c2.green, c1.blue + c2.blue);
65  }
66  friend OdGiColorRGB operator +(const OdGiColorRGB &c, double s)
67  {
68  return OdGiColorRGB(c.red + s, c.green + s, c.blue + s);
69  }
70  friend OdGiColorRGB operator +(double s, const OdGiColorRGB &c)
71  {
72  return OdGiColorRGB(s + c.red, s + c.green, s + c.blue);
73  }
74 
75  friend OdGiColorRGB operator -(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
76  {
77  return OdGiColorRGB(c1.red - c2.red, c1.green - c2.green, c1.blue - c2.blue);
78  }
79  friend OdGiColorRGB operator -(const OdGiColorRGB &c, double s)
80  {
81  return OdGiColorRGB(c.red - s, c.green - s, c.blue - s);
82  }
83  friend OdGiColorRGB operator -(double s, const OdGiColorRGB &c)
84  {
85  return OdGiColorRGB(s - c.red, s - c.green, s - c.blue);
86  }
87 
88  friend OdGiColorRGB operator *(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
89  {
90  return OdGiColorRGB(c1.red * c2.red, c1.green * c2.green, c1.blue * c2.blue);
91  }
92  friend OdGiColorRGB operator *(const OdGiColorRGB &c, double s)
93  {
94  return OdGiColorRGB(c.red * s, c.green * s, c.blue * s);
95  }
96  friend OdGiColorRGB operator *(double s, const OdGiColorRGB &c)
97  {
98  return OdGiColorRGB(s * c.red, s * c.green, s * c.blue);
99  }
100 
101  friend OdGiColorRGB operator /(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
102  {
103  return OdGiColorRGB(c1.red / c2.red, c1.green / c2.green, c1.blue / c2.blue);
104  }
105  friend OdGiColorRGB operator /(const OdGiColorRGB &c, double s)
106  {
107  return OdGiColorRGB(c.red / s, c.green / s, c.blue / s);
108  }
109  friend OdGiColorRGB operator /(double s, const OdGiColorRGB &c)
110  {
111  return OdGiColorRGB(s / c.red, s / c.green, s / c.blue);
112  }
113 };
114 
120 {
121 public:
124 
126 
127  bool operator ==(const OdGiShadowParameters &parms) const;
128  bool operator !=(const OdGiShadowParameters &parms) const;
129 
131  {
135  };
136 
138  kLinear = 0,
142  kSphere
143  };
144 
145  void setShadowsOn(bool on);
146  bool shadowsOn() const;
147 
148  void setShadowType(ShadowType typ);
149  ShadowType shadowType() const;
150 
151  bool setShadowMapSize(OdUInt16 sz);
152  OdUInt16 shadowMapSize() const;
153 
154  bool setShadowMapSoftness(OdUInt8 soft);
155  OdUInt8 shadowMapSoftness() const;
156 
157  bool setShadowSamples(OdUInt16 nSamples);
158  OdUInt16 shadowSamples() const;
159 
160  void setShapeVisibility(bool bVisibility);
161  bool shapeVisibility() const;
162 
163  void setExtendedLightShape(ExtendedLightShape lightShape);
165 
166  bool setExtendedLightLength(double dLength);
167  double extendedLightLength() const;
168 
169  bool setExtendedLightWidth(double dWidth);
170  double extendedLightWidth() const;
171 
172  bool setExtendedLightRadius(double dRadius);
173  double extendedLightRadius() const;
174 
175  inline void save(OdGsFiler * pFiler) const {
176  pFiler->wrBool(shadowsOn());
177  pFiler->wrUInt8((OdUInt8)shadowType());
178  pFiler->wrUInt16(shadowMapSize());
179  pFiler->wrUInt8(shadowMapSoftness());
180  pFiler->wrBool(shapeVisibility());
181  pFiler->wrUInt8((OdUInt8)extendedLightShape());
182  pFiler->wrDouble(extendedLightLength());
183  pFiler->wrDouble(extendedLightWidth());
184  pFiler->wrDouble(extendedLightRadius());
185  }
186 
187  inline void load(OdGsFiler * pFiler) {
188  setShadowsOn(pFiler->rdBool());
189  setShadowType((ShadowType)pFiler->rdUInt8());
190  setShadowMapSize(pFiler->rdUInt16());
191  setShadowMapSoftness(pFiler->rdUInt8());
192  setShapeVisibility(pFiler->rdBool());
194  setExtendedLightLength(pFiler->rdDouble());
195  setExtendedLightWidth(pFiler->rdDouble());
196  setExtendedLightRadius(pFiler->rdDouble());
197  }
198 
199 
200 private:
201  bool m_bShadowsOn;
202  OdUInt8 m_shadowMapSoftness;
203  bool m_bShapeVisible;
204  ShadowType m_shadowType;
205  OdUInt16 m_shadowMapSize;
206  OdUInt16 m_shadowSamples;
207  ExtendedLightShape m_lightShape;
208  double m_lightLength;
209  double m_lightWidth;
210  double m_lightRadius;
211 };
212 
214  : m_bShadowsOn(true)
215  , m_shadowMapSoftness(1)
216  , m_bShapeVisible(false)
217  , m_shadowType(OdGiShadowParameters::kShadowsRayTraced)
218  , m_shadowMapSize(256)
219  , m_shadowSamples(16)
220  , m_lightShape(kSphere)
221  , m_lightLength(0.0)
222  , m_lightWidth(0.0)
223  , m_lightRadius(0.0)
224 {
225 }
226 
228  : m_bShadowsOn(parms.m_bShadowsOn)
229  , m_shadowMapSoftness(parms.m_shadowMapSoftness)
230  , m_bShapeVisible(parms.m_bShapeVisible)
231  , m_shadowType(parms.m_shadowType)
232  , m_shadowMapSize(parms.m_shadowMapSize)
233  , m_shadowSamples(parms.m_shadowSamples)
234  , m_lightShape(parms.m_lightShape)
235  , m_lightLength(parms.m_lightLength)
236  , m_lightWidth(parms.m_lightWidth)
237  , m_lightRadius(parms.m_lightRadius)
238 {
239 }
240 
242 {
243  m_bShadowsOn = parms.m_bShadowsOn;
244  m_shadowType = parms.m_shadowType;
245  m_shadowMapSize = parms.m_shadowMapSize;
246  m_shadowMapSoftness = parms.m_shadowMapSoftness;
247  m_shadowSamples = parms.m_shadowSamples;
248  m_bShapeVisible = parms.m_bShapeVisible;
249  m_lightShape = parms.m_lightShape;
250  m_lightLength = parms.m_lightLength;
251  m_lightWidth = parms.m_lightWidth;
252  m_lightRadius = parms.m_lightRadius;
253  return *this;
254 }
255 
257 {
258  return (m_bShadowsOn == parms.m_bShadowsOn) &&
259  (m_shadowType == parms.m_shadowType) &&
260  (m_shadowMapSize == parms.m_shadowMapSize) &&
261  (m_shadowMapSoftness == parms.m_shadowMapSoftness) &&
262  (m_shadowSamples == parms.m_shadowSamples) &&
263  (m_bShapeVisible == parms.m_bShapeVisible) &&
264  (m_lightShape == parms.m_lightShape) &&
265  OdEqual(m_lightLength , parms.m_lightLength) &&
266  OdEqual(m_lightWidth , parms.m_lightWidth) &&
267  OdEqual(m_lightRadius , parms.m_lightRadius);
268 }
269 
271 {
272  return (m_bShadowsOn != parms.m_bShadowsOn) ||
273  (m_shadowType != parms.m_shadowType) ||
274  (m_shadowMapSize != parms.m_shadowMapSize) ||
275  (m_shadowMapSoftness != parms.m_shadowMapSoftness) ||
276  (m_shadowSamples != parms.m_shadowSamples) ||
277  (m_bShapeVisible != parms.m_bShapeVisible) ||
278  (m_lightShape != parms.m_lightShape) ||
279  !OdEqual(m_lightLength, parms.m_lightLength) ||
280  !OdEqual(m_lightWidth , parms.m_lightWidth) ||
281  !OdEqual(m_lightRadius, parms.m_lightRadius);
282 }
283 
285 {
286  m_bShadowsOn = on;
287 }
288 
290 {
291  return m_bShadowsOn;
292 }
293 
295 {
296  m_shadowType = typ;
297 }
298 
300 {
301  return m_shadowType;
302 }
303 
305 {
306  if((sz & (sz-1)) == 0 && sz >= 64 && sz <= 4096) // valid values are 64, 128, 256, 512, 1024, 2048, and 4096
307  {
308  m_shadowMapSize = sz;
309  return true;
310  }
311  else
312  {
313  return false;
314  }
315 }
316 
318 {
319  return m_shadowMapSize;
320 }
321 
323 {
324  m_shadowMapSoftness = soft;
325  return true;
326 }
327 
329 {
330  return m_shadowMapSoftness;
331 }
332 
334 {
335  m_shadowSamples = nSamples;
336  return true;
337 }
338 
340 {
341  return m_shadowSamples;
342 }
343 
344 inline void OdGiShadowParameters::setShapeVisibility(bool bVisibility)
345 {
346  m_bShapeVisible = bVisibility;
347 }
348 
350 {
351  return m_bShapeVisible;
352 }
353 
355 {
356  m_lightShape = lightShape;
357 }
358 
360 {
361  return m_lightShape;
362 }
363 
365 {
366  m_lightLength = dLength;
367  return true;
368 }
369 
371 {
372  return m_lightLength;
373 }
374 
376 {
377  m_lightWidth = dWidth;
378  return true;
379 }
380 
382 {
383  return m_lightWidth;
384 }
385 
387 {
388  m_lightRadius = dRadius;
389  return true;
390 }
391 
393 {
394  return m_lightRadius;
395 }
396 
402 {
403 public:
405 
407  {
408  kNone = 0,
411  };
412 
415 
416  void setUseLimits(bool on);
417  bool useLimits() const;
418 
419  void setLimits(double startlim, double endlim);
420  double startLimit() const;
421  double endLimit() const;
422 
423  void save(OdGsFiler *pFiler) const;
424  void load(OdGsFiler *pFiler);
425 private:
426  AttenuationType m_attenType;
427  bool m_bUseAttenLimits;
428  double m_dAttenStartLimit;
429  double m_dAttenEndLimit;
430 };
431 
433 : m_attenType(OdGiLightAttenuation::kNone)
434 , m_bUseAttenLimits(false)
435 , m_dAttenStartLimit(1.0)
436 , m_dAttenEndLimit(10.0)
437 {
438 }
439 
441 {
442  m_attenType = typ;
443 }
444 
446 {
447  return m_attenType;
448 }
449 
451 {
452  m_bUseAttenLimits = on;
453 }
454 
456 {
457  return m_bUseAttenLimits;
458 }
459 
460 inline void OdGiLightAttenuation::setLimits(double startlim, double endlim)
461 {
462  m_dAttenStartLimit = startlim;
463  m_dAttenEndLimit = endlim;
464 }
465 
466 inline double OdGiLightAttenuation::startLimit() const
467 {
468  return m_dAttenStartLimit;
469 }
470 
471 inline double OdGiLightAttenuation::endLimit() const
472 {
473  return m_dAttenEndLimit;
474 }
475 
476 inline void OdGiLightAttenuation::save(OdGsFiler * pFiler) const {
477  pFiler->wrUInt8(OdUInt8(m_attenType));
478  pFiler->wrBool(m_bUseAttenLimits);
479  pFiler->wrDouble(m_dAttenStartLimit);
480  pFiler->wrDouble(m_dAttenEndLimit);
481 }
482 
483 inline void OdGiLightAttenuation::load(OdGsFiler * pFiler) {
484  m_attenType = AttenuationType(pFiler->rdUInt8());
485  m_bUseAttenLimits = pFiler->rdBool();
486  m_dAttenStartLimit = pFiler->rdDouble();
487  m_dAttenEndLimit = pFiler->rdDouble();
488 }
489 
499 {
500 public:
502 
503  bool operator==(const OdGiSkyParameters& params) const;
504 
505  void setIllumination(bool enable);
506  bool illumination() const;
507 
508  void setIntensityFactor(double intensity);
509  double intensityFactor() const;
510 
511  void setHaze(double haze);
512  double haze() const;
513 
514  void setHorizonHeight(double height);
515  double horizonHeight() const;
516 
517  void setHorizonBlur(double blur);
518  double horizonBlur() const;
519 
520  void setGroundColor(const OdCmEntityColor& color);
522 
523  void setNightColor(const OdCmEntityColor& color);
524  OdCmEntityColor nightColor() const;
525 
526  void setAerialPerspective(bool apply);
527  bool aerialPerspective() const;
528 
529  void setVisibilityDistance(double distance);
530  double visibilityDistance() const;
531 
532  void setDiskScale(double scale);
533  double diskScale() const;
534 
535  void setGlowIntensity(double intensity);
536  double glowIntensity() const;
537 
538  void setDiskIntensity(double intensity);
539  double diskIntensity() const;
540 
541  void setSolarDiskSamples(OdUInt16 samples);
542  OdUInt16 solarDiskSamples() const;
543 
544  void setSunDirection(const OdGeVector3d& sundir);
545  const OdGeVector3d& sunDirection() const;
546 
547  void setRedBlueShift(double redBlueShift);
548  double redBlueShift() const;
549 
550  void setSaturation(double saturation);
551  double saturation() const;
552 private:
553  bool m_status;
554  double m_intensityFactor;
555  double m_haze;
556  double m_horizonHeight;
557  double m_horizonBlur;
558  OdCmEntityColor m_groundColor;
559  OdCmEntityColor m_nightColor;
560  bool m_aerialPerspective;
561  double m_visibilityDistance;
562  double m_diskScale;
563  double m_glowIntensity;
564  double m_diskIntensity;
565  OdUInt16 m_solarDiskSamples;
566  OdGeVector3d m_sunDirection;
567  double m_redBlueShift;
568  double m_saturation;
569 };
570 
572 : m_status(false)
573 , m_intensityFactor(1.0)
574 , m_haze(0.0)
575 , m_horizonHeight(0.0)
576 , m_horizonBlur(0.1)
577 , m_aerialPerspective(false)
578 , m_visibilityDistance(10000.0)
579 , m_diskScale(4.0)
580 , m_glowIntensity(1.0)
581 , m_diskIntensity(1.0)
582 , m_solarDiskSamples(8)
583 , m_redBlueShift(0.0)
584 , m_saturation(1.0)
585 {
586  m_groundColor.setColor(0xc2808080);
587  m_nightColor.setColor(0xc2010205);
588  m_sunDirection.set(0.35, 1.0, -0.25);
589 }
590 
592 {
593  if (m_status != params.m_status) return false;
594  if (m_intensityFactor != params.m_intensityFactor) return false;
595  if (m_haze != params.m_haze) return false;
596  if (m_horizonHeight != params.m_horizonHeight) return false;
597  if (m_horizonBlur != params.m_horizonBlur) return false;
598  if (m_groundColor != params.m_groundColor) return false;
599  if (m_nightColor != params.m_nightColor) return false;
600  if (m_aerialPerspective != params.m_aerialPerspective) return false;
601  if (m_visibilityDistance != params.m_visibilityDistance) return false;
602  if (m_diskScale != params.m_diskScale) return false;
603  if (m_glowIntensity != params.m_glowIntensity) return false;
604  if (m_diskIntensity != params.m_diskIntensity) return false;
605  if (m_solarDiskSamples != params.m_solarDiskSamples) return false;
606  if (m_sunDirection != params.m_sunDirection) return false;
607  if (m_redBlueShift != params.m_redBlueShift) return false;
608  if (m_saturation != params.m_saturation) return false;
609  return true;
610 }
611 
612 inline void OdGiSkyParameters::setIllumination(bool enable)
613 {
614  m_status = enable;
615 }
617 {
618  return m_status;
619 }
620 inline void OdGiSkyParameters::setIntensityFactor(double intensity)
621 {
622  m_intensityFactor = intensity;
623 }
625 {
626  return m_intensityFactor;
627 }
628 inline void OdGiSkyParameters::setHaze(double haze)
629 {
630  m_haze = haze;
631 }
632 inline double OdGiSkyParameters::haze() const
633 {
634  return m_haze;
635 }
637 {
638  m_horizonHeight = height;
639 }
640 inline double OdGiSkyParameters::horizonHeight() const
641 {
642  return m_horizonHeight;
643 }
644 inline void OdGiSkyParameters::setHorizonBlur(double blur)
645 {
646  m_horizonBlur = blur;
647 }
648 inline double OdGiSkyParameters::horizonBlur() const
649 {
650  return m_horizonBlur;
651 }
653 {
654  m_groundColor = color;
655 }
657 {
658  return m_groundColor;
659 }
661 {
662  m_nightColor = color;
663 }
665 {
666  return m_nightColor;
667 }
669 {
670  m_aerialPerspective = apply;
671 }
673 {
674  return m_aerialPerspective;
675 }
676 inline void OdGiSkyParameters::setVisibilityDistance(double distance)
677 {
678  m_visibilityDistance = distance;
679 }
681 {
682  return m_visibilityDistance;
683 }
685 {
686  m_diskScale = scale;
687 }
688 inline double OdGiSkyParameters::diskScale() const
689 {
690  return m_diskScale;
691 }
692 inline void OdGiSkyParameters::setGlowIntensity(double intensity)
693 {
694  m_glowIntensity = intensity;
695 }
696 inline double OdGiSkyParameters::glowIntensity() const
697 {
698  return m_glowIntensity;
699 }
700 inline void OdGiSkyParameters::setDiskIntensity(double intensity)
701 {
702  m_diskIntensity = intensity;
703 }
704 inline double OdGiSkyParameters::diskIntensity() const
705 {
706  return m_diskIntensity;
707 }
709 {
710  m_solarDiskSamples = samples;
711 }
713 {
714  return m_solarDiskSamples;
715 }
717 {
718  m_sunDirection = sundir;
719 }
721 {
722  return m_sunDirection;
723 }
724 inline void OdGiSkyParameters::setRedBlueShift(double redBlueShift)
725 {
726  m_redBlueShift = redBlueShift;
727 }
728 inline double OdGiSkyParameters::redBlueShift() const
729 {
730  return m_redBlueShift;
731 }
732 inline void OdGiSkyParameters::setSaturation(double saturation)
733 {
734  m_saturation = saturation;
735 }
736 inline double OdGiSkyParameters::saturation() const
737 {
738  return m_saturation;
739 }
740 
746 {
747 public:
749 
750  virtual void setIntensity(double inten) = 0;
751  virtual double intensity() const = 0;
752 
753  virtual void setLightColor(const OdCmEntityColor& color) = 0;
754  virtual OdCmEntityColor lightColor() const = 0;
755 
758 };
759 
761 
767 {
768 public:
770 
771  virtual void setPosition(const OdGePoint3d& pos) = 0;
772  virtual OdGePoint3d position() const = 0;
773 
775  virtual void setAttenuation(const OdGiLightAttenuation& atten) = 0;
776 
777  virtual void setPhysicalIntensity(double fIntensity) = 0;
778  virtual double physicalIntensity() const = 0;
779 
780  virtual void setLampColor(const OdGiColorRGB& color) = 0;
781  virtual OdGiColorRGB lampColor() const = 0;
782 
783  virtual void setHasTarget(bool bTarget) = 0;
784  virtual bool hasTarget() const = 0;
785 
786  virtual void setTargetLocation(const OdGePoint3d &loc) = 0;
787  virtual OdGePoint3d targetLocation() const = 0;
788 
789  virtual void setHemisphericalDistribution(bool bHemisphere) = 0;
790  virtual bool hemisphericalDistribution() const = 0;
791 };
792 
794 
795 
801 {
802 public:
804 
805  virtual void setPosition(const OdGePoint3d& pos) = 0;
806  virtual OdGePoint3d position() const = 0;
807 
808  virtual void setTargetLocation(const OdGePoint3d& loc) = 0;
809  virtual OdGePoint3d targetLocation() const = 0;
810 
811  virtual bool setHotspotAndFalloff(double hotspot, double falloff) = 0;
812  virtual double hotspot() const = 0;
813  virtual double falloff() const = 0;
814 
816  virtual void setAttenuation(const OdGiLightAttenuation& atten) = 0;
817 
818  virtual void setPhysicalIntensity(double fIntensity) = 0;
819  virtual double physicalIntensity() const = 0;
820 
821  virtual void setLampColor(const OdGiColorRGB& color) = 0;
822  virtual OdGiColorRGB lampColor() const = 0;
823 };
824 
826 
827 
833 {
834 public:
836 
837  virtual void setLightDirection(const OdGeVector3d& vec) = 0;
838  virtual OdGeVector3d lightDirection() const = 0;
839 
840  virtual void setIsSunlight(bool isSunlight) = 0;
841  virtual bool isSunlight() const = 0;
842 
843  virtual void setPhysicalIntensity(double fIntensity) = 0;
844  virtual double physicalIntensity() const = 0;
845 
846  virtual void setLampColor(const OdGiColorRGB& color) = 0;
847  virtual OdGiColorRGB lampColor() const = 0;
848 
849  virtual void setSkyParameters(const OdGiSkyParameters &params) = 0;
850  virtual void skyParameters(OdGiSkyParameters &params) const = 0;
851 };
852 
854 
860 {
861 public:
863 
865  {
866  kTypeA = 3,
867  kTypeB = 2,
868  kTypeC = 1
869  };
870 
872  {
873  kNoSymmetry = 0,
876  kAxialSymmetry
877  };
878 
879  virtual void setWebFile(const OdString &fileName) = 0;
880  virtual OdString webFile() const = 0;
881 
882  virtual void setWebRotation(OdGeVector3d fRot) = 0;
883  virtual OdGeVector3d webRotation() const = 0;
884 
885  virtual void setWebFlux(double fFlux) = 0;
886  virtual double webFlux() const = 0;
887 
888  virtual void setWebFileType(WebFileType type) = 0;
889  virtual WebFileType webFileType() const = 0;
890 
891  virtual void setWebSymmetry(WebSymmetry sym) = 0;
892  virtual WebSymmetry webSymmetry() const = 0;
893 
894  virtual void setWebHorzAng90to270(bool bFlag) = 0;
895  virtual bool webHorzAng90to270() const = 0;
896 };
897 
899 
900 
906 {
907 public:
909  // returned via subSetAttributes()
910  enum
911  {
912  kVpDep = (OdGiDrawable::kLastFlag << 1)
913  };
914  //
915  virtual OdUInt32 viewportId() const = 0;
916  virtual OdDbStub* viewportObjectId() const = 0;
917  //
918  virtual void setOn(bool on) = 0;
919  virtual bool isOn() const = 0;
920  //
921  virtual void setDimming(double dim) = 0;
922  virtual double dimming() const = 0;
923 };
924 
926 
927 #include "TD_PackPop.h"
928 
929 #endif // __OD_GI_LIGHT_TRAITS__
FIRSTDLL_EXPORT
#define FIRSTDLL_EXPORT
Definition: RootExport.h:39
OdGiLightAttenuation::attenuationType
AttenuationType attenuationType() const
Definition: GiLightTraits.h:445
OdGiColorRGB::blue
double blue
Definition: GiLightTraits.h:57
OdGiWebLightTraits::webFlux
virtual double webFlux() const =0
OdCmEntityColor
Definition: CmColorBase.h:68
OdEqual
bool OdEqual(double x, double y, double tol=1.e-10)
Definition: OdaDefs.h:523
OdGiShadowParameters::kSphere
@ kSphere
Definition: GiLightTraits.h:142
OdGeVector3d
Definition: GeVector3d.h:54
OdString
Definition: OdString.h:95
OdGiPointLightTraits::setLampColor
virtual void setLampColor(const OdGiColorRGB &color)=0
OdGiLightTraits::setOn
virtual void setOn(bool on)=0
OdGiColorRGB
Definition: GiLightTraits.h:56
OdGiLightTraits
Definition: GiLightTraits.h:41
OdGiShadowParameters::extendedLightShape
ExtendedLightShape extendedLightShape() const
Definition: GiLightTraits.h:359
OdGiShadowParameters::shadowMapSize
OdUInt16 shadowMapSize() const
Definition: GiLightTraits.h:317
OdGiShadowParameters::setShadowType
void setShadowType(ShadowType typ)
Definition: GiLightTraits.h:294
OdGiLightTraitsVpDep::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGiLightTraitsVpDep)
OdGiSpotLightTraits::position
virtual OdGePoint3d position() const =0
OdGiDistantLightTraits::lampColor
virtual OdGiColorRGB lampColor() const =0
OdGiSkyParameters::diskScale
double diskScale() const
Definition: GiLightTraits.h:688
OdUInt8
unsigned char OdUInt8
Definition: OdPlatformSettings.h:759
OdGiWebLightTraits::webRotation
virtual OdGeVector3d webRotation() const =0
OdGiSkyParameters::setGroundColor
void setGroundColor(const OdCmEntityColor &color)
Definition: GiLightTraits.h:652
OdGiShadowParameters::ExtendedLightShape
ExtendedLightShape
Definition: GiLightTraits.h:137
OdGiStandardLightTraits::shadowParameters
virtual OdGiShadowParameters shadowParameters() const =0
scale
scale
Definition: DimVarDefs.h:1684
OdGiSkyParameters::visibilityDistance
double visibilityDistance() const
Definition: GiLightTraits.h:680
OdGiSpotLightTraits::lightAttenuation
virtual OdGiLightAttenuation lightAttenuation() const =0
OdGiShadowParameters::setExtendedLightLength
bool setExtendedLightLength(double dLength)
Definition: GiLightTraits.h:364
OdGiStandardLightTraits::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGiStandardLightTraits)
OdGiDistantLightTraits::isSunlight
virtual bool isSunlight() const =0
OdGiPointLightTraits::setTargetLocation
virtual void setTargetLocation(const OdGePoint3d &loc)=0
OdGiShadowParameters::shadowSamples
OdUInt16 shadowSamples() const
Definition: GiLightTraits.h:339
OdGiWebLightTraits::setWebRotation
virtual void setWebRotation(OdGeVector3d fRot)=0
OdGiShadowParameters::setShadowMapSize
bool setShadowMapSize(OdUInt16 sz)
Definition: GiLightTraits.h:304
OdGiShadowParameters::setShadowsOn
void setShadowsOn(bool on)
Definition: GiLightTraits.h:284
OdGiShadowParameters::extendedLightRadius
double extendedLightRadius() const
Definition: GiLightTraits.h:392
OdGiSpotLightTraits::targetLocation
virtual OdGePoint3d targetLocation() const =0
OdGiShadowParameters::operator=
OdGiShadowParameters & operator=(const OdGiShadowParameters &parms)
Definition: GiLightTraits.h:241
type
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
OdGiPointLightTraits::setPhysicalIntensity
virtual void setPhysicalIntensity(double fIntensity)=0
OdGiShadowParameters::kLinear
@ kLinear
Definition: GiLightTraits.h:138
OdGiSkyParameters::setHorizonHeight
void setHorizonHeight(double height)
Definition: GiLightTraits.h:636
false
false
Definition: DimVarDefs.h:165
OdGiWebLightTraits::WebSymmetry
WebSymmetry
Definition: GiLightTraits.h:872
OdGiWebLightTraits::kSingleSymmetry
@ kSingleSymmetry
Definition: GiLightTraits.h:874
green
GLfloat green
Definition: gles2_ext.h:147
OdGiSpotLightTraits::setAttenuation
virtual void setAttenuation(const OdGiLightAttenuation &atten)=0
OdGiSkyParameters::setGlowIntensity
void setGlowIntensity(double intensity)
Definition: GiLightTraits.h:692
OdGeVector3d::set
OdGeVector3d & set(double xx, double yy, double zz)
Definition: GeVector3d.h:555
OdGiLightAttenuation::endLimit
double endLimit() const
Definition: GiLightTraits.h:471
OdGiStandardLightTraitsPtr
OdSmartPtr< OdGiStandardLightTraits > OdGiStandardLightTraitsPtr
Definition: GiLightTraits.h:760
blue
GLfloat GLfloat blue
Definition: gles2_ext.h:147
OdGiLightAttenuation::OdGiLightAttenuation
OdGiLightAttenuation()
Definition: GiLightTraits.h:432
OdGsFiler::wrDouble
virtual void wrDouble(double val)
OdGiSpotLightTraits::hotspot
virtual double hotspot() const =0
OdGiShadowParameters::setShadowMapSoftness
bool setShadowMapSoftness(OdUInt8 soft)
Definition: GiLightTraits.h:322
OdGiSkyParameters::setSolarDiskSamples
void setSolarDiskSamples(OdUInt16 samples)
Definition: GiLightTraits.h:708
TD_PackPop.h
OdGiSkyParameters::setDiskIntensity
void setDiskIntensity(double intensity)
Definition: GiLightTraits.h:700
OdGiWebLightTraits::setWebFileType
virtual void setWebFileType(WebFileType type)=0
OdGiDistantLightTraits::setLampColor
virtual void setLampColor(const OdGiColorRGB &color)=0
OdCmEntityColor::setColor
void setColor(OdUInt32 color)
OdGiLightTraitsVpDep
Definition: GiLightTraits.h:906
OdGiWebLightTraits::kDoubleSymmetry
@ kDoubleSymmetry
Definition: GiLightTraits.h:875
OdGiLightAttenuation::AttenuationType
AttenuationType
Definition: GiLightTraits.h:407
OdGiShadowParameters::extendedLightWidth
double extendedLightWidth() const
Definition: GiLightTraits.h:381
OdUInt16
unsigned short OdUInt16
Definition: OdPlatformSettings.h:760
OdGiShadowParameters::kDisk
@ kDisk
Definition: GiLightTraits.h:140
OdGiShadowParameters::ShadowType
ShadowType
Definition: GiLightTraits.h:131
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdGiShadowParameters::load
void load(OdGsFiler *pFiler)
Definition: GiLightTraits.h:187
OdGiDistantLightTraits::setLightDirection
virtual void setLightDirection(const OdGeVector3d &vec)=0
OdGiSpotLightTraits::setLampColor
virtual void setLampColor(const OdGiColorRGB &color)=0
OdGiWebLightTraits::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGiWebLightTraits)
OdGiSkyParameters::setVisibilityDistance
void setVisibilityDistance(double distance)
Definition: GiLightTraits.h:676
OdGiSkyParameters::setHorizonBlur
void setHorizonBlur(double blur)
Definition: GiLightTraits.h:644
OdGiPointLightTraits::physicalIntensity
virtual double physicalIntensity() const =0
OdGiWebLightTraitsPtr
OdSmartPtr< OdGiWebLightTraits > OdGiWebLightTraitsPtr
Definition: GiLightTraits.h:898
OdGiPointLightTraits::setAttenuation
virtual void setAttenuation(const OdGiLightAttenuation &atten)=0
OdPdfPublish::Lighting::kNone
@ kNone
Light mode is inherited from the annotation.
Definition: PdfPublishCommon.h:160
OdGiSkyParameters::groundColor
OdCmEntityColor groundColor() const
Definition: GiLightTraits.h:656
OdGiShadowParameters::kShadowsRayTraced
@ kShadowsRayTraced
Definition: GiLightTraits.h:132
OdGiSkyParameters::glowIntensity
double glowIntensity() const
Definition: GiLightTraits.h:696
OdGiSkyParameters::setSunDirection
void setSunDirection(const OdGeVector3d &sundir)
Definition: GiLightTraits.h:716
OdGiLightAttenuation
Definition: GiLightTraits.h:402
OdGiShadowParameters::setExtendedLightRadius
bool setExtendedLightRadius(double dRadius)
Definition: GiLightTraits.h:386
OdGsFiler::rdBool
virtual bool rdBool() const
OdGiShadowParameters::kRectangle
@ kRectangle
Definition: GiLightTraits.h:139
OdGiShadowParameters::extendedLightLength
double extendedLightLength() const
Definition: GiLightTraits.h:370
OdGiShadowParameters
Definition: GiLightTraits.h:120
OdGiShadowParameters::kCylinder
@ kCylinder
Definition: GiLightTraits.h:141
OdGiSkyParameters::aerialPerspective
bool aerialPerspective() const
Definition: GiLightTraits.h:672
OdGiPointLightTraitsPtr
OdSmartPtr< OdGiPointLightTraits > OdGiPointLightTraitsPtr
Definition: GiLightTraits.h:793
OdGiStandardLightTraits::setLightColor
virtual void setLightColor(const OdCmEntityColor &color)=0
OdString.h
OdGiLightAttenuation::kInverseLinear
@ kInverseLinear
Definition: GiLightTraits.h:409
OdGiPointLightTraits::hasTarget
virtual bool hasTarget() const =0
OdGiLightTraitsVpDep::dimming
virtual double dimming() const =0
OdGiShadowParameters::setShapeVisibility
void setShapeVisibility(bool bVisibility)
Definition: GiLightTraits.h:344
OdGiPointLightTraits
Definition: GiLightTraits.h:767
OdGiSkyParameters::setDiskScale
void setDiskScale(double scale)
Definition: GiLightTraits.h:684
OdaDefs.h
OdGiStandardLightTraits
Definition: GiLightTraits.h:746
OdGiLightTraitsVpDepPtr
OdSmartPtr< OdGiLightTraitsVpDep > OdGiLightTraitsVpDepPtr
Definition: GiLightTraits.h:925
OdGiLightTraitsVpDep::isOn
virtual bool isOn() const =0
OdSmartPtr
Definition: SmartPtr.h:58
OdGiPointLightTraits::setHemisphericalDistribution
virtual void setHemisphericalDistribution(bool bHemisphere)=0
OdGePoint3d
Definition: GePoint3d.h:55
OdGiLightTraitsVpDep::setOn
virtual void setOn(bool on)=0
OdGiSkyParameters::sunDirection
const OdGeVector3d & sunDirection() const
Definition: GiLightTraits.h:720
OdGiSkyParameters::illumination
bool illumination() const
Definition: GiLightTraits.h:616
OdGiWebLightTraits::setWebSymmetry
virtual void setWebSymmetry(WebSymmetry sym)=0
OdGiSkyParameters::setIllumination
void setIllumination(bool enable)
Definition: GiLightTraits.h:612
OdGiPointLightTraits::setHasTarget
virtual void setHasTarget(bool bTarget)=0
OdGiWebLightTraits::webHorzAng90to270
virtual bool webHorzAng90to270() const =0
true
true
Definition: DimVarDefs.h:2046
OdGiShadowParameters::operator!=
bool operator!=(const OdGiShadowParameters &parms) const
Definition: GiLightTraits.h:270
OdGiSpotLightTraits::lampColor
virtual OdGiColorRGB lampColor() const =0
OdGiWebLightTraits
Definition: GiLightTraits.h:860
OdGiSkyParameters::redBlueShift
double redBlueShift() const
Definition: GiLightTraits.h:728
OdGiLightTraitsVpDep::setDimming
virtual void setDimming(double dim)=0
OdGiWebLightTraits::webFileType
virtual WebFileType webFileType() const =0
OdGiLightTraitsVpDep::viewportObjectId
virtual OdDbStub * viewportObjectId() const =0
OdGiLightAttenuation::startLimit
double startLimit() const
Definition: GiLightTraits.h:466
OdAve::kSphere
@ kSphere
Definition: AveDefs.h:121
OdGiPointLightTraits::position
virtual OdGePoint3d position() const =0
OdGsFiler::rdUInt16
virtual OdUInt16 rdUInt16() const
OdGiDistantLightTraitsPtr
OdSmartPtr< OdGiDistantLightTraits > OdGiDistantLightTraitsPtr
Definition: GiLightTraits.h:853
OdGiStandardLightTraits::setShadowParameters
virtual void setShadowParameters(const OdGiShadowParameters &params)=0
OdGiSkyParameters::setRedBlueShift
void setRedBlueShift(double redBlueShift)
Definition: GiLightTraits.h:724
OdGiShadowParameters::save
void save(OdGsFiler *pFiler) const
Definition: GiLightTraits.h:175
OdGsFiler::wrUInt16
virtual void wrUInt16(OdUInt16 val)
OdGiSpotLightTraitsPtr
OdSmartPtr< OdGiSpotLightTraits > OdGiSpotLightTraitsPtr
Definition: GiLightTraits.h:825
OdGiWebLightTraits::setWebFile
virtual void setWebFile(const OdString &fileName)=0
OdGiSkyParameters::setIntensityFactor
void setIntensityFactor(double intensity)
Definition: GiLightTraits.h:620
OdGiLightTraits::isOn
virtual bool isOn() const =0
OdGiSpotLightTraits
Definition: GiLightTraits.h:801
OdGiStandardLightTraits::setIntensity
virtual void setIntensity(double inten)=0
height
GLint GLenum GLsizei GLsizei height
Definition: gles2_ext.h:110
OdGiColorRGB::operator/
friend OdGiColorRGB operator/(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
Definition: GiLightTraits.h:101
OdGiWebLightTraits::WebFileType
WebFileType
Definition: GiLightTraits.h:865
OdGiLightTraits::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGiLightTraits)
OdGiShadowParameters::setShadowSamples
bool setShadowSamples(OdUInt16 nSamples)
Definition: GiLightTraits.h:333
OdGiShadowParameters::kAreaSampled
@ kAreaSampled
Definition: GiLightTraits.h:134
OdGiLightAttenuation::kInverseSquare
@ kInverseSquare
Definition: GiLightTraits.h:410
OdGiShadowParameters::shapeVisibility
bool shapeVisibility() const
Definition: GiLightTraits.h:349
OdGiColorRGB::red
double red
Definition: GiLightTraits.h:57
OdGiStandardLightTraits::lightColor
virtual OdCmEntityColor lightColor() const =0
OdGiSpotLightTraits::setTargetLocation
virtual void setTargetLocation(const OdGePoint3d &loc)=0
TD_PackPush.h
OdGiSkyParameters::diskIntensity
double diskIntensity() const
Definition: GiLightTraits.h:704
OdGiSkyParameters::intensityFactor
double intensityFactor() const
Definition: GiLightTraits.h:624
OdGiDistantLightTraits::setPhysicalIntensity
virtual void setPhysicalIntensity(double fIntensity)=0
GeVector3d.h
OdGiColorRGB::OdGiColorRGB
OdGiColorRGB(double _red, double _green, double _blue)
Definition: GiLightTraits.h:60
OdGiSkyParameters::horizonBlur
double horizonBlur() const
Definition: GiLightTraits.h:648
OdGiSkyParameters::setHaze
void setHaze(double haze)
Definition: GiLightTraits.h:628
params
GLenum GLint * params
Definition: gles2_ext.h:184
OdGsFiler::rdDouble
virtual double rdDouble() const
OdGiLightAttenuation::kNone
@ kNone
Definition: GiLightTraits.h:408
OdGiSkyParameters::setSaturation
void setSaturation(double saturation)
Definition: GiLightTraits.h:732
OdGiDistantLightTraits::setIsSunlight
virtual void setIsSunlight(bool isSunlight)=0
OdGiWebLightTraits::webSymmetry
virtual WebSymmetry webSymmetry() const =0
OdGiSkyParameters
Definition: GiLightTraits.h:499
GsFiler.h
OdGsFiler::wrUInt8
virtual void wrUInt8(OdUInt8 val)
OdGiLightTraitsPtr
OdSmartPtr< OdGiLightTraits > OdGiLightTraitsPtr
Definition: GiLightTraits.h:49
OdGiPointLightTraits::hemisphericalDistribution
virtual bool hemisphericalDistribution() const =0
OdGiDrawable::kLastFlag
@ kLastFlag
Definition: GiDrawable.h:82
OdGiShadowParameters::kShadowMaps
@ kShadowMaps
Definition: GiLightTraits.h:133
OdGiSkyParameters::solarDiskSamples
OdUInt16 solarDiskSamples() const
Definition: GiLightTraits.h:712
OdGiDrawableTraits
Definition: Gi.h:71
OdGiColorRGB::OdGiColorRGB
OdGiColorRGB()
Definition: GiLightTraits.h:59
OdGsFiler::wrBool
virtual void wrBool(bool bVal)
OdGiPointLightTraits::setPosition
virtual void setPosition(const OdGePoint3d &pos)=0
OdGiLightAttenuation::save
void save(OdGsFiler *pFiler) const
Definition: GiLightTraits.h:476
OdGiDistantLightTraits::physicalIntensity
virtual double physicalIntensity() const =0
OdGiShadowParameters::setExtendedLightShape
void setExtendedLightShape(ExtendedLightShape lightShape)
Definition: GiLightTraits.h:354
OdGiLightAttenuation::setLimits
void setLimits(double startlim, double endlim)
Definition: GiLightTraits.h:460
OdGiSpotLightTraits::falloff
virtual double falloff() const =0
OdGiShadowParameters::shadowType
ShadowType shadowType() const
Definition: GiLightTraits.h:299
GiDrawable.h
OdGiColorRGB::green
double green
Definition: GiLightTraits.h:57
OdGiDistantLightTraits
Definition: GiLightTraits.h:833
OdGiWebLightTraits::setWebFlux
virtual void setWebFlux(double fFlux)=0
OdGiSpotLightTraits::setPhysicalIntensity
virtual void setPhysicalIntensity(double fIntensity)=0
OdGiSkyParameters::operator==
bool operator==(const OdGiSkyParameters &params) const
Definition: GiLightTraits.h:591
OdGiColorRGB::operator+
friend OdGiColorRGB operator+(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
Definition: GiLightTraits.h:62
OdGsFiler::rdUInt8
virtual OdUInt8 rdUInt8() const
OdGiPointLightTraits::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGiPointLightTraits)
OdGiSkyParameters::setNightColor
void setNightColor(const OdCmEntityColor &color)
Definition: GiLightTraits.h:660
OdGiSpotLightTraits::setHotspotAndFalloff
virtual bool setHotspotAndFalloff(double hotspot, double falloff)=0
OdGiSpotLightTraits::setPosition
virtual void setPosition(const OdGePoint3d &pos)=0
OdGiSpotLightTraits::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGiSpotLightTraits)
OdGiShadowParameters::setExtendedLightWidth
bool setExtendedLightWidth(double dWidth)
Definition: GiLightTraits.h:375
OdGiSkyParameters::setAerialPerspective
void setAerialPerspective(bool apply)
Definition: GiLightTraits.h:668
OdGiDistantLightTraits::setSkyParameters
virtual void setSkyParameters(const OdGiSkyParameters &params)=0
OdGiPointLightTraits::lightAttenuation
virtual OdGiLightAttenuation lightAttenuation() const =0
OdGiLightAttenuation::setUseLimits
void setUseLimits(bool on)
Definition: GiLightTraits.h:450
OdGiSkyParameters::haze
double haze() const
Definition: GiLightTraits.h:632
OdGiDistantLightTraits::lightDirection
virtual OdGeVector3d lightDirection() const =0
OdGiColorRGB::operator*
friend OdGiColorRGB operator*(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
Definition: GiLightTraits.h:88
OdGiColorRGB::operator-
friend OdGiColorRGB operator-(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
Definition: GiLightTraits.h:75
OdGiPointLightTraits::lampColor
virtual OdGiColorRGB lampColor() const =0
OdGiSkyParameters::saturation
double saturation() const
Definition: GiLightTraits.h:736
OdGiLightAttenuation::load
void load(OdGsFiler *pFiler)
Definition: GiLightTraits.h:483
OdGiShadowParameters::OdGiShadowParameters
OdGiShadowParameters()
Definition: GiLightTraits.h:213
OdGiShadowParameters::shadowsOn
bool shadowsOn() const
Definition: GiLightTraits.h:289
OdGsFiler
Definition: GsFiler.h:63
OdGiSkyParameters::horizonHeight
double horizonHeight() const
Definition: GiLightTraits.h:640
OdGiSkyParameters::nightColor
OdCmEntityColor nightColor() const
Definition: GiLightTraits.h:664
OdGiDistantLightTraits::skyParameters
virtual void skyParameters(OdGiSkyParameters &params) const =0
OdGiShadowParameters::shadowMapSoftness
OdUInt8 shadowMapSoftness() const
Definition: GiLightTraits.h:328
OdGiPointLightTraits::targetLocation
virtual OdGePoint3d targetLocation() const =0
OdGiWebLightTraits::setWebHorzAng90to270
virtual void setWebHorzAng90to270(bool bFlag)=0
OdGiLightTraitsVpDep::viewportId
virtual OdUInt32 viewportId() const =0
OdGiDistantLightTraits::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGiDistantLightTraits)
OdGiSkyParameters::OdGiSkyParameters
OdGiSkyParameters()
Definition: GiLightTraits.h:571
OdGiLightAttenuation::setAttenuationType
void setAttenuationType(AttenuationType typ)
Definition: GiLightTraits.h:440
OdGiShadowParameters::operator==
bool operator==(const OdGiShadowParameters &parms) const
Definition: GiLightTraits.h:256
OdGiSpotLightTraits::physicalIntensity
virtual double physicalIntensity() const =0
OdGiLightAttenuation::useLimits
bool useLimits() const
Definition: GiLightTraits.h:455
OdGiStandardLightTraits::intensity
virtual double intensity() const =0
Gi.h
OdGiWebLightTraits::webFile
virtual OdString webFile() const =0