XPlor/libs/xassets/xphysgeomlist.cpp

44 lines
713 B
C++
Raw Normal View History

2025-09-03 13:20:39 -04:00
#include "xphysgeomlist.h"
XPhysGeomList::XPhysGeomList()
: XAsset()
, mCount(0)
, mGeoms()
, mMass()
{
2025-09-10 21:58:26 -04:00
SetName("Phys Geometry List");
2025-09-03 13:20:39 -04:00
}
XPhysGeomList::~XPhysGeomList()
{
}
2025-09-10 21:58:26 -04:00
void XPhysGeomList::ParseData(XDataStream *aStream)
2025-09-03 13:20:39 -04:00
{
2025-09-10 21:58:26 -04:00
if (GetPtr() == -1)
{
qint32 geomsPtr;
*aStream
>> mCount
>> geomsPtr;
if (geomsPtr)
{
for (quint32 i = 0; i < mCount; i++)
{
XPhysGeomInfo newGeom;
newGeom.ParseData(aStream);
mGeoms.append(newGeom);
}
}
}
2025-09-03 13:20:39 -04:00
}
void XPhysGeomList::Clear()
{
mCount = 0;
mGeoms.clear();
mMass.Clear();
}