struct cogs::Color4f — HIRO 0.7.0 documentation

# struct cogs::Color4f

Holds four color channels in float format in range 0-1.

    #include <Color.h>

    struct Color4f {
        // fields

        float r = 0.0f;
        float g = 0.0f;
        float b = 0.0f;
        float a = 1.0f;

        // construction

        Color4f();
        Color4f(float red, float green, float blue, float alpha);
        Color4f(const Color3b& col);
        Color4f(const Color4b& col);
        Color4f(const Color3f& col);
        Color4f(const Color3f& col, float alpha);
        Color4f(const Color3hex& col);
        Color4f(const Color4hex& col);

        // methods

        float* GetPtr();
        const float* GetPtr() const;
        Color4f operator+(const Color4f& col) const;
        Color4f& operator+=(const Color4f& col);
        Color4f& operator*=(float multiplier);
        Color4f Mix(const Color4f& col, float weight) const;
    };