CFx SDK Documentation  2023 SP0
GiViewportTraits.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_VIEWPORT_TRAITS__
25 #define __OD_GI_VIEWPORT_TRAITS__
26 
27 #include "TD_PackPush.h"
28 
29 #include "Gi.h"
30 #include "CmColorBase.h"
31 #include "StaticRxObject.h"
32 
34 
40 {
41 public:
43  {
44  kDaylightOff = 0,
45  kDaylightOn = 1,
46  kDaylightAuto = 2
47  };
48 public:
50 
52  // GCC < 4.4 uses generated copy constructor which is references private OdRxObject copy constructor
54  // User-defined destructor moved to header.
55  // MSVC compiler bug: http://connect.microsoft.com/VisualStudio/feedback/details/680927/dereferencing-of-incomplete-type-not-diagnosed-fails-to-synthesise-constructor-and-destructor
57 
61 
62  virtual void setIsActive(bool bActive);
63  virtual bool isActive() const;
64 
65  virtual void setChromaticAdaptation(bool bEnable);
66  virtual bool chromaticAdaptation() const;
67 
68  virtual void setColorDifferentiation(bool bEnable);
69  virtual bool colorDifferentiation() const;
70 
71  virtual void setWhiteColor(const OdCmEntityColor &color);
72  virtual const OdCmEntityColor &whiteColor() const;
73 
74  virtual void setProcessBackground(bool bProcessBg);
75  virtual bool processBackground() const;
76 
77  virtual bool setBrightness(double fBrightness);
78  virtual double brightness() const;
79 
80  virtual bool setContrast(double fContrast);
81  virtual double contrast() const;
82 
83  virtual bool setMidTones(double fMidTones);
84  virtual double midTones() const;
85 
88 private:
89  bool m_bIsActive;
90  bool m_bChromaticAdaptation;
91  bool m_bColorDifferentiation;
92  OdCmEntityColor m_clrWhiteColor;
93  bool m_bProcessBackground;
94  double m_fBrightness;
95  double m_fContrast;
96  double m_fMidTones;
97  ExteriorDaylightMode m_eExteriorDaylight;
98 };
99 
104 class OdGiToneOperatorParametersStatic : public OdStaticRxObject<OdGiToneOperatorParameters>
105 {
106  public:
108  bool operator ==(const OdGiToneOperatorParameters &params) const { return params == *this; }
109  bool operator !=(const OdGiToneOperatorParameters &params) const { return params != *this; }
111 };
112 
117 
123 {
124 public:
126 
129  // WinCE failed to build w/o user-defined destructor.
131 
135 
136  virtual bool setExposure(double fExposure);
137  virtual double exposure() const;
138 
139  virtual bool setWhitePoint(double fWhitePoint);
140  virtual double whitePoint() const;
141 
142  virtual bool setBrightness(double fBrightness);
143 
145 
146  static double convertExposureToBrightness(double fExposure);
147  static double convertBrightnessToExposure(double fBrightness);
148 private:
149  double m_fExposure;
150  double m_fWhitePoint;
151 };
152 
157 class OdGiPhotographicExposureParametersStatic : public OdStaticRxObject<OdGiPhotographicExposureParameters>
158 {
159 public:
161  bool operator ==(const OdGiPhotographicExposureParameters &params) const { return params == *this; }
162  bool operator !=(const OdGiPhotographicExposureParameters &params) const { return params != *this; }
164 };
165 
170 
176 {
177 public:
179 
181  {
182  kOneDistantLight = 0,
183  kTwoDistantLights = 1,
184  kBackLighting = 2,
185  kUserDefinedLight = 3
186  };
187 
188  virtual bool isDefaultLightingOn() const = 0;
189  virtual void setDefaultLightingOn(bool b) = 0;
190 
193 
195  virtual void setUserDefinedLightDirection(const OdGeVector3d& lightDirection) = 0;
196 
197  virtual double defaultLightingIntensity() const = 0;
198  virtual void setDefaultLightingIntensity(double dIntensity) = 0;
199 
201  virtual void setDefaultLightingColor(const OdCmEntityColor& color) = 0;
202 
205 
206  virtual void setAmbientLightColor(const OdCmEntityColor& color) = 0;
207  virtual OdCmEntityColor ambientLightColor() const = 0;
208 
209  virtual void setContrast(double contrast) = 0;
210  virtual double contrast() const = 0;
211 
212  virtual void setBrightness(double brightness) = 0;
213  virtual double brightness() const = 0;
214 
215  virtual void setBackground(OdDbStub* bg) = 0;
216  virtual OdDbStub* background() const = 0;
217 
218  virtual void setRenderEnvironment(OdDbStub* re) = 0;
219  virtual OdDbStub* renderEnvironment () const = 0;
220 
221  virtual void setRenderSettings(OdDbStub* rs) = 0;
222  virtual OdDbStub* renderSettings() const = 0;
223 
226 };
227 
233 
234 #include "TD_PackPop.h"
235 
236 #endif // __OD_GI_VIEWPORT_TRAITS__
OdSmartPtr< OdGiViewportTraits > OdGiViewportTraitsPtr
OdSmartPtr< OdGiPhotographicExposureParameters > OdGiPhotographicExposureParametersPtr
OdSmartPtr< OdGiToneOperatorParameters > OdGiToneOperatorParametersPtr
#define FIRSTDLL_EXPORT
Definition: RootExport.h:39
ODRX_DECLARE_MEMBERS(OdGiPhotographicExposureParameters)
virtual bool setBrightness(double fBrightness)
static double convertExposureToBrightness(double fExposure)
OdGiPhotographicExposureParameters(const OdGiPhotographicExposureParameters &params)
virtual double whitePoint() const
virtual bool setExposure(double fExposure)
virtual double exposure() const
static double convertBrightnessToExposure(double fBrightness)
virtual bool setWhitePoint(double fWhitePoint)
OdCmEntityColor whitePointToColor() const
bool operator!=(const OdGiPhotographicExposureParameters &params) const
bool operator==(const OdGiPhotographicExposureParameters &params) const
OdGiPhotographicExposureParameters & operator=(const OdGiPhotographicExposureParameters &params)
virtual double midTones() const
virtual bool setContrast(double fContrast)
OdGiToneOperatorParameters(const OdGiToneOperatorParameters &params)
virtual bool colorDifferentiation() const
virtual void setColorDifferentiation(bool bEnable)
virtual void setChromaticAdaptation(bool bEnable)
virtual bool setBrightness(double fBrightness)
virtual double contrast() const
virtual double brightness() const
virtual void setWhiteColor(const OdCmEntityColor &color)
virtual ExteriorDaylightMode exteriorDaylight() const
virtual bool isActive() const
virtual bool chromaticAdaptation() const
virtual const OdCmEntityColor & whiteColor() const
virtual bool setMidTones(double fMidTones)
ODRX_DECLARE_MEMBERS(OdGiToneOperatorParameters)
virtual void setProcessBackground(bool bProcessBg)
virtual bool processBackground() const
virtual bool setExteriorDaylight(ExteriorDaylightMode mode)
virtual void setIsActive(bool bActive)
bool operator!=(const OdGiToneOperatorParameters &params) const
bool operator==(const OdGiToneOperatorParameters &params) const
OdGiToneOperatorParameters & operator=(const OdGiToneOperatorParameters &params)
virtual double brightness() const =0
virtual void setDefaultLightingShadowParameters(const OdGiShadowParameters &params)=0
virtual OdGeVector3d userDefinedLightDirection() const =0
virtual void setUserDefinedLightDirection(const OdGeVector3d &lightDirection)=0
virtual void setBrightness(double brightness)=0
virtual void setRenderSettings(OdDbStub *rs)=0
virtual OdDbStub * renderEnvironment() const =0
virtual OdDbStub * renderSettings() const =0
virtual OdCmEntityColor defaultLightingColor() const =0
virtual void setAmbientLightColor(const OdCmEntityColor &color)=0
virtual void setContrast(double contrast)=0
ODRX_DECLARE_MEMBERS(OdGiViewportTraits)
virtual void setBackground(OdDbStub *bg)=0
virtual void setRenderEnvironment(OdDbStub *re)=0
virtual double contrast() const =0
virtual OdDbStub * background() const =0
virtual DefaultLightingType defaultLightingType() const =0
virtual void setDefaultLightingOn(bool b)=0
virtual void setDefaultLightingColor(const OdCmEntityColor &color)=0
virtual OdCmEntityColor ambientLightColor() const =0
virtual void toneOperatorParameters(OdGiToneOperatorParameters &params)=0
virtual bool isDefaultLightingOn() const =0
virtual void defaultLightingShadowParameters(OdGiShadowParameters &params) const =0
virtual void setToneOperatorParameters(const OdGiToneOperatorParameters &params)=0
virtual void setDefaultLightingIntensity(double dIntensity)=0
virtual void setDefaultLightingType(DefaultLightingType)=0
virtual double defaultLightingIntensity() const =0
GLenum GLint * params
Definition: gles2_ext.h:184
bool operator==(const BlockRefPath &rA, const BlockRefPath &rB)
DOM.
bool operator!=(const BlockRefPath &rA, const BlockRefPath &rB)
DOM.