mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 23:47:43 +00:00
Add VISIGen utility
This commit is contained in:
@@ -19,8 +19,8 @@ struct DoorArea : IScriptObject
|
||||
AnimationParameters animationParameters;
|
||||
ActorParameters actorParameters;
|
||||
Value<atVec3f> unknown1;
|
||||
Value<atVec3f> unknown2;
|
||||
Value<atVec3f> unknown3;
|
||||
Value<atVec3f> collisionExtent;
|
||||
Value<atVec3f> collisionOffset;
|
||||
Value<bool> unknown4;
|
||||
Value<bool> unknown5;
|
||||
Value<bool> unknown6;
|
||||
@@ -49,6 +49,28 @@ struct DoorArea : IScriptObject
|
||||
{
|
||||
actorParameters.scanIDs(scansOut);
|
||||
}
|
||||
|
||||
zeus::CAABox getVISIAABB(hecl::BlenderToken& btok) const
|
||||
{
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
zeus::CAABox aabbOut;
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user