24 #ifndef __OD_GI_VIEWPORT_TRAITS_DATA__
25 #define __OD_GI_VIEWPORT_TRAITS_DATA__
39 OdDbStub* m_backgroundId;
43 double m_defLightIntensity;
49 OdDbStub* m_renderEnvId;
50 OdDbStub* m_renderSettings;
51 OdDbStub* m_visualStyle;
57 : m_backgroundId(
NULL)
58 , m_bDefLightOn(
false)
61 , m_defLightIntensity(0.5)
62 , m_defLightColor(255, 255, 255)
68 , m_renderSettings(
NULL)
72 m_pToneOperators = OdGiToneOperatorParameters::createObject();
79 m_backgroundId = backgroundId;
83 return m_backgroundId;
106 return m_userDefLightDir;
110 m_userDefLightDir = lightDirection;
115 return m_defLightIntensity;
119 m_defLightIntensity = dIntensity;
124 return m_defLightColor;
128 m_defLightColor = color;
133 return m_defShadowParams;
137 m_defShadowParams =
params;
142 m_colorAmbient = clr;
146 return m_colorAmbient;
155 return m_dBrightness;
169 m_renderEnvId = renderEnvId;
173 return m_renderEnvId;
178 m_renderSettings = renderSettingsId;
182 return m_renderSettings;
187 m_visualStyle = visualStyleId;
191 return m_visualStyle;
199 m_pToneOperators = OdGiPhotographicExposureParameters::createObject();
205 m_pToneOperators = OdGiToneOperatorParameters::createObject();
206 *m_pToneOperators =
params;
215 params = *m_pToneOperators;
219 return *m_pToneOperators;
226 if (bPhoto1 && bPhoto2)
228 else if (!bPhoto1 && !bPhoto2)
235 return ((m_backgroundId == data2.m_backgroundId) &&
236 (m_bDefLightOn == data2.m_bDefLightOn) &&
237 (m_lightType == data2.m_lightType) &&
238 m_userDefLightDir.
isEqualTo(data2.m_userDefLightDir) &&
239 (m_colorAmbient == data2.m_colorAmbient) &&
240 OdEqual(m_dBrightness, data2.m_dBrightness) &&
241 OdEqual(m_dContrast, data2.m_dContrast) &&
242 (m_renderEnvId == data2.m_renderEnvId) &&
243 (m_renderSettings == data2.m_renderSettings) &&
244 (m_visualStyle == data2.m_visualStyle) &&
249 return !(*
this == data2);
bool OdEqual(double x, double y, double tol=1.e-10)
bool isEqualTo(const OdGeVector3d &vect, const OdGeTol &tol=OdGeContext::gTol) const
void setShadowsOn(bool on)
static bool compareToneOps(const OdGiToneOperatorParametersPtr &op1, const OdGiToneOperatorParametersPtr &op2)
void setDefaultLightingColor(const OdCmEntityColor &color)
void setDefaultLightingType(OdGiViewportTraits::DefaultLightingType typ)
void setDefaultLightingShadowParameters(const OdGiShadowParameters ¶ms)
void setDefaultLightingIntensity(double dIntensity)
const OdGiToneOperatorParameters & toneOperatorParameters() const
OdGiViewportTraits::DefaultLightingType defaultLightingType() const
OdDbStub * background() const
OdDbStub * renderSettings() const
OdDbStub * renderEnvironment() const
void setBrightness(double brightness)
void setDefaultLightingOn(bool on)
const OdCmEntityColor & defaultLightingColor() const
OdGiDrawable::DrawableType type() const
bool operator!=(const OdGiViewportTraitsData &data2) const
OdDbStub * visualStyle() const
OdGeVector3d userDefinedLightDirection() const
void toneOperatorParameters(OdGiToneOperatorParameters ¶ms) const
void setVisualStyle(OdDbStub *visualStyleId)
void setContrast(double contrast)
void setAmbientLightColor(const OdCmEntityColor &clr)
void setRenderEnvironment(OdDbStub *renderEnvId)
bool isDefaultLightingOn() const
double brightness() const
double defaultLightingIntensity() const
void setToneOperatorParameters(const OdGiToneOperatorParameters ¶ms)
void setUserDefinedLightDirection(const OdGeVector3d &lightDirection)
bool operator==(const OdGiViewportTraitsData &data2) const
const OdGiShadowParameters & defaultLightingShadowParameters() const
const OdCmEntityColor & ambientLightColor() const
void setBackground(OdDbStub *backgroundId)
void setRenderSettings(OdDbStub *renderSettingsId)
static OdRxClass * desc()
bool isKindOf(const OdRxClass *pClass) const