








#ifndef XGFXWORLDVERTEX_H
#define XGFXWORLDVERTEX_H

#include "xasset.h"

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

    void ParseData(QDataStream *aStream) override;

    const float* GetXYZ() const;
    void SetXYZ(const float* xyz, size_t count = 3);

    float GetBinormalSign() const;
    void SetBinormalSign(float sign);

    const GfxColor& GetColor() const;
    void SetColor(const GfxColor& color);

    const float* GetTexCoord() const;
    void SetTexCoord(const float* texCoord, size_t count = 2);

    const float* GetLmapCoord() const;
    void SetLmapCoord(const float* lmapCoord, size_t count = 2);

    const PackedUnitVec& GetNormal() const;
    void SetNormal(const PackedUnitVec& normal);

    const PackedUnitVec& GetTangent() const;
    void SetTangent(const PackedUnitVec& tangent);

private:
    float mXYZ[3] = {0.0f, 0.0f, 0.0f};
    float mBinormalSign = 0.0f;
    GfxColor mColor = {0, 0, 0, 255}; // Default to black with full alpha
    float mTexCoord[2] = {0.0f, 0.0f};
    float mLmapCoord[2] = {0.0f, 0.0f};
    PackedUnitVec mNormal;
    PackedUnitVec mTangent;
};

#endif // XGFXWORLDVERTEX_H








