CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OdGiGradientBackgroundTraitsData Class Reference

#include <GiEnvironmentTraitsData.h>

Inheritance diagram for OdGiGradientBackgroundTraitsData:
OdGiBackgroundTraitsData

Public Member Functions

 OdGiGradientBackgroundTraitsData ()
 
OdCmEntityColor colorTop () const
 
void setColorTop (const OdCmEntityColor &color)
 
OdCmEntityColor colorMiddle () const
 
void setColorMiddle (const OdCmEntityColor &color)
 
OdCmEntityColor colorBottom () const
 
void setColorBottom (const OdCmEntityColor &color)
 
double horizon () const
 
double height () const
 
double rotation () const
 
void setHorizon (double value)
 
void setHeight (double value)
 
void setRotation (double value)
 
bool operator== (const OdGiGradientBackgroundTraitsData &data2) const
 
bool operator!= (const OdGiGradientBackgroundTraitsData &data2) const
 
- Public Member Functions inherited from OdGiBackgroundTraitsData
OdGiDrawable::DrawableType type () const
 
bool operator== (const OdGiBackgroundTraitsData &data2) const
 
bool operator!= (const OdGiBackgroundTraitsData &data2) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdGiBackgroundTraitsData
static void deleteBackgroundTraitsData (OdGiBackgroundTraitsData *pBackgroundTraits)
 
- Protected Member Functions inherited from OdGiBackgroundTraitsData
 OdGiBackgroundTraitsData ()
 
- Protected Attributes inherited from OdGiBackgroundTraitsData
OdGiDrawable::DrawableType m_type
 

Detailed Description

Corresponding C++ library: TD_Gi <group OdGi_Classes>

Definition at line 152 of file GiEnvironmentTraitsData.h.

Constructor & Destructor Documentation

◆ OdGiGradientBackgroundTraitsData()

OdGiGradientBackgroundTraitsData::OdGiGradientBackgroundTraitsData ( )
inline

Default constructor for the OdGiGradientBackgroundTraitsData class. Sets the OdGiDrawable::kSolidBackground type for this object and horizon, height and rotation parameters to 0.

Definition at line 166 of file GiEnvironmentTraitsData.h.

Member Function Documentation

◆ colorBottom()

OdCmEntityColor OdGiGradientBackgroundTraitsData::colorBottom ( ) const
inline

Retrieves a bottom color of this background.

Returns
bottom color as instance of the OdCmEntityColor class.

Definition at line 204 of file GiEnvironmentTraitsData.h.

◆ colorMiddle()

OdCmEntityColor OdGiGradientBackgroundTraitsData::colorMiddle ( ) const
inline

Retrieves a middle color of this background.

Returns
middle color as instance of the OdCmEntityColor class.

Definition at line 189 of file GiEnvironmentTraitsData.h.

◆ colorTop()

OdCmEntityColor OdGiGradientBackgroundTraitsData::colorTop ( ) const
inline

Retrieves a top color of this background.

Returns
top color as instance of the OdCmEntityColor class.

Definition at line 174 of file GiEnvironmentTraitsData.h.

◆ height()

double OdGiGradientBackgroundTraitsData::height ( ) const
inline

Receives height of the middle color.

Returns
height of a middle color.

Definition at line 228 of file GiEnvironmentTraitsData.h.

◆ horizon()

double OdGiGradientBackgroundTraitsData::horizon ( ) const
inline

Retrieves a position of a middle color relative to top and bottom colors.

Returns
horizon that represents position of a middle color relative to top and bottom colors.

Definition at line 220 of file GiEnvironmentTraitsData.h.

◆ operator!=()

bool OdGiGradientBackgroundTraitsData::operator!= ( const OdGiGradientBackgroundTraitsData data2) const
inline

Checks whether the passed traits for gradient backgrounds are not equal to these traits. Traits are considered not equal if one of the following conditions fails: Top colors are equal; Middle colors are equal; Bottom colors are equal; Horizons are equal; Horizon heights are equal; Rotations are equal.

Parameters
data2[in] Background traits to compare.
Returns
true if background traits are not equal, false otherwise.

Definition at line 315 of file GiEnvironmentTraitsData.h.

◆ operator==()

bool OdGiGradientBackgroundTraitsData::operator== ( const OdGiGradientBackgroundTraitsData data2) const
inline

Checks whether the passed traits for gradient backgrounds are equal to these traits. Traits are considered equal if: Top colors are equal; Middle colors are equal; Bottom colors are equal; Horizons are equal; Horizon heights are equal; Rotations are equal.

Parameters
data2[in] Background traits to compare.
Returns
true if background traits are equal, false otherwise.

Definition at line 289 of file GiEnvironmentTraitsData.h.

◆ rotation()

double OdGiGradientBackgroundTraitsData::rotation ( ) const
inline

Receives rotation of the gradient.

Returns
degrees of counter clock-wise gradient rotation.

Definition at line 236 of file GiEnvironmentTraitsData.h.

◆ setColorBottom()

void OdGiGradientBackgroundTraitsData::setColorBottom ( const OdCmEntityColor color)
inline

Specifies a bottom color for this background.

Parameters
color[in] Bottom color.

Definition at line 211 of file GiEnvironmentTraitsData.h.

◆ setColorMiddle()

void OdGiGradientBackgroundTraitsData::setColorMiddle ( const OdCmEntityColor color)
inline

Specifies a middle color for this background.

Parameters
color[in] Middle color.

Definition at line 196 of file GiEnvironmentTraitsData.h.

◆ setColorTop()

void OdGiGradientBackgroundTraitsData::setColorTop ( const OdCmEntityColor color)
inline

Specifies a top color for this background.

Parameters
color[in] Top color.

Definition at line 181 of file GiEnvironmentTraitsData.h.

◆ setHeight()

void OdGiGradientBackgroundTraitsData::setHeight ( double  value)
inline

Specifies height of the middle color.

Parameters
height[in] Height of the middle color.
Remarks
For example, if you call the setHorizon() method and pass 0.5 and then call this method with 0.33 value then all 3 gradient colors are equally distributed inside scene window (if no rotation applied).

Definition at line 259 of file GiEnvironmentTraitsData.h.

◆ setHorizon()

void OdGiGradientBackgroundTraitsData::setHorizon ( double  value)
inline

Specifies a position of a middle color relative to top and bottom colors.

Parameters
horizon[in] Position of a middle color in range where 0 is the beginning of device coordinate system and 1 is end of of device coordinate system.
Remarks
For example, if you call this method and pass 0.5, a middle color will reside in the middle of a window (if no rotation applied). The passed value may lie out of [0..1] range, which means that position for middle color is set off-screen.

Definition at line 248 of file GiEnvironmentTraitsData.h.

◆ setRotation()

void OdGiGradientBackgroundTraitsData::setRotation ( double  value)
inline

Specifies rotation of the gradient.

Parameters
rotation[in] Rotation in degrees.
Remarks
Rotation is performed the counter clock-wise direction, relative to window coordinates. For example, if you call this method with the 45.0 value the gradient background is so the beginning of gradient is in lower-left corner of a window and the end is in the upper-right corner.

Definition at line 271 of file GiEnvironmentTraitsData.h.


The documentation for this class was generated from the following file: