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


C# EndianBinaryReader.ReadVector3方法代码示例

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


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

示例1: AxisAlignedBoundingBox

 public AxisAlignedBoundingBox(EndianBinaryReader er)
     : base(er)
 {
     CenterPosition = er.ReadVector3();
     Size = er.ReadVector3();
 }
开发者ID:Ermelber,项目名称:EveryFileExplorer,代码行数:6,代码来源:BoundingVolume.cs

示例2: OrientedBoundingBox

 public OrientedBoundingBox(EndianBinaryReader er)
     : base(er)
 {
     CenterPosition = er.ReadVector3();
     OrientationMatrix = er.ReadSingles(3 * 3);
     Size = er.ReadVector3();
 }
开发者ID:Ermelber,项目名称:EveryFileExplorer,代码行数:7,代码来源:BoundingVolume.cs

示例3: SeparateDataShape

            public SeparateDataShape(EndianBinaryReader er)
            {
                Type = er.ReadUInt32();
                Signature = er.ReadString(Encoding.ASCII, 4);
                if (Signature != "SOBJ") throw new SignatureNotCorrectException(Signature, "SOBJ", er.BaseStream.Position);
                Revision = er.ReadUInt32();
                NameOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
                Unknown2 = er.ReadUInt32();
                Unknown3 = er.ReadUInt32();
                Flags = (ShapeFlags)er.ReadUInt32();
                OrientedBoundingBoxOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
                PositionOffset = er.ReadVector3();
                NrPrimitiveSets = er.ReadUInt32();
                PrimitiveSetOffsetsArrayOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
                BaseAddress = er.ReadUInt32();
                NrVertexAttributes = er.ReadUInt32();
                VertexAttributeOffsetsArrayOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
                BlendShapeOffset = er.ReadUInt32();
                if (BlendShapeOffset != 0) BlendShapeOffset += (UInt32)er.BaseStream.Position - 4;

                long curpos = er.BaseStream.Position;
                er.BaseStream.Position = NameOffset;
                Name = er.ReadStringNT(Encoding.ASCII);
                er.BaseStream.Position = OrientedBoundingBoxOffset;
                BoundingBox = BoundingVolume.FromStream(er);

                er.BaseStream.Position = PrimitiveSetOffsetsArrayOffset;
                PrimitiveSetOffsets = new uint[NrPrimitiveSets];
                for (int i = 0; i < NrPrimitiveSets; i++)
                {
                    PrimitiveSetOffsets[i] = (UInt32)er.BaseStream.Position + er.ReadUInt32();
                }

                er.BaseStream.Position = VertexAttributeOffsetsArrayOffset;
                VertexAttributeOffsets = new uint[NrVertexAttributes];
                for (int i = 0; i < NrVertexAttributes; i++)
                {
                    VertexAttributeOffsets[i] = (UInt32)er.BaseStream.Position + er.ReadUInt32();
                }

                PrimitiveSets = new PrimitiveSet[NrPrimitiveSets];
                for (int i = 0; i < NrPrimitiveSets; i++)
                {
                    er.BaseStream.Position = PrimitiveSetOffsets[i];
                    PrimitiveSets[i] = new PrimitiveSet(er);
                }

                VertexAttributes = new VertexAttributeCtr[NrVertexAttributes];
                if (NrVertexAttributes != 0)
                {
                    for (int i = 0; i < NrVertexAttributes; i++)
                    {
                        er.BaseStream.Position = VertexAttributeOffsets[i];
                        VertexAttributes[i] = VertexAttributeCtr.FromStream(er);
                    }
                }

                if (BlendShapeOffset != 0)
                {
                    er.BaseStream.Position = BlendShapeOffset;
                    BlendShape = new BlendShapeCtr(er);
                }

                er.BaseStream.Position = curpos;
            }
开发者ID:Ermelber,项目名称:EveryFileExplorer,代码行数:65,代码来源:CMDL.cs

示例4: CMDL

        public CMDL(EndianBinaryReader er)
        {
            Type = er.ReadUInt32();
            Signature = er.ReadString(Encoding.ASCII, 4);
            if (Signature != "CMDL") throw new SignatureNotCorrectException(Signature, "CMDL", er.BaseStream.Position);
            Revision = er.ReadUInt32();
            NameOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
            Unknown2 = er.ReadUInt32();
            Unknown3 = er.ReadUInt32();
            Flags = er.ReadUInt32();
            IsBranchVisible = er.ReadUInt32() == 1;
            NrChildren = er.ReadUInt32();
            Unknown7 = er.ReadUInt32();
            NrAnimationGroupDescriptions = er.ReadUInt32();
            AnimationGroupDescriptionsDictOffset =er.ReadUInt32();
            if (AnimationGroupDescriptionsDictOffset != 0) AnimationGroupDescriptionsDictOffset += (UInt32)er.BaseStream.Position - 4;
            Scale = er.ReadVector3();
            Rotation = er.ReadVector3();
            Translation = er.ReadVector3();
            LocalMatrix = er.ReadSingles(4 * 3);
            WorldMatrix = er.ReadSingles(4 * 3);
            NrMeshes = er.ReadUInt32();
            MeshOffsetsOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
            NrMaterials = er.ReadUInt32();
            MaterialsDictOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
            NrShapes = er.ReadUInt32();
            ShapeOffsetsOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
            NrMeshNodes = er.ReadUInt32();
            MeshNodeVisibilitiesDictOffset = er.ReadUInt32();
            if (MeshNodeVisibilitiesDictOffset != 0) MeshNodeVisibilitiesDictOffset += (UInt32)er.BaseStream.Position - 4;
            Unknown23 = er.ReadUInt32();
            Unknown24 = er.ReadUInt32();
            Unknown25 = er.ReadUInt32();
            if ((Type & 0x80) != 0) SkeletonInfoSOBJOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();

            long curpos = er.BaseStream.Position;
            er.BaseStream.Position = NameOffset;
            Name = er.ReadStringNT(Encoding.ASCII);
            if (AnimationGroupDescriptionsDictOffset != 0)
            {
                er.BaseStream.Position = AnimationGroupDescriptionsDictOffset;
                AnimationInfoDict = new DICT(er);
            }
            er.BaseStream.Position = MeshOffsetsOffset;
            MeshOffsets = new UInt32[NrMeshes];
            for (int i = 0; i < NrMeshes; i++)
            {
                MeshOffsets[i] = (UInt32)er.BaseStream.Position + er.ReadUInt32();
            }
            er.BaseStream.Position = MaterialsDictOffset;
            MaterialsDict = new DICT(er);

            Materials = new MTOB[NrMaterials];
            for (int i = 0; i < NrMaterials; i++)
            {
                er.BaseStream.Position = MaterialsDict[i].DataOffset;
                Materials[i] = new MTOB(er);
            }

            er.BaseStream.Position = ShapeOffsetsOffset;
            ShapeOffsets = new UInt32[NrShapes];
            for (int i = 0; i < NrShapes; i++)
            {
                ShapeOffsets[i] = (UInt32)er.BaseStream.Position + er.ReadUInt32();
            }

            if (MeshNodeVisibilitiesDictOffset != 0)
            {
                er.BaseStream.Position = MeshNodeVisibilitiesDictOffset;
                MeshNodeVisibilitiesDict = new DICT(er);
            }

            AnimationGroupDescriptions = new GraphicsAnimationGroup[NrAnimationGroupDescriptions];
            for (int i = 0; i < NrAnimationGroupDescriptions; i++)
            {
                er.BaseStream.Position = AnimationInfoDict[i].DataOffset;
                AnimationGroupDescriptions[i] = new GraphicsAnimationGroup(er);
            }

            Meshes = new Mesh[NrMeshes];
            for (int i = 0; i < NrMeshes; i++)
            {
                er.BaseStream.Position = MeshOffsets[i];
                Meshes[i] = new Mesh(er);
            }

            Shapes = new SeparateDataShape[NrShapes];
            for (int i = 0; i < NrShapes; i++)
            {
                er.BaseStream.Position = ShapeOffsets[i];
                Shapes[i] = new SeparateDataShape(er);
            }

            MeshNodeVisibilities = new MeshNodeVisibilityCtr[NrMeshNodes];
            for (int i = 0; i < NrMeshNodes; i++)
            {
                er.BaseStream.Position = MeshNodeVisibilitiesDict[i].DataOffset;
                MeshNodeVisibilities[i] = new MeshNodeVisibilityCtr(er);
            }

//.........这里部分代码省略.........
开发者ID:Ermelber,项目名称:EveryFileExplorer,代码行数:101,代码来源:CMDL.cs

示例5: POTIPoint

 public POTIPoint(EndianBinaryReader er)
 {
     Position = er.ReadVector3();
     Setting1 = er.ReadUInt16();
     Setting2 = er.ReadUInt16();
 }
开发者ID:Ermelber,项目名称:EveryFileExplorer,代码行数:6,代码来源:POTI.cs


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