当前位置: 首页>>代码示例>>C#>>正文


C# ResourceDataReader.ReadSingle方法代码示例

本文整理汇总了C#中ResourceDataReader.ReadSingle方法的典型用法代码示例。如果您正苦于以下问题:C# ResourceDataReader.ReadSingle方法的具体用法?C# ResourceDataReader.ReadSingle怎么用?C# ResourceDataReader.ReadSingle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ResourceDataReader的用法示例。


在下文中一共展示了ResourceDataReader.ReadSingle方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Read

        public uint Unknown_5Ch; // 0x00000000

        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            this.Unknown_0h = reader.ReadUInt32();
            this.Unknown_4h = reader.ReadUInt32();
            this.Unknown_8h = reader.ReadUInt32();
            this.Unknown_Ch = reader.ReadUInt32();
            this.Unknown_10h = reader.ReadSingle();
            this.Unknown_14h = reader.ReadSingle();
            this.Unknown_18h = reader.ReadSingle();
            this.Unknown_1Ch = reader.ReadSingle();
            this.Unknown_20h = reader.ReadUInt32();
            this.Unknown_24h = reader.ReadUInt32();
            this.Unknown_28h = reader.ReadUInt32();
            this.Unknown_2Ch = reader.ReadUInt32();
            this.Unknown_30h = reader.ReadUInt32();
            this.Unknown_34h = reader.ReadUInt32();
            this.Unknown_38h = reader.ReadUInt32();
            this.Unknown_3Ch = reader.ReadUInt32();
            this.Unknown_40h = reader.ReadUInt32();
            this.Unknown_44h = reader.ReadUInt32();
            this.Unknown_48h = reader.ReadUInt32();
            this.Unknown_4Ch = reader.ReadUInt32();
            this.Unknown_50h = reader.ReadUInt32();
            this.Unknown_54h = reader.ReadUInt32();
            this.Unknown_58h = reader.ReadUInt32();
            this.Unknown_5Ch = reader.ReadUInt32();
        }
开发者ID:isti37,项目名称:gta-toolkit,代码行数:33,代码来源:Unknown_T_004_c4b2f638_entry.cs

示例2: Read

 /// <summary>
 /// Reads the data-block from a stream.
 /// </summary>
 public override void Read(ResourceDataReader reader, params object[] parameters)
 {
     // read structure data
     this.x1 = reader.ReadSingle();
     this.x2 = reader.ReadSingle();
     this.x3 = reader.ReadSingle();
     this.x4 = reader.ReadSingle();
 }
开发者ID:isti37,项目名称:gta-toolkit,代码行数:11,代码来源:RAGE_Vector4.cs

示例3: Read

 /// <summary>
 /// Reads the data-block from a stream.
 /// </summary>
 public override void Read(ResourceDataReader reader, params object[] parameters)
 {
     // read structure data
     this.PositionX = reader.ReadSingle();
     this.PositionY = reader.ReadSingle();
     this.PositionZ = reader.ReadSingle();
     this.Unknown_Ch = reader.ReadUInt16();
     this.Unknown_Eh = reader.ReadUInt16();
     this.Unknown_10h = reader.ReadUInt16();
     this.Unknown_12h = reader.ReadUInt16();
 }
开发者ID:isti37,项目名称:gta-toolkit,代码行数:14,代码来源:WaypointRecordEntry_GTA5_pc.cs

示例4: Read

 /// <summary>
 /// Reads the data-block from a stream.
 /// </summary>
 public override void Read(ResourceDataReader reader, params object[] parameters)
 {
     // read structure data
     this.Time = reader.ReadUInt32();
     this.VelocityX = reader.ReadUInt16();
     this.VelocityY = reader.ReadUInt16();
     this.VelocityZ = reader.ReadUInt16();
     this.RightX = reader.ReadByte();
     this.RightY = reader.ReadByte();
     this.RightZ = reader.ReadByte();
     this.TopX = reader.ReadByte();
     this.TopY = reader.ReadByte();
     this.TopZ = reader.ReadByte();
     this.SteeringAngle = reader.ReadByte();
     this.GasPedalPower = reader.ReadByte();
     this.BrakePedalPower = reader.ReadByte();
     this.HandbrakeUsed = reader.ReadByte();
     this.PositionX = reader.ReadSingle();
     this.PositionY = reader.ReadSingle();
     this.PositionZ = reader.ReadSingle();
 }
开发者ID:isti37,项目名称:gta-toolkit,代码行数:24,代码来源:VehicleRecordsEntry_GTA5_pc.cs

示例5: Read

        public uint Unknown_8Ch; // 0x00000000

        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            this.Unknown_0h = reader.ReadUInt32();
            this.Unknown_4h = reader.ReadUInt32();
            this.Unknown_8h = reader.ReadSingle();
            this.Unknown_Ch = reader.ReadUInt32();
            this.Unknown_10h = reader.ReadUInt32();
            this.Unknown_14h = reader.ReadUInt32();
            this.Unknown_18h = reader.ReadUInt32();
            this.Unknown_1Ch = reader.ReadUInt32();
            this.Unknown_20h = reader.ReadSingle();
            this.Unknown_24h = reader.ReadSingle();
            this.Unknown_28h = reader.ReadSingle();
            this.Unknown_2Ch = reader.ReadSingle();
            this.Unknown_30h = reader.ReadSingle();
            this.Unknown_34h = reader.ReadSingle();
            this.Unknown_38h = reader.ReadSingle();
            this.Unknown_3Ch = reader.ReadSingle();
            this.Unknown_40h = reader.ReadSingle();
            this.Unknown_44h = reader.ReadSingle();
            this.Unknown_48h = reader.ReadSingle();
            this.Unknown_4Ch = reader.ReadSingle();
            this.Unknown_50h = reader.ReadSingle();
            this.Unknown_54h = reader.ReadSingle();
            this.ModelHash1 = reader.ReadUInt32();
            this.TextureHash = reader.ReadUInt32();
            this.Unknown_60h = reader.ReadUInt32();
            this.ModelDictionaryHash = reader.ReadUInt32();
            this.Unknown_68h = reader.ReadUInt32();
            this.Unknown_6Ch = reader.ReadUInt32();
            this.ModelHash2 = reader.ReadUInt32();
            this.Unknown_74h = reader.ReadUInt32();
            this.Unknown_78h = reader.ReadUInt32();
            this.Unknown_7Ch = reader.ReadUInt32();
            this.Unknown_80h = reader.ReadUInt32();
            this.Unknown_84h = reader.ReadUInt32();
            this.Unknown_88h = reader.ReadUInt32();
            this.Unknown_8Ch = reader.ReadUInt32();
        }
开发者ID:isti37,项目名称:gta-toolkit,代码行数:45,代码来源:Unknown_T_004_objs_entry.cs

示例6: Read

        public uint Unknown_7Ch; // 0x00000000

        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            this.Unknown_0h = reader.ReadUInt32();
            this.Unknown_4h = reader.ReadUInt32();
            this.ModelHash = reader.ReadUInt32();
            this.Unknown_Ch = reader.ReadUInt32();
            this.Unknown_10h = reader.ReadUInt32();
            this.Unknown_14h = reader.ReadUInt32();
            this.Unknown_18h = reader.ReadUInt32();
            this.Unknown_1Ch = reader.ReadUInt32();
            this.PositionX = reader.ReadSingle();
            this.PositionY = reader.ReadSingle();
            this.PositionZ = reader.ReadSingle();
            this.Unknown_2Ch = reader.ReadSingle();
            this.Unknown_30h = reader.ReadSingle();
            this.Unknown_34h = reader.ReadSingle();
            this.Unknown_38h = reader.ReadSingle();
            this.Unknown_3Ch = reader.ReadSingle();
            this.Unknown_40h = reader.ReadUInt32();
            this.Unknown_44h = reader.ReadUInt32();
            this.Unknown_48h = reader.ReadUInt32();
            this.Unknown_4Ch = reader.ReadUInt32();
            this.Unknown_50h = reader.ReadUInt32();
            this.Unknown_54h = reader.ReadUInt32();
            this.Unknown_58h = reader.ReadUInt32();
            this.Unknown_5Ch = reader.ReadUInt32();
            this.Unknown_60h = reader.ReadUInt32();
            this.Unknown_64h = reader.ReadUInt32();
            this.Unknown_68h = reader.ReadUInt32();
            this.Unknown_6Ch = reader.ReadUInt32();
            this.Unknown_70h = reader.ReadUInt32();
            this.Unknown_74h = reader.ReadUInt32();
            this.Unknown_78h = reader.ReadUInt32();
            this.Unknown_7Ch = reader.ReadUInt32();
        }
开发者ID:isti37,项目名称:gta-toolkit,代码行数:41,代码来源:Unknown_M_003_objs_entry.cs

示例7: Read

        public uint Unknown_ACh; // 0x00000001

        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            this.Unknown_0h = reader.ReadUInt32();
            this.Unknown_4h = reader.ReadUInt32();
            this.Unknown_8h = reader.ReadUInt32();
            this.Unknown_Ch = reader.ReadUInt32();
            this.Unknown_10h = reader.ReadSingle();
            this.Unknown_14h = reader.ReadSingle();
            this.Unknown_18h = reader.ReadSingle();
            this.Unknown_1Ch = reader.ReadSingle();
            this.Unknown_20h = reader.ReadSingle();
            this.Unknown_24h = reader.ReadSingle();
            this.Unknown_28h = reader.ReadSingle();
            this.Unknown_2Ch = reader.ReadSingle();
            this.Unknown_30h = reader.ReadSingle();
            this.Unknown_34h = reader.ReadSingle();
            this.Unknown_38h = reader.ReadSingle();
            this.Unknown_3Ch = reader.ReadSingle();
            this.Unknown_40h = reader.ReadSingle();
            this.Unknown_44h = reader.ReadSingle();
            this.Unknown_48h = reader.ReadSingle();
            this.Unknown_4Ch = reader.ReadSingle();
            this.Unknown_50h = reader.ReadSingle();
            this.Unknown_54h = reader.ReadSingle();
            this.Unknown_58h = reader.ReadSingle();
            this.Unknown_5Ch = reader.ReadSingle();
            this.Unknown_60h = reader.ReadSingle();
            this.Unknown_64h = reader.ReadSingle();
            this.Unknown_68h = reader.ReadSingle();
            this.Unknown_6Ch = reader.ReadSingle();
            this.Unknown_70h = reader.ReadUInt32();
            this.Unknown_74h = reader.ReadUInt32();
            this.Unknown_78h = reader.ReadUInt32();
            this.Unknown_7Ch = reader.ReadUInt32();
            this.Unknown_80h = reader.ReadUInt32();
            this.Unknown_84h = reader.ReadUInt32();
            this.Unknown_88h = reader.ReadUInt32();
            this.Unknown_8Ch = reader.ReadUInt32();
            this.Unknown_90h = reader.ReadUInt32();
            this.Unknown_94h = reader.ReadUInt32();
            this.Unknown_98h = reader.ReadUInt32();
            this.Unknown_9Ch = reader.ReadUInt32();
            this.Unknown_A0h = reader.ReadUInt32();
            this.Unknown_A4h = reader.ReadUInt32();
            this.Unknown_A8h = reader.ReadUInt32();
            this.Unknown_ACh = reader.ReadUInt32();
        }
开发者ID:isti37,项目名称:gta-toolkit,代码行数:53,代码来源:Unknown_T_004_a2109a3d_entry.cs

示例8: Read

        public uint Unknown_1FCh; // 0x00000000

        /// <summary>
        /// Reads the data-block from a stream.
        /// </summary>
        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            // read structure data
            this.Unknown_0h = reader.ReadUInt32();
            this.Unknown_4h = reader.ReadUInt32();
            this.SelfHash = reader.ReadUInt32();
            this.OtherHash = reader.ReadUInt32();
            this.Unknown_10h = reader.ReadUInt32();
            this.Unknown_14h = reader.ReadUInt32();
            this.Unknown_18h = reader.ReadUInt32();
            this.Unknown_1Ch = reader.ReadUInt32();
            this.Unknown_20h = reader.ReadSingle();
            this.Unknown_24h = reader.ReadSingle();
            this.Unknown_28h = reader.ReadSingle();
            this.Unknown_2Ch = reader.ReadSingle();
            this.Unknown_30h = reader.ReadSingle();
            this.Unknown_34h = reader.ReadSingle();
            this.Unknown_38h = reader.ReadSingle();
            this.Unknown_3Ch = reader.ReadSingle();
            this.Unknown_40h = reader.ReadSingle();
            this.Unknown_44h = reader.ReadSingle();
            this.Unknown_48h = reader.ReadSingle();
            this.Unknown_4Ch = reader.ReadSingle();
            this.Unknown_50h = reader.ReadSingle();
            this.Unknown_54h = reader.ReadSingle();
            this.Unknown_58h = reader.ReadSingle();
            this.Unknown_5Ch = reader.ReadSingle();
            this.Unknown_60h = reader.ReadUInt32();
            this.Unknown_64h = reader.ReadUInt32();
            this.Unknown_68h = reader.ReadUInt32();
            this.Unknown_6Ch = reader.ReadUInt32();
            this.Unknown_70h = reader.ReadUInt32();
            this.Unknown_74h = reader.ReadUInt32();
            this.Unknown_78h = reader.ReadUInt32();
            this.Unknown_7Ch = reader.ReadUInt32();
            this.Unknown_80h = reader.ReadUInt32();
            this.Unknown_84h = reader.ReadUInt32();
            this.Unknown_88h = reader.ReadUInt32();
            this.Unknown_8Ch = reader.ReadUInt32();
            this.Unknown_90h = reader.ReadUInt32();
            this.Unknown_94h = reader.ReadUInt32();
            this.Unknown_98h = reader.ReadUInt32();
            this.Unknown_9Ch = reader.ReadUInt32();
            this.Unknown_A0h = reader.ReadUInt32();
            this.Unknown_A4h = reader.ReadUInt32();
            this.Unknown_A8h = reader.ReadUInt32();
            this.Unknown_ACh = reader.ReadUInt32();
            this.Unknown_B0h = reader.ReadUInt32();
            this.Unknown_B4h = reader.ReadUInt32();
            this.Unknown_B8h = reader.ReadUInt32();
            this.Unknown_BCh = reader.ReadUInt32();
            this.Unknown_C0h = reader.ReadUInt32();
            this.Unknown_C4h = reader.ReadUInt32();
            this.Unknown_C8h = reader.ReadUInt32();
            this.Unknown_CCh = reader.ReadUInt32();
            this.Unknown_D0h = reader.ReadUInt32();
            this.Unknown_D4h = reader.ReadUInt32();
            this.Unknown_D8h = reader.ReadUInt32();
            this.Unknown_DCh = reader.ReadUInt32();
            this.Unknown_E0h = reader.ReadUInt32();
            this.Unknown_E4h = reader.ReadUInt32();
            this.Unknown_E8h = reader.ReadUInt32();
            this.Unknown_ECh = reader.ReadUInt32();
            this.Unknown_F0h = reader.ReadUInt32();
            this.Unknown_F4h = reader.ReadUInt32();
            this.Unknown_F8h = reader.ReadUInt32();
            this.Unknown_FCh = reader.ReadUInt32();
            this.Unknown_100h = reader.ReadUInt32();
            this.Unknown_104h = reader.ReadUInt32();
            this.Unknown_108h = reader.ReadUInt32();
            this.Unknown_10Ch = reader.ReadUInt32();
            this.Unknown_110h = reader.ReadUInt32();
            this.Unknown_114h = reader.ReadUInt32();
            this.Unknown_118h = reader.ReadUInt32();
            this.Unknown_11Ch = reader.ReadUInt32();
            this.Unknown_120h = reader.ReadUInt32();
            this.Unknown_124h = reader.ReadUInt32();
            this.Unknown_128h = reader.ReadUInt32();
            this.Unknown_12Ch = reader.ReadUInt32();
            this.Unknown_130h = reader.ReadUInt32();
            this.Unknown_134h = reader.ReadUInt32();
            this.Unknown_138h = reader.ReadUInt32();
            this.Unknown_13Ch = reader.ReadUInt32();
            this.Unknown_140h = reader.ReadUInt32();
            this.Unknown_144h = reader.ReadUInt32();
            this.Unknown_148h = reader.ReadUInt32();
            this.Unknown_14Ch = reader.ReadUInt32();
            this.Unknown_150h = reader.ReadUInt32();
            this.Unknown_154h = reader.ReadUInt32();
            this.Unknown_158h = reader.ReadUInt32();
            this.Unknown_15Ch = reader.ReadUInt32();
            this.Unknown_160h = reader.ReadUInt32();
            this.Unknown_164h = reader.ReadUInt32();
            this.Unknown_168h = reader.ReadUInt32();
            this.Unknown_16Ch = reader.ReadUInt32();
//.........这里部分代码省略.........
开发者ID:isti37,项目名称:gta-toolkit,代码行数:101,代码来源:Unknown_M_003_maps_entry.cs

示例9: Read

 /// <summary>
 /// Reads the data-block from a stream.
 /// </summary>
 public override void Read(ResourceDataReader reader, params object[] parameters)
 {
     // read structure data
     this.m11 = reader.ReadSingle();
     this.m12 = reader.ReadSingle();
     this.m13 = reader.ReadSingle();
     this.m14 = reader.ReadSingle();
     this.m21 = reader.ReadSingle();
     this.m22 = reader.ReadSingle();
     this.m23 = reader.ReadSingle();
     this.m24 = reader.ReadSingle();
     this.m31 = reader.ReadSingle();
     this.m32 = reader.ReadSingle();
     this.m33 = reader.ReadSingle();
     this.m34 = reader.ReadSingle();
     this.m41 = reader.ReadSingle();
     this.m42 = reader.ReadSingle();
     this.m43 = reader.ReadSingle();
     this.m44 = reader.ReadSingle();
 }
开发者ID:isti37,项目名称:gta-toolkit,代码行数:23,代码来源:RAGE_Matrix4.cs

示例10: Read

        public override void Read(ResourceDataReader reader, params object[] parameters)
        {
            int stride = Convert.ToInt32(parameters[0]);
            int count = Convert.ToInt32(parameters[1]);
            var info = (VertexDeclaration_GTA5_pc)parameters[2];
            this.cnt = count;
            this.info = info;



            bool[] IsUsed = new bool[16];
            for (int i = 0; i < 16; i++)
                IsUsed[i] = ((info.Flags >> i) & 0x1) == 1;

            Types = new uint[16];
            for (int i = 0; i < 16; i++)
                Types[i] = (uint)((info.Types >> (int)(4 * i)) & 0xF);



            VertexData = new object[16];
            for (int i = 0; i < 16; i++)
            {
                if (IsUsed[i])
                {
                    switch (Types[i])
                    {
                        case 0: VertexData[i] = new ushort[1 * count]; break;
                        case 1: VertexData[i] = new ushort[2 * count]; break;
                        case 2: VertexData[i] = new ushort[3 * count]; break;
                        case 3: VertexData[i] = new ushort[4 * count]; break;
                        case 4: VertexData[i] = new float[1 * count]; break;
                        case 5: VertexData[i] = new float[2 * count]; break;
                        case 6: VertexData[i] = new float[3 * count]; break;
                        case 7: VertexData[i] = new float[4 * count]; break;
                        case 8: VertexData[i] = new uint[count]; break;
                        case 9: VertexData[i] = new uint[count]; break;
                        case 10: VertexData[i] = new uint[count]; break;
                        default:
                            throw new Exception();
                    }
                }
            }



            long pos = reader.Position;

            // read...
            for (int i = 0; i < count; i++)
            {

                for (int k = 0; k < 16; k++)
                {
                    if (IsUsed[k])
                    {
                        switch (Types[k])
                        {
                            // float16
                            case 0:
                                {
                                    var buf = VertexData[k] as ushort[];
                                    buf[i * 1 + 0] = reader.ReadUInt16();
                                    break;
                                }
                            case 1:
                                {
                                    var buf = VertexData[k] as ushort[];
                                    buf[i * 2 + 0] = reader.ReadUInt16();
                                    buf[i * 2 + 1] = reader.ReadUInt16();
                                    break;
                                }
                            case 2:
                                {
                                    var buf = VertexData[k] as ushort[];
                                    buf[i * 3 + 0] = reader.ReadUInt16();
                                    buf[i * 3 + 1] = reader.ReadUInt16();
                                    buf[i * 3 + 2] = reader.ReadUInt16();
                                    break;
                                }
                            case 3:
                                {
                                    var buf = VertexData[k] as ushort[];
                                    buf[i * 4 + 0] = reader.ReadUInt16();
                                    buf[i * 4 + 1] = reader.ReadUInt16();
                                    buf[i * 4 + 2] = reader.ReadUInt16();
                                    buf[i * 4 + 3] = reader.ReadUInt16();
                                    break;
                                }

                            // float32
                            case 4:
                                {
                                    var buf = VertexData[k] as float[];
                                    buf[i * 1 + 0] = reader.ReadSingle();
                                    break;
                                }
                            case 5:
                                {
                                    var buf = VertexData[k] as float[];
//.........这里部分代码省略.........
开发者ID:isti37,项目名称:gta-toolkit,代码行数:101,代码来源:VertexBuffer_GTA5_pc.cs


注:本文中的ResourceDataReader.ReadSingle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。