2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 22:27:43 +00:00

Huge compile performance refactor

This commit is contained in:
Jack Andersen
2017-12-28 22:08:12 -10:00
parent 3f2c480891
commit 8301adc3d6
418 changed files with 1645 additions and 2402 deletions

View File

@@ -5,9 +5,7 @@
#include "IScriptObject.hpp"
#include "Parameters.hpp"
namespace DataSpec
{
namespace DNAMP1
namespace DataSpec::DNAMP1
{
struct Platform : IScriptObject
{
@@ -67,37 +65,8 @@ struct Platform : IScriptObject
actorParameters.scanIDs(scansOut);
}
zeus::CAABox getVISIAABB(hecl::BlenderToken& btok) const
{
hecl::BlenderConnection& conn = btok.getBlenderConnection();
zeus::CAABox aabbOut;
if (model)
{
hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(model);
conn.openBlend(path);
hecl::BlenderConnection::DataStream ds = conn.beginData();
auto aabb = ds.getMeshAABB();
aabbOut = zeus::CAABox(aabb.first, aabb.second);
}
else if (animationParameters.animationCharacterSet)
{
hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(
animationParameters.animationCharacterSet);
conn.openBlend(path.getWithExtension(_S(".blend"), true));
hecl::BlenderConnection::DataStream ds = conn.beginData();
auto aabb = ds.getMeshAABB();
aabbOut = zeus::CAABox(aabb.first, aabb.second);
}
if (aabbOut.min.x > aabbOut.max.x)
return {};
zeus::CTransform xf = ConvertEditorEulerToTransform4f(scale, orientation, location);
return aabbOut.getTransformedAABox(xf);
}
zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const;
};
}
}
#endif