XPlor/libs/xassets/xgfxlight.h
2025-09-03 13:02:23 -04:00

75 lines
1.5 KiB
C++

#ifndef XGFXLIGHT_H
#define XGFXLIGHT_H
#include "qcolor.h"
#include "xasset.h"
class XGfxLightDef;
class XGfxLight : public XAsset
{
public:
explicit XGfxLight();
~XGfxLight();
void ParseData(QDataStream *aStream) override;
unsigned char GetType() const;
void SetType(unsigned char aType);
unsigned char CanUseShadowMap() const;
void SetCanUseShadowMap(bool aCanUse);
QColor GetColor() const;
void SetColor(const QColor& aColor);
QVector<float> GetDir() const;
void SetDir(const QVector<float> &aDir);
QVector<float> GetOrigin() const;
void SetOrigin(const QVector<float> &aOrigin);
float GetRadius() const;
void SetRadius(float aRadius);
float GetCosHalfFovOuter() const;
void SetCosHalfFovOuter(float aCosHalfFov);
float GetCosHalfFovInner() const;
void SetCosHalfFovInner(float aCosHalfFov);
int GetExponent() const;
void SetExponent(int aExponent);
unsigned int GetSpotShadowIndex() const;
void SetSpotShadowIndex(unsigned int aIndex);
int GetDefPtr() const;
void SetDefPtr(int ptr);
private:
unsigned char mType;
unsigned char mCanUseShadowMap;
QVector<unsigned char> mUnused;
QColor mColor;
QVector<float> mDir;
QVector<float> mOrigin;
float mRadius;
float mCosHalfFovOuter;
float mCosHalfFovInner;
qint32 mExponent;
quint32 mSpotShadowIndex;
qint32 mDefPtr;
XGfxLightDef *mDef;
};
#endif // XGFXLIGHT_H