Updated libs/xassets/xgfxlightgrid.cpp
This commit is contained in:
parent
3af6532904
commit
3ffcec4a71
61
libs/xassets/xgfxlightgrid.cpp
Normal file
61
libs/xassets/xgfxlightgrid.cpp
Normal file
@ -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<XGfxLightGridEntry>();
|
||||||
|
mColorCount = 0;
|
||||||
|
mColors = QVector<XGfxLightGridColors>();
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user