#include "xdmaterial.h"
#include "xstring.h"

XDMaterial::XDMaterial()
    : XAsset()
{
    SetName("D Material");
}

XDMaterial::~XDMaterial()
{

}

void XDMaterial::ParseData(XDataStream *aStream) {
    if (GetPtr() == -1) {
        mMaterial = XString::ParseCustom(aStream);

        *aStream
            >> mSurfaceFlags
            >> mContentFlags;
    }
}

const QString& XDMaterial::GetMaterial() const {
    return mMaterial;
}

void XDMaterial::SetMaterial(const QString& material) {
    mMaterial = material;
}

int XDMaterial::GetSurfaceFlags() const {
    return mSurfaceFlags;
}

void XDMaterial::SetSurfaceFlags(int flags) {
    mSurfaceFlags = flags;
}

int XDMaterial::GetContentFlags() const {
    return mContentFlags;
}

void XDMaterial::SetContentFlags(int flags) {
    mContentFlags = flags;
}
