#include "xrigidvertlist.h"

XRigidVertList::XRigidVertList()
    : XAsset()
    , mBoneOffset(0)
    , mVertCount(0)
    , mTriOffset(0)
    , mTriCount(0)
    , mCollisionTree()
{
    SetName("Rigid Vertex List");
}

XRigidVertList::~XRigidVertList()
{

}

void XRigidVertList::ParseData(XDataStream *aStream)
{
    *aStream >> mBoneOffset;
    if (IsDebug())
    {
        qDebug() << QString("[%1] mBoneOffset = %2").arg(aStream->device()->pos(), 10, 10, QChar('0')).arg(mBoneOffset);
    }

    *aStream >> mVertCount;
    if (IsDebug())
    {
        qDebug() << QString("[%1] mVertCount = %2").arg(aStream->device()->pos(), 10, 10, QChar('0')).arg(mVertCount);
    }

    *aStream >> mTriOffset;
    if (IsDebug())
    {
        qDebug() << QString("[%1] mTriOffset = %2").arg(aStream->device()->pos(), 10, 10, QChar('0')).arg(mTriOffset);
    }

    *aStream >> mTriCount;
    if (IsDebug())
    {
        qDebug() << QString("[%1] mTriCount = %2").arg(aStream->device()->pos(), 10, 10, QChar('0')).arg(mTriCount);
    }

    mCollisionTree.ParsePtr(aStream);
}

void XRigidVertList::Clear()
{
    
}
