//============================================================ public FDxRsModel Get(string code) { FDxRsModel model = _models.Find(code); if (null == model) { model = new FDxRsModel(); string fileName = MakeFileName(code); model.LoadFile(fileName); _models.Set(code, model); } return(model); }
//============================================================ public void Unserialize(IInput input) { // 读取设置 _id = input.ReadInt32(); _modelCode = input.ReadString(); _geometryName = input.ReadString(); _materialCode = input.ReadString(); // 存储矩阵 _originMatrix.Unserialize(input); _worldMatrix.Unserialize(input); // 读取模型 _model = RDxCore.ModelResourceConsole.Get(_modelCode); _geometry = _model.Mesh.Geometries.Get(_geometryName); _material = _template.Materials.Get(_materialCode); }