#ifndef XMODEL_H
#define XMODEL_H

#include "xasset.h"
#include "xmodelstreaminfo.h"
#include "xphysgeomlist.h"
#include "xphyspreset.h"
#include "xscriptstringlist.h"
#include "xboneinfo.h"
#include "xmodellodinfo.h"
#include "xmodelcollsurf.h"
#include "xmaterial.h"
#include "xsurface.h"
#include "xdobjanimmat.h"

class XModel : public XAsset
{
public:
    explicit XModel();

    virtual void ParseData(QDataStream* aStream) override;
    virtual void Clear() override;

private:
    QString mName;
    quint8 mNumBones;
    quint8 mNumRootBones;
    quint8 mNumSurfs;
    quint8 mLodRampType;
    XScriptStringList mBoneNames;
    QVector<quint8> mParentList;
    QVector<quint8> mQuats;
    float *mTrans;
    quint8 *mPartClassification;
    XDObjAnimMat *mBaseMat;
    QVector<XSurface> mSurfs;
    QVector<XMaterial*> mMaterialHandles;
    QVector<XModelLodInfo> mLodInfo;
    QVector<XModelCollSurf> mCollSurfs;
    int mNumCollSurfs;
    int mContents;
    XBoneInfo* mBoneInfo;
    float mRadius;
    QVector3D mMins;
    QVector3D mMaxs;
    qint16 mNumLods;
    qint16 mCollLod;
    XModelStreamInfo mStreamInfo;
    int mMemUsage;
    quint8 mFlags;
    XPhysPreset* mPhysPreset;
    XPhysGeomList* mPhysGeoms;
};

#endif // XMODEL_H
