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


C# BinaryReader.ReadVector4方法代码示例

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


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

示例1: RoGndTileData

		public char[] color;			// BGRA -- "A" seems to be ignored by the official client


		public RoGndTileData(BinaryReader bin, GenericFileFormatVersion version)
			: base(bin, version) {
			VectorWidth = bin.ReadVector4();
			VectorHeight = bin.ReadVector4();
			TextureIndex = bin.ReadUInt16();
			Lightmap = bin.ReadUInt16();
			color = bin.ReadChars(4);
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:11,代码来源:RoGndTileData.cs

示例2: RoGndCubeData

		public RoGndCubeData(BinaryReader bin, GenericFileFormatVersion version)
			: base(bin, version) {
			Height = bin.ReadVector4();
			TileUp = bin.ReadInt32();
			TileSide = bin.ReadInt32();
			TileAside = bin.ReadInt32();
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:7,代码来源:RoGndCubeData.cs

示例3: QuatKey

        /// <summary>
        /// Initializes a new instance of the <see cref="QuatKey"/> class.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <param name="type">The type.</param>
        /// <exception cref="Exception">Invalid eKeyType</exception>
        public QuatKey(BinaryReader reader, eKeyType type)
		{
			this.Time = reader.ReadSingle();
			if (type < eKeyType.LINEAR_KEY || type > eKeyType.TBC_KEY)
			{
				throw new Exception("Invalid eKeyType");
			}
			this.Value = reader.ReadVector4();
			if (type == eKeyType.TBC_KEY)
			{
				this.TBC = reader.ReadVector3();
			}
		}
开发者ID:dol-leodagan,项目名称:niflib.net,代码行数:19,代码来源:QuatKey.cs

示例4: NiRotatingParticlesData

        /// <summary>
        /// Initializes a new instance of the <see cref="NiRotatingParticlesData"/> class.
        /// </summary>
        /// <param name="file">The file.</param>
        /// <param name="reader">The reader.</param>
        public NiRotatingParticlesData(NiFile file, BinaryReader reader) : base(file, reader)
		{
			if (base.Version <= eNifVersion.VER_4_2_2_0)
			{
				this.HasRotations2 = reader.ReadBoolean(Version);
				this.Rotations2 = new Vector4[this.NumVertices];
				int num = 0;
				while ((long)num < (long)((ulong)this.NumVertices))
				{
					this.Rotations2[num] = reader.ReadVector4();
					num++;
				}
			}
		}
开发者ID:dol-leodagan,项目名称:niflib.net,代码行数:19,代码来源:NiRotatingParticlesData.cs

示例5: ErrorReportCommentsBlock

 public ErrorReportCommentsBlock(BinaryReader binaryReader)
 {
     this.paddingtext = binaryReader.ReadBytes(8);
     this.position = binaryReader.ReadVector3();
     this.nodeIndices = new NodeIndices[4];
     for (int i = 0; i < 4; ++i)
     {
         this.nodeIndices[i] = new NodeIndices(binaryReader);
     }
     this.nodeWeights = new NodeWeights[4];
     for (int i = 0; i < 4; ++i)
     {
         this.nodeWeights[i] = new NodeWeights(binaryReader);
     }
     this.color = binaryReader.ReadVector4();
 }
开发者ID:jacksoncougar,项目名称:Moonfish-Editor,代码行数:16,代码来源:RenderModel.cs

示例6: ErrorReportQuadsBlock

 public ErrorReportQuadsBlock(BinaryReader binaryReader)
 {
     this.points = new Points[4];
     for (int i = 0; i < 4; ++i)
     {
         this.points[i] = new Points(binaryReader);
     }
     this.color = binaryReader.ReadVector4();
 }
开发者ID:jacksoncougar,项目名称:Moonfish-Editor,代码行数:9,代码来源:RenderModel.cs

示例7: ErrorReportTrianglesBlock

 public ErrorReportTrianglesBlock(BinaryReader binaryReader)
 {
     this.points = new Points[3];
     for (int i = 0; i < 3; ++i)
     {
         this.points[i] = new Points(binaryReader);
     }
     this.color = binaryReader.ReadVector4();
 }
开发者ID:jacksoncougar,项目名称:Moonfish-Editor,代码行数:9,代码来源:RenderModel.cs

示例8: ErrorReportVectorsBlock

 public ErrorReportVectorsBlock(BinaryReader binaryReader)
 {
     this.position = binaryReader.ReadVector3();
     this.nodeIndices = new NodeIndices[4];
     for (int i = 0; i < 4; ++i)
     {
         this.nodeIndices[i] = new NodeIndices(binaryReader);
     }
     this.nodeWeights = new NodeWeights[4];
     for (int i = 0; i < 4; ++i)
     {
         this.nodeWeights[i] = new NodeWeights(binaryReader);
     }
     this.color = binaryReader.ReadVector4();
     this.normal = binaryReader.ReadVector3();
     this.screenLength = binaryReader.ReadSingle();
 }
开发者ID:jacksoncougar,项目名称:Moonfish-Editor,代码行数:17,代码来源:RenderModel.cs

示例9: ModelNodeBlock

 public ModelNodeBlock(BinaryReader binaryReader)
 {
     this.name = binaryReader.ReadStringID();
     this.parentNode = binaryReader.ReadShortBlockIndex1();
     this.firstChildNode = binaryReader.ReadShortBlockIndex1();
     this.nextSiblingNode = binaryReader.ReadShortBlockIndex1();
     this.padding = binaryReader.ReadBytes(2);
     this.defaultTranslation = binaryReader.ReadVector3();
     this.defaultRotation = binaryReader.ReadVector4();
     this.defaultInverseScale = binaryReader.ReadSingle();
     this.defaultInverseForward = binaryReader.ReadVector3();
     this.defaultInverseLeft = binaryReader.ReadVector3();
     this.defaultInverseUp = binaryReader.ReadVector3();
     this.defaultInversePosition = binaryReader.ReadVector3();
 }
开发者ID:jacksoncougar,项目名称:Moonfish-Editor,代码行数:15,代码来源:HierarchyModel.cs

示例10: StructureBspFogPlaneBlock

 public StructureBspFogPlaneBlock(BinaryReader binaryReader)
 {
     this.scenarioPlanarFogIndex = binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(2);
     this.plane = binaryReader.ReadVector4();
     this.flags = (Flags)binaryReader.ReadInt16();
     this.priority = binaryReader.ReadInt16();
 }
开发者ID:jacksoncougar,项目名称:Moonfish-Editor,代码行数:8,代码来源:StructureBinarySeperationPlane.cs

示例11: Axes

 public Axes(Stream stream)
 {
     BinaryReader reader = new BinaryReader(stream);
     m_PreQ = reader.ReadVector4();
     m_PostQ = reader.ReadVector4();
     m_Sgn = reader.ReadVector4();
     m_Limit = new Limit(stream);
     m_Length = reader.ReadSingle();
     m_Type = reader.ReadUInt32();
 }
开发者ID:hejob,项目名称:SB3Utility,代码行数:10,代码来源:Avatar.cs

示例12: Load

        /// <summary>
        /// Loads the file from the specified stream.
        /// </summary>
        /// <param name="stream">The stream to read from.</param>
        public override void Load(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream, Encoding.GetEncoding("EUC-KR"));

            string identifier = reader.ReadNullTerminatedString();

            int version;

            if (string.Compare(identifier, FILE_IDENTIFIER_7, false) == 0) {
                version = 7;
            } else if (string.Compare(identifier, FILE_IDENTIFIER_8, false) == 0) {
                version = 8;
            } else {
                throw new FileIdentifierMismatchException(FilePath, string.Format("{0} / {1}", FILE_IDENTIFIER_7, FILE_IDENTIFIER_8), identifier);
            }

            format = (VertexFormat)reader.ReadInt32();
            BoundingBox = new Bounds(reader.ReadVector3(), reader.ReadVector3());

            short boneCount = reader.ReadInt16();

            for (int i = 0; i < boneCount; i++) {
                BoneTable.Add(reader.ReadInt16());
            }

            short vertexCount = reader.ReadInt16();

            for (int i = 0; i < vertexCount; i++) {
                ModelVertex vertex = new ModelVertex();
                vertex.Position = reader.ReadVector3();

                Vertices.Add(vertex);
            }

            if (NormalsEnabled) {
                for (int i = 0; i < vertexCount; i++) {
                    ModelVertex vertex = Vertices[i];
                    vertex.Normal = reader.ReadVector3();
                }
            }

            if (ColoursEnabled) {
                for (int i = 0; i < vertexCount; i++) {
                    float a = reader.ReadSingle();
                    ModelVertex vertex = Vertices[i];
                    vertex.Colour = new Color(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), a);
                }
            }

            if (BonesEnabled) {
                for (int i = 0; i < vertexCount; i++) {
                    ModelVertex vertex = Vertices[i];
                    vertex.BoneWeights = reader.ReadVector4();
                    vertex.BoneIndices = reader.ReadShortVector4();
                }
            }

            if (TangentsEnabled) {
                for (int i = 0; i < vertexCount; i++) {
                    ModelVertex vertex = Vertices[i];
                    vertex.Tangent = reader.ReadVector3();
                }
            }

            if (TextureCoordinates1Enabled) {
                for (int i = 0; i < vertexCount; i++) {
                    ModelVertex vertex = Vertices[i];
                    vertex.TextureCoordinates[0] = reader.ReadVector2();
                }
            }

            if (TextureCoordinates2Enabled) {
                for (int i = 0; i < vertexCount; i++) {
                    ModelVertex vertex = Vertices[i];
                    vertex.TextureCoordinates[1] = reader.ReadVector2();
                }
            }

            if (TextureCoordinates3Enabled) {
                for (int i = 0; i < vertexCount; i++) {
                    ModelVertex vertex = Vertices[i];
                    vertex.TextureCoordinates[2] = reader.ReadVector2();
                }
            }

            if (TextureCoordinates4Enabled) {
                for (int i = 0; i < vertexCount; i++) {
                    ModelVertex vertex = Vertices[i];
                    vertex.TextureCoordinates[3] = reader.ReadVector2();
                }
            }

            short indexCount = reader.ReadInt16();

            for (int i = 0; i < indexCount; i++) {
                Indices.Add(reader.ReadShortVector3());
//.........这里部分代码省略.........
开发者ID:osROSE,项目名称:UnityRose,代码行数:101,代码来源:ModelFile.cs

示例13: PlanesBlock

 public PlanesBlock(BinaryReader binaryReader)
 {
     this.plane = binaryReader.ReadVector4();
 }
开发者ID:jacksoncougar,项目名称:Moonfish-Editor,代码行数:4,代码来源:StructureBinarySeperationPlane.cs

示例14: RoRsmMeshPositionFrame

		public RoRsmMeshPositionFrame(BinaryReader bin, GenericFileFormatVersion version)
			: base(bin, version) {
			Frame = bin.ReadInt32();
			Position = bin.ReadVector4();
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:5,代码来源:RoRsmMeshPositionFrame.cs

示例15: TransparentPlanesBlock

 public TransparentPlanesBlock(BinaryReader binaryReader)
 {
     this.sectionIndex = binaryReader.ReadInt16();
     this.partIndex = binaryReader.ReadInt16();
     this.plane = binaryReader.ReadVector4();
 }
开发者ID:jacksoncougar,项目名称:Moonfish-Editor,代码行数:6,代码来源:StructureBinarySeperationPlane.cs


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