private PMXFormat.MorphOffset ReadMaterialMorphOffset()
 {
     PMXFormat.MaterialMorphOffset result = new PMXFormat.MaterialMorphOffset();
     result.material_index             = CastIntRead(binary_reader_, format_.header.materialIndexSize);
     result.offset_method              = (PMXFormat.MaterialMorphOffset.OffsetMethod)binary_reader_.ReadByte();
     result.diffuse                    = ReadSinglesToColor(binary_reader_);
     result.specular                   = ReadSinglesToColor(binary_reader_, 1);
     result.specularity                = binary_reader_.ReadSingle();
     result.ambient                    = ReadSinglesToColor(binary_reader_, 1);
     result.edge_color                 = ReadSinglesToColor(binary_reader_);
     result.edge_size                  = binary_reader_.ReadSingle();
     result.texture_coefficient        = ReadSinglesToColor(binary_reader_);
     result.sphere_texture_coefficient = ReadSinglesToColor(binary_reader_);
     result.toon_texture_coefficient   = ReadSinglesToColor(binary_reader_);
     return(result);
 }
示例#2
0
	private PMXFormat.MorphOffset ReadMaterialMorphOffset() {
		PMXFormat.MaterialMorphOffset result = new PMXFormat.MaterialMorphOffset();
		result.material_index = CastIntRead(binary_reader_, format_.header.materialIndexSize);
		result.offset_method = (PMXFormat.MaterialMorphOffset.OffsetMethod)binary_reader_.ReadByte();
		result.diffuse = ReadSinglesToColor(binary_reader_);
		result.specular = ReadSinglesToColor(binary_reader_, 1);
		result.specularity = binary_reader_.ReadSingle();
		result.ambient = ReadSinglesToColor(binary_reader_, 1);
		result.edge_color = ReadSinglesToColor(binary_reader_);
		result.edge_size = binary_reader_.ReadSingle();
		result.texture_coefficient = ReadSinglesToColor(binary_reader_);
		result.sphere_texture_coefficient = ReadSinglesToColor(binary_reader_);
		result.toon_texture_coefficient = ReadSinglesToColor(binary_reader_);
		return result;
	}