XPlor/libs/xassets/xgfxlightgrid.cpp

63 lines
1.3 KiB
C++
Raw Permalink Normal View History

2025-09-05 21:33:20 +00:00
#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()
{
2025-09-10 21:58:26 -04:00
SetName("GFX Light Grid");
2025-09-05 21:33:20 +00:00
}
XGfxLightGrid::~XGfxLightGrid()
{
2025-09-10 21:58:26 -04:00
2025-09-05 21:33:20 +00:00
}
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<XGfxLightGridEntry>();
mColorCount = 0;
mColors = QVector<XGfxLightGridColors>();
}
2025-09-10 21:58:26 -04:00
void XGfxLightGrid::ParseData(XDataStream *aStream)
2025-09-05 21:33:20 +00:00
{
// 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;
}