private void addGimmicksToMapList(String lgbGroupName, LgbGimmickEntry gim) { SgbFile thisFile = gim.Gimmick; LgbGimmickEntry.HeaderData hdr = gim.Header; foreach (var iGroup in thisFile.Data) { SgbGroup eGroup = iGroup as SgbGroup; foreach (var iEntry in eGroup.Entries) { SgbModelEntry eEntry = iEntry as SgbModelEntry; if (eEntry != null) { TransformedModel mdl = eEntry.Model; TransformedModel newMdl; Vector3 pos = new Vector3(); Vector3 rot = new Vector3(); //Scale is not added or multiplied pos.X = mdl.Translation.X + hdr.Translation.X; pos.Y = mdl.Translation.Y + hdr.Translation.Y; pos.Z = mdl.Translation.Z + hdr.Translation.Z; rot.X = mdl.Rotation.X + hdr.Rotation.X; rot.Y = mdl.Rotation.Y + hdr.Rotation.Y; rot.Z = mdl.Rotation.Z + hdr.Rotation.Z; newMdl = new TransformedModel(mdl.Model, pos, rot, mdl.Scale); addToMapList(lgbGroupName, newMdl); } } } }
//Retrieves model entries from this gimmick entry private List <String> getGimmickPaths(LgbGimmickEntry entry) { List <String> gimmickFileList = new List <String>(); SgbFile thisFile = entry.Gimmick; foreach (var iGroup in thisFile.Data) { SgbGroup eGroup = iGroup as SgbGroup; foreach (var iEntry in eGroup.Entries) { SgbModelEntry eEntry = iEntry as SgbModelEntry; if (eEntry != null) { gimmickFileList.Add(eEntry.Model.Model.File.Path); } } } return(gimmickFileList); }