








#ifndef XSUNLIGHTPARSEPARAMS_H
#define XSUNLIGHTPARSEPARAMS_H

#include "xasset.h"

class XSunLightParseParams : public XAsset
{
public:
    explicit XSunLightParseParams();

    void ParseData(QDataStream *aStream) override;

    const char* GetName() const;
    void SetName(const char* name);

    float GetAmbientScale() const;
    void SetAmbientScale(float scale);

    const float* GetAmbientColor() const;
    void SetAmbientColor(const float* color, size_t count = 3);

    float GetDiffuseFraction() const;
    void SetDiffuseFraction(float fraction);

    float GetSunLight() const;
    void SetSunLight(float light);

    const float* GetSunColor() const;
    void SetSunColor(const float* color, size_t count = 3);

    const float* GetDiffuseColor() const;
    void SetDiffuseColor(const float* color, size_t count = 3);

    bool IsDiffuseColorSet() const;
    void SetDiffuseColorSet(bool set);

    const float* GetAngles() const;
    void SetAngles(const float* angles, size_t count = 3);

private:
    char mName[64] = {0};
    float mAmbientScale = 1.0f;
    float mAmbientColor[3] = {0.0f, 0.0f, 0.0f};
    float mDiffuseFraction = 0.0f;
    float mSunLight = 0.0f;
    float mSunColor[3] = {0.0f, 0.0f, 0.0f};
    float mDiffuseColor[3] = {0.0f, 0.0f, 0.0f};
    bool mDiffuseColorHasBeenSet = false;
    float mAngles[3] = {0.0f, 0.0f, 0.0f};
};

#endif // XSUNLIGHTPARSEPARAMS_H








