#ifndef XSURFACE_H
#define XSURFACE_H

#include "xasset.h"
#include "xd3dindexbuffer.h"
#include "xrigidvertlist.h"
#include "xsurfacevertexinfo.h"
#include "xgfxpackedvertex.h"
#include "xd3dvertexbuffer.h"

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

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

private:
    quint8 mTileMode;
    bool mDeformed;
    quint16 mVertCount;
    quint16 mTriCount;
    quint16 *mTriIndices;
    XSurfaceVertexInfo mVertInfo;
    XGfxPackedVertex *mVerts0;
    XD3DVertexBuffer mVb0;
    unsigned int mVertListCount;
    QVector<XRigidVertList> mVertList;
    XD3DIndexBuffer mIndexBuffer;
    int mPartBits[4];
};

#endif // XSURFACE_H








