diff --git a/libs/xassets/xgfxlightgrid.cpp b/libs/xassets/xgfxlightgrid.cpp new file mode 100644 index 0000000..bc42e0e --- /dev/null +++ b/libs/xassets/xgfxlightgrid.cpp @@ -0,0 +1,61 @@ +#include "xgfxlightgrid.h" + +XGfxLightGrid::XGfxLightGrid() + : XAsset() + , mHasLightRegions(false) + , mSunPrimaryLightIndex(0) + , mMins() + , mMaxs() + , mRowAxis(0) + , mColAxis(0) + , mRowDataStart(nullptr) + , mRawRowDataSize(0) + , mRawRowData(nullptr) + , mEntryCount(0) + , mEntries() + , mColorCount(0) + , mColors() +{ +} + +XGfxLightGrid::~XGfxLightGrid() +{ + Clear(); +} + +void XGfxLightGrid::Clear() +{ + mHasLightRegions = false; + mSunPrimaryLightIndex = 0; + mMins = QVector3D(); + mMaxs = QVector3D(); + mRowAxis = 0; + mColAxis = 0; + mRowDataStart = nullptr; + mRawRowDataSize = 0; + mRawRowData = nullptr; + mEntryCount = 0; + mEntries = QVector(); + mColorCount = 0; + mColors = QVector(); +} + +void XGfxLightGrid::ParseData(QDataStream *aStream) +{ + // Implement parsing logic here + Clear(); + + // Parse data from stream + // Example: + // hasLightRegions = ... + // sunPrimaryLightIndex = ... + // mins[0] = ...; mins[1] = ...; mins[2] = ... + // maxs[0] = ...; maxs[1] = ...; maxs[2] = ... + // rowAxis = ...; colAxis = ... + + // For now, we'll just read some dummy data to keep the compiler happy + qint32 dummy; + *aStream >> dummy; +} + +