




#include "xanimparttransframes.h"

XAnimPartTransFrames::XAnimPartTransFrames()
    : XAsset() {
}

void XAnimPartTransFrames::ParseData(QDataStream *aStream) {
    if (GetPtr() == -1) {
        aStream->read((char*)mMins, 3 * sizeof(float));
        aStream->read((char*)mSize, 3 * sizeof(float));

        // Parse frames
        mFrames.ParseData(aStream);

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

const float* XAnimPartTransFrames::GetMins() const {
    return mMins;
}

void XAnimPartTransFrames::SetMins(const float* mins, size_t count) {
    if (count <= 3) {
        memcpy(mMins, mins, count * sizeof(float));
    }
}

const float* XAnimPartTransFrames::GetSize() const {
    return mSize;
}

void XAnimPartTransFrames::SetSize(const float* size, size_t count) {
    if (count <= 3) {
        memcpy(mSize, size, count * sizeof(float));
    }
}

XAnimDynamicFrames& XAnimPartTransFrames::GetFrames() {
    return mFrames;
}

const XAnimDynamicFrames& XAnimPartTransFrames::GetFrames() const {
    return mFrames;
}

void XAnimPartTransFrames::SetFrames(const XAnimDynamicFrames& frames) {
    mFrames = frames;
}

XAnimDynamicIndices& XAnimPartTransFrames::GetIndices() {
    return mIndices;
}

const XAnimDynamicIndices& XAnimPartTransFrames::GetIndices() const {
    return mIndices;
}

void XAnimPartTransFrames::SetIndices(const XAnimDynamicIndices& indices) {
    mIndices = indices;
}




