XPlor/libs/xassets/xgfxlight.h

75 lines
1.5 KiB
C
Raw Normal View History

2025-08-17 13:14:17 -04:00
#ifndef XGFXLIGHT_H
#define XGFXLIGHT_H
#include "qcolor.h"
2025-08-17 13:14:17 -04:00
#include "xasset.h"
class XGfxLightDef;
2025-08-17 13:14:17 -04:00
class XGfxLight : public XAsset
{
public:
explicit XGfxLight();
~XGfxLight();
2025-08-17 13:14:17 -04:00
void ParseData(QDataStream *aStream) override;
unsigned char GetType() const;
void SetType(unsigned char aType);
2025-08-17 13:14:17 -04:00
unsigned char CanUseShadowMap() const;
void SetCanUseShadowMap(bool aCanUse);
2025-08-17 13:14:17 -04:00
QColor GetColor() const;
void SetColor(const QColor& aColor);
2025-08-17 13:14:17 -04:00
QVector<float> GetDir() const;
void SetDir(const QVector<float> &aDir);
2025-08-17 13:14:17 -04:00
QVector<float> GetOrigin() const;
void SetOrigin(const QVector<float> &aOrigin);
2025-08-17 13:14:17 -04:00
float GetRadius() const;
void SetRadius(float aRadius);
2025-08-17 13:14:17 -04:00
float GetCosHalfFovOuter() const;
void SetCosHalfFovOuter(float aCosHalfFov);
2025-08-17 13:14:17 -04:00
float GetCosHalfFovInner() const;
void SetCosHalfFovInner(float aCosHalfFov);
2025-08-17 13:14:17 -04:00
int GetExponent() const;
void SetExponent(int aExponent);
2025-08-17 13:14:17 -04:00
unsigned int GetSpotShadowIndex() const;
void SetSpotShadowIndex(unsigned int aIndex);
2025-08-17 13:14:17 -04:00
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;
2025-08-17 13:14:17 -04:00
};
#endif // XGFXLIGHT_H