Search Results for

    Show / Hide Table of Contents

    Struct LinearColor

    Represents a 32-bit color in Linear Space.

    Implements
    IEquatable<LinearColor>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Evergine.Common.Graphics
    Assembly: Evergine.Common.dll
    Syntax
    public struct LinearColor : IEquatable<LinearColor>

    Constructors

    LinearColor(ref Color)

    Initializes a new instance of the LinearColor struct.

    Declaration
    public LinearColor(ref Color gammaColor)
    Parameters
    Type Name Description
    Color gammaColor

    The Color instance in Gamma space.

    LinearColor(Vector3)

    Initializes a new instance of the LinearColor struct.

    Declaration
    public LinearColor(Vector3 vector)
    Parameters
    Type Name Description
    Vector3 vector

    Vector3 with the color data.

    LinearColor(Vector4)

    Initializes a new instance of the LinearColor struct.

    Declaration
    public LinearColor(Vector4 vector)
    Parameters
    Type Name Description
    Vector4 vector

    Vector4 with the color data.

    LinearColor(float)

    Initializes a new instance of the LinearColor struct.

    Declaration
    public LinearColor(float k)
    Parameters
    Type Name Description
    float k

    The color temperature in Kelvin.

    LinearColor(float, float, float, float)

    Initializes a new instance of the LinearColor struct.

    Declaration
    public LinearColor(float r, float g, float b, float a = 1)
    Parameters
    Type Name Description
    float r

    The r color component in linear space.

    float g

    The g color component in linear space.

    float b

    The b color component in linear space.

    float a

    The a color component in linear space.

    LinearColor(string)

    Initializes a new instance of the LinearColor struct.

    Declaration
    public LinearColor(string hex)
    Parameters
    Type Name Description
    string hex

    hexadecimal color code.

    Fields

    A

    The w coordinate of this LinearColor.

    Declaration
    public float A
    Field Value
    Type Description
    float

    AsVector3

    The linear color converted to Vector3.

    Declaration
    public Vector3 AsVector3
    Field Value
    Type Description
    Vector3

    AsVector4

    The linear color converted to Vector4.

    Declaration
    public Vector4 AsVector4
    Field Value
    Type Description
    Vector4

    B

    The z coordinate of this LinearColor.

    Declaration
    public float B
    Field Value
    Type Description
    float

    G

    The y coordinate of this LinearColor.

    Declaration
    public float G
    Field Value
    Type Description
    float

    R

    The x coordinate of this LinearColor.

    Declaration
    public float R
    Field Value
    Type Description
    float

    Methods

    Equals(LinearColor)

    Declaration
    public bool Equals(LinearColor other)
    Parameters
    Type Name Description
    LinearColor other
    Returns
    Type Description
    bool

    Equals(ref LinearColor)

    Indicates whether this instance and a specified LinearColor are equal.

    Declaration
    public bool Equals(ref LinearColor other)
    Parameters
    Type Name Description
    LinearColor other

    The vector to compare with the current instance.

    Returns
    Type Description
    bool

    true if other and this instance are the same type and represent the same value; otherwise, false.

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    ValueType.Equals(object)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    ValueType.GetHashCode()

    ToColor()

    Convert to Color (in Gamma space).

    Declaration
    public Color ToColor()
    Returns
    Type Description
    Color

    The output color.

    ToColor(out Color)

    Convert to Color (in Gamma space).

    Declaration
    public void ToColor(out Color color)
    Parameters
    Type Name Description
    Color color

    The output color.

    ToGamma()

    Convert to Gamma color space.

    Declaration
    public GammaColor ToGamma()
    Returns
    Type Description
    GammaColor

    The converted Gamma color.

    ToGamma(out GammaColor)

    Convert to Gamma color space.

    Declaration
    public void ToGamma(out GammaColor gammaColor)
    Parameters
    Type Name Description
    GammaColor gammaColor

    The converted Gamma color.

    ToLinear()

    Convert to Linear color space.

    Declaration
    public LinearColor ToLinear()
    Returns
    Type Description
    LinearColor

    The converted linear color.

    ToLinear(out LinearColor)

    Convert to Linear color space.

    Declaration
    public void ToLinear(out LinearColor linearColor)
    Parameters
    Type Name Description
    LinearColor linearColor

    The converted linear color.

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    ValueType.ToString()

    Operators

    operator /(LinearColor, float)

    Implements the operator /.

    Declaration
    public static LinearColor operator /(LinearColor a, float b)
    Parameters
    Type Name Description
    LinearColor a

    First LinearColor.

    float b

    Second LinearColor.

    Returns
    Type Description
    LinearColor

    The result of the operator.

    operator ==(LinearColor, LinearColor)

    Implements the operator ==.

    Declaration
    public static bool operator ==(LinearColor lhs, LinearColor rhs)
    Parameters
    Type Name Description
    LinearColor lhs

    The LHS.

    LinearColor rhs

    The RHS.

    Returns
    Type Description
    bool

    The result of the operator.

    operator !=(LinearColor, LinearColor)

    Implements the operator !=.

    Declaration
    public static bool operator !=(LinearColor lhs, LinearColor rhs)
    Parameters
    Type Name Description
    LinearColor lhs

    The LHS.

    LinearColor rhs

    The RHS.

    Returns
    Type Description
    bool

    The result of the operator.

    operator *(LinearColor, float)

    Implements the operator *.

    Declaration
    public static LinearColor operator *(LinearColor a, float b)
    Parameters
    Type Name Description
    LinearColor a

    First LinearColor.

    float b

    Second LinearColor.

    Returns
    Type Description
    LinearColor

    The result of the operator.

    operator *(float, LinearColor)

    Implements the operator *.

    Declaration
    public static LinearColor operator *(float b, LinearColor a)
    Parameters
    Type Name Description
    float b

    First LinearColor.

    LinearColor a

    Second LinearColor.

    Returns
    Type Description
    LinearColor

    The result of the operator.

    Implements

    IEquatable<T>

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In This Article
    Back to top
    Generated by DocFX