#include "xanimparttransframes.h"

XAnimPartTransFrames::XAnimPartTransFrames()
    : XAsset()
    , mMins()
    , mMaxs()
    , mFrames()
    , mIndices()
{
}

XAnimPartTransFrames::~XAnimPartTransFrames()
{

}

void XAnimPartTransFrames::ParseData(QDataStream *aStream) {
    if (GetPtr() == -1) {
        *aStream
            >> mMins[0]
            >> mMins[1]
            >> mMins[2]
            >> mMaxs[0]
            >> mMaxs[1]
            >> mMaxs[2];

        // Parse frames
        mFrames.ParseData(aStream);

        // Parse indices
        mIndices.ParseData(aStream);
    }
}

void XAnimPartTransFrames::Clear()
{
    mMins = QVector3D();
    mMaxs = QVector3D();

    mFrames.Clear();
    mIndices.Clear();
}
