#include "xanimdeltapartquatdata.h"

XAnimDeltaPartQuatData::XAnimDeltaPartQuatData()
    : XAsset() {
}

void XAnimDeltaPartQuatData::ParseData(QDataStream *aStream) {
    if (GetPtr() == -1) {
        // Parse frames
        mFrames.ParseData(aStream);
    }
}

const XAnimDeltaPartQuatDataFrames& XAnimDeltaPartQuatData::GetFrames() const {
    return mFrames;
}

void XAnimDeltaPartQuatData::SetFrames(const XAnimDeltaPartQuatDataFrames& frames) {
    mFrames = frames;
}

const qint16* XAnimDeltaPartQuatData::GetFrame0() const {
    return mFrame0;
}

void XAnimDeltaPartQuatData::SetFrame0(const qint16* frame0, size_t count) {
    if (count <= 2) {
        memcpy(mFrame0, frame0, count * sizeof(qint16));
    }
}
