change conversions to static_cast
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -83,12 +83,12 @@ struct SANDBOX_API DisplayContext
|
||||
// Draw functions
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Set current materialc color.
|
||||
void SetColor(float r, float g, float b, float a = 1) { m_color4b = ColorB(aznumeric_cast<uint8>(r * 255.0f), aznumeric_cast<uint8>(g * 255.0f), aznumeric_cast<uint8>(b * 255.0f), aznumeric_cast<uint8>(a * 255.0f)); };
|
||||
void SetColor(const Vec3& color, float a = 1) { m_color4b = ColorB(aznumeric_cast<uint8>(color.x * 255.0f), aznumeric_cast<uint8>(color.y * 255.0f), aznumeric_cast<uint8>(color.z * 255.0f), aznumeric_cast<uint8>(a * 255.0f)); };
|
||||
void SetColor(const QColor& rgb, float a) { m_color4b = ColorB(aznumeric_cast<uint8>(rgb.red()), aznumeric_cast<uint8>(rgb.green()), aznumeric_cast<uint8>(rgb.blue()), aznumeric_cast<uint8>(a * 255.0f)); };
|
||||
void SetColor(const QColor& color) { m_color4b = ColorB(aznumeric_cast<uint8>(color.red()), aznumeric_cast<uint8>(color.green()), aznumeric_cast<uint8>(color.blue()), aznumeric_cast<uint8>(color.alpha())); };
|
||||
void SetColor(float r, float g, float b, float a = 1) { m_color4b = ColorB(static_cast<uint8>(r * 255.0f), static_cast<uint8>(g * 255.0f), static_cast<uint8>(b * 255.0f), static_cast<uint8>(a * 255.0f)); };
|
||||
void SetColor(const Vec3& color, float a = 1) { m_color4b = ColorB(static_cast<uint8>(color.x * 255.0f), static_cast<uint8>(color.y * 255.0f), static_cast<uint8>(color.z * 255.0f), static_cast<uint8>(a * 255.0f)); };
|
||||
void SetColor(const QColor& rgb, float a) { m_color4b = ColorB(static_cast<uint8>(rgb.red()), static_cast<uint8>(rgb.green()), static_cast<uint8>(rgb.blue()), static_cast<uint8>(a * 255.0f)); };
|
||||
void SetColor(const QColor& color) { m_color4b = ColorB(static_cast<uint8>(color.red()), static_cast<uint8>(color.green()), static_cast<uint8>(color.blue()), static_cast<uint8>(color.alpha())); };
|
||||
void SetColor(const ColorB& color) { m_color4b = color; };
|
||||
void SetAlpha(float a = 1) { m_color4b.a = aznumeric_cast<uint8>(a * 255.0f); };
|
||||
void SetAlpha(float a = 1) { m_color4b.a = static_cast<uint8>(a * 255.0f); };
|
||||
ColorB GetColor() const { return m_color4b; }
|
||||
|
||||
void SetSelectedColor(float fAlpha = 1);
|
||||
|
||||
Reference in New Issue
Block a user