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