Updated xgfxcell

This commit is contained in:
njohnson 2025-09-07 23:15:57 -04:00
parent ba6da187f3
commit 096da843d1
2 changed files with 56 additions and 1 deletions

View File

@ -23,7 +23,62 @@ XGfxCell::~XGfxCell()
void XGfxCell::ParseData(QDataStream *aStream)
{
qint32 aabbTreePtr, portalsPtr, cullGroupsPtr, reflectionProbesPtr;
*aStream
>> mMins[0]
>> mMins[1]
>> mMins[2]
>> mMaxs[0]
>> mMaxs[1]
>> mMaxs[2]
>> mAabbTreeCount
>> aabbTreePtr
>> mPortalCount
>> portalsPtr
>> mCullGroupCount
>> cullGroupsPtr
>> mReflectionProbeCount
>> reflectionProbesPtr;
if (aabbTreePtr)
{
for (int i = 0; i < mAabbTreeCount; i++)
{
XGfxAabbTree newTree;
newTree.ParseData(aStream);
mAabbTree.append(newTree);
}
}
if (portalsPtr)
{
for (int i = 0; i < mPortalCount; i++)
{
XGfxPortal newPortal;
newPortal.ParseData(aStream);
mPortals.append(newPortal);
}
}
if (cullGroupsPtr)
{
for (int i = 0; i < mCullGroupCount; i++)
{
qint32 newCullGroup;
*aStream >> newCullGroup;
mCullGroups.append(newCullGroup);
}
}
if (reflectionProbesPtr)
{
for (int i = 0; i < mReflectionProbeCount; i++)
{
quint8 newReflectionProbe;
*aStream >> newReflectionProbe;
mReflectionProbes.append(newReflectionProbe);
}
}
}
void XGfxCell::Clear()

View File

@ -28,7 +28,7 @@ private:
QVector<XGfxPortal> mPortals;
int mCullGroupCount;
QVector<int> mCullGroups;
QVector<qint32> mCullGroups;
quint8 mReflectionProbeCount;
QVector<quint8> mReflectionProbes;