#include "xgfxworld.h" #include "xstring.h" XGfxWorld::XGfxWorld() : XAsset() , mName("") , mStreamingInfo() , mVertexData() , mSunLightParams() , mLights() , mReflectionProbes() { SetType(ASSET_TYPE_GFXWORLD); SetName("GFXWorld"); } XGfxWorld::~XGfxWorld() { } void XGfxWorld::ParseData(QDataStream *aStream) { if (GetPtr() == -1) { mName = XString::ParseCustom(aStream); // Parse streaming info mStreamingInfo.ParseData(aStream); // Parse vertex data mVertexData.ParseData(aStream); // Parse sun light params mSunLightParams.ParseData(aStream); // Parse lights count and array int lightCount; *aStream >> lightCount; for (int i = 0; i < lightCount; ++i) { XGfxLight light; light.ParseData(aStream); mLights.append(light); } // Parse reflection probes count and array int probeCount; *aStream >> probeCount; for (int i = 0; i < probeCount; ++i) { XGfxReflectionProbe probe; probe.ParseData(aStream); mReflectionProbes.append(probe); } } } void XGfxWorld::Clear() { }