Here are the examples of the csharp api class PMXLoaderScript.ReadBoneWeightBDEF4() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Example
0
1. Example
View licenseprivate PMXFormat.Vertex ReadVertex() { PMXFormat.Vertex result = new PMXFormat.Vertex(); result.pos = ReadSinglesToVector3(binary_reader_); result.normal_vec = ReadSinglesToVector3(binary_reader_); result.uv = ReadSinglesToVector2(binary_reader_); result.add_uv = new Vector4[format_.header.additionalUV]; for (int i = 0; i < format_.header.additionalUV; i++) { result.add_uv[i] = ReadSinglesToVector4(binary_reader_); } PMXFormat.Vertex.WeightMethod weight_method = (PMXFormat.Vertex.WeightMethod)binary_reader_.ReadByte(); switch(weight_method) { case PMXFormat.Vertex.WeightMethod.BDEF1: result.bone_weight = ReadBoneWeightBDEF1(); break; case PMXFormat.Vertex.WeightMethod.BDEF2: result.bone_weight = ReadBoneWeightBDEF2(); break; case PMXFormat.Vertex.WeightMethod.BDEF4: result.bone_weight = ReadBoneWeightBDEF4(); break; case PMXFormat.Vertex.WeightMethod.SDEF: result.bone_weight = ReadBoneWeightSDEF(); break; case PMXFormat.Vertex.WeightMethod.QDEF: result.bone_weight = ReadBoneWeightQDEF(); break; default: result.bone_weight = null; throw new System.FormatException(); } result.edge_magnification = binary_reader_.ReadSingle(); return result; }