CFx SDK Documentation  2022 SP0
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__
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:49
unsigned int OdUInt32
unsigned short OdUInt16
unsigned char OdUInt8
bool OdEqual(double x, double y, double tol=1.e-10)
Definition: OdaDefs.h:523
#define FIRSTDLL_EXPORT
Definition: RootExport.h:39
void setColor(OdUInt32 color)
OdGeVector3d & set(double xx, double yy, double zz)
Definition: GeVector3d.h:555
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
void setUseLimits(bool on)
void load(OdGsFiler *pFiler)
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 bool isOn() const =0
virtual OdUInt32 viewportId() const =0
ODRX_DECLARE_MEMBERS(OdGiLightTraitsVpDep)
virtual OdDbStub * viewportObjectId() const =0
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
@ kSphere
Definition: AveDefs.h:121
@ kNone
Light mode is inherited from the annotation.
friend OdGiColorRGB operator+(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
Definition: GiLightTraits.h:62
friend OdGiColorRGB operator*(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
Definition: GiLightTraits.h:88
OdGiColorRGB(double _red, double _green, double _blue)
Definition: GiLightTraits.h:60
friend OdGiColorRGB operator/(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
friend OdGiColorRGB operator-(const OdGiColorRGB &c1, const OdGiColorRGB &c2)
Definition: GiLightTraits.h:75