/// <summary> /// 指定されたストリームから読み込む。 /// </summary> internal static UVモーフオフセット 読み込む(FileStream fs, PMXヘッダ header, モーフ種類 type) { var offset = new UVモーフオフセット(); offset.頂点インデックス = ParserHelper.get_VertexIndex(fs, header.頂点インデックスサイズ); offset.UVオフセット量 = ParserHelper.get_Float4(fs); offset.モーフ種類 = type; return(offset); }
public UVモーフ(PMXModel model, モーフ種類 targetType) { _bufferManager = model.バッファ管理; _targetMorph = targetType; this._model = model.モデル; if (model.モデル.ヘッダ.追加UV数 + 2 <= (int)targetType) { return; //このとき対応した追加UVは存在しない } foreach (MMDFileParser.PMXModelParser.モーフ morphData in model.モデル.モーフリスト) { if (morphData.モーフ種類 == this._targetMorph) { this.Morphs.Add(morphData.モーフ名, new UVモーフデータ(morphData)); } } }