优化算法:序列化放置占地盒子

pull/1274/MERGE
ChenX 4 years ago
parent f728ebd200
commit eb0db1df93

@ -346,6 +346,11 @@ export class Container
part.PlacePosition = file.Read();
this.PlacedParts.push(part);
}
if (!this.PlacedBox) this.PlacedBox = new Box2;
this.PlacedBox.min.fromArray(file.Read());
this.PlacedBox.max.fromArray(file.Read());
return this;
}
//对象将自身数据写入到文件.
@ -371,6 +376,9 @@ export class Container
file.Write(p.StateIndex);
file.Write(p.PlacePosition);
}
file.Write(this.PlacedBox.min.toArray());
file.Write(this.PlacedBox.max.toArray());
}
//#endregion
}

Loading…
Cancel
Save