CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GiViewportTraits.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_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
41{
42public:
47 {
49 kDaylightOff = 0,
51 kDaylightOn = 1,
53 kDaylightAuto = 2
54 };
55public:
57
74
80
85
103
121
127
132 virtual void setIsActive(bool bActive);
133
139 virtual bool isActive() const;
140
141
146 virtual void setChromaticAdaptation(bool bEnable);
147
153 virtual bool chromaticAdaptation() const;
154
155
160 virtual void setColorDifferentiation(bool bEnable);
161
167 virtual bool colorDifferentiation() const;
168
173 virtual void setWhiteColor(const OdCmEntityColor &color);
174
178 virtual const OdCmEntityColor &whiteColor() const;
179
180
185 virtual void setProcessBackground(bool bProcessBg);
186
192 virtual bool processBackground() const;
193
194
201 virtual bool setBrightness(double fBrightness);
202
206 virtual double brightness() const;
207
208
215 virtual bool setContrast(double fContrast);
216
220 virtual double contrast() const;
221
222
229 virtual bool setMidTones(double fMidTones);
230
234 virtual double midTones() const;
235
236
244
249private:
250 bool m_bIsActive;
251 bool m_bChromaticAdaptation;
252 bool m_bColorDifferentiation;
253 OdCmEntityColor m_clrWhiteColor;
254 bool m_bProcessBackground;
255 double m_fBrightness;
256 double m_fContrast;
257 double m_fMidTones;
258 ExteriorDaylightMode m_eExteriorDaylight;
259};
260
265class OdGiToneOperatorParametersStatic : public OdStaticRxObject<OdGiToneOperatorParameters>
266{
267 public:
288 bool operator ==(const OdGiToneOperatorParameters &params) const { return params.operator ==(*this); }
289
306 bool operator !=(const OdGiToneOperatorParameters &params) const { return params.operator !=(*this); }
308};
309
314
321{
322public:
324
334
340
345
353
361
367
368
373 virtual bool setExposure(double fExposure);
374
378 virtual double exposure() const;
379
380
385 virtual bool setWhitePoint(double fWhitePoint);
386
390 virtual double whitePoint() const;
391
396 virtual bool setBrightness(double fBrightness);
397
402
407 static double convertExposureToBrightness(double fExposure);
408
413 static double convertBrightnessToExposure(double fBrightness);
414private:
415 double m_fExposure;
416 double m_fWhitePoint;
417};
418
423class OdGiPhotographicExposureParametersStatic : public OdStaticRxObject<OdGiPhotographicExposureParameters>
424{
425public:
436 bool operator ==(const OdGiPhotographicExposureParameters &params) const { return params.operator ==(*this); }
437
444 bool operator !=(const OdGiPhotographicExposureParameters &params) const { return params.operator !=(*this); }
445
451};
452
457
465{
466public:
468
473 {
475 kOneDistantLight = 0,
477 kTwoDistantLights = 1,
479 kBackLighting = 2,
481 kUserDefinedLight = 3
482 };
483
484
490 virtual bool isDefaultLightingOn() const = 0;
495 virtual void setDefaultLightingOn(bool b) = 0;
496
497
507
508
517 virtual void setUserDefinedLightDirection(const OdGeVector3d& lightDirection) = 0;
518
519
523 virtual double defaultLightingIntensity() const = 0;
528 virtual void setDefaultLightingIntensity(double dIntensity) = 0;
529
530
539 virtual void setDefaultLightingColor(const OdCmEntityColor& color) = 0;
540
541
552
553
558 virtual void setAmbientLightColor(const OdCmEntityColor& color) = 0;
563
564
569 virtual void setContrast(double contrast) = 0;
573 virtual double contrast() const = 0;
574
575
580 virtual void setBrightness(double brightness) = 0;
584 virtual double brightness() const = 0;
585
586
591 virtual void setBackground(OdDbStub* bg) = 0;
595 virtual OdDbStub* background() const = 0;
596
597
602 virtual void setRenderEnvironment(OdDbStub* re) = 0;
606 virtual OdDbStub* renderEnvironment () const = 0;
607
608
613 virtual void setRenderSettings(OdDbStub* rs) = 0;
617 virtual OdDbStub* renderSettings() const = 0;
618
619
630};
631
636
637#include "TD_PackPop.h"
638
639#endif // __OD_GI_VIEWPORT_TRAITS__
bool operator!=(T left, const OdGiVariant::EnumType right)
Definition: GiVariant.h:403
bool operator==(T left, const OdGiVariant::EnumType right)
Definition: GiVariant.h:397
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 const OdCmEntityColor & whiteColor() 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 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)
OdGiToneOperatorParameters & operator=(const OdGiToneOperatorParameters &params)
bool operator!=(const OdGiToneOperatorParameters &params) const
bool operator==(const OdGiToneOperatorParameters &params) const
virtual OdDbStub * renderEnvironment() const =0
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 OdCmEntityColor defaultLightingColor() const =0
virtual void setAmbientLightColor(const OdCmEntityColor &color)=0
virtual void setContrast(double contrast)=0
virtual OdDbStub * background() const =0
virtual OdDbStub * renderSettings() const =0
ODRX_DECLARE_MEMBERS(OdGiViewportTraits)
virtual void setBackground(OdDbStub *bg)=0
virtual void setRenderEnvironment(OdDbStub *re)=0
virtual double contrast() 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