public static MyVoxelVertex?ReadVoxelVertexEx(BinaryReader binaryReader, EndPoint senderEndPoint) { MyMwcVoxelMaterialsEnum?voxelMaterial = MyMwcMessageIn.ReadVoxelMaterialsEnumEx(binaryReader, senderEndPoint); Byte4? normal = MyMwcMessageIn.ReadByte4Ex(binaryReader, senderEndPoint); UInt64?positionAndAmbient = MyMwcMessageIn.ReadUInt64Ex(binaryReader, senderEndPoint); if (voxelMaterial.HasValue && normal.HasValue && positionAndAmbient.HasValue) { MyVoxelVertex result = new MyVoxelVertex { Material = voxelMaterial.Value, m_normal = normal.Value, m_positionAndAmbient = { packed_value = positionAndAmbient.Value } }; return(result); } return(null); }