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


C# EndianBinaryWriter.WriteVector3方法代码示例

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


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

示例1: Write

 public override void Write(EndianBinaryWriter er)
 {
     base.Write(er);
     er.WriteVector3(CenterPosition);
     er.WriteVector3(Size);
 }
开发者ID:Ermelber,项目名称:EveryFileExplorer,代码行数:6,代码来源:BoundingVolume.cs

示例2: Write

        public void Write(EndianBinaryWriter er, CGFXWriterContext c)
        {
            long basepos = er.BaseStream.Position;
            er.Write(Type);
            er.Write(Signature, Encoding.ASCII, false);
            er.Write(Revision);
            c.WriteStringReference(Name, er);
            er.Write(Unknown2);
            er.Write(Unknown3);
            er.Write(Flags);
            er.Write((uint)(IsBranchVisible ? 1 : 0));
            er.Write(NrChildren);
            er.Write(Unknown7);
            er.Write(NrAnimationGroupDescriptions);
            long anmgrpdescdictoffs = er.BaseStream.Position;
            er.Write((uint)0);
            er.WriteVector3(Scale);
            er.WriteVector3(Rotation);
            er.WriteVector3(Translation);
            er.Write(LocalMatrix, 0, 4 * 3);
            er.Write(WorldMatrix, 0, 4 * 3);

            er.Write(NrMeshes);
            long mshoffsoffs = er.BaseStream.Position;
            er.Write((uint)0);

            er.Write(NrMaterials);
            long matdictoffs = er.BaseStream.Position;
            er.Write((uint)0);

            er.Write(NrShapes);
            long shpoffsoffs = er.BaseStream.Position;
            er.Write((uint)0);

            er.Write(NrMeshNodes);
            long mshnodedictoffs = er.BaseStream.Position;
            er.Write((uint)0);

            er.Write(Unknown23);
            er.Write(Unknown24);
            er.Write(Unknown25);

            long skeletonoffs = er.BaseStream.Position;
            if (Skeleton != null) er.Write((uint)0);

            //seems to be padded to 8 bytes
            while ((er.BaseStream.Position % 8) != 0) er.Write((byte)0);

            long meshoffs = er.BaseStream.Position;
            er.BaseStream.Position = mshoffsoffs;
            er.Write((uint)(meshoffs - mshoffsoffs));
            er.BaseStream.Position = meshoffs;
            er.Write(new uint[NrMeshes], 0, (int)NrMeshes);

            long shpoffs = er.BaseStream.Position;
            er.BaseStream.Position = shpoffsoffs;
            er.Write((uint)(shpoffs - shpoffsoffs));
            er.BaseStream.Position = shpoffs;
            er.Write(new uint[NrShapes], 0, (int)NrShapes);

            long anmgrpdict = er.BaseStream.Position;
            if (NrAnimationGroupDescriptions != 0 && AnimationInfoDict != null)
            {
                er.BaseStream.Position = anmgrpdescdictoffs;
                er.Write((uint)(anmgrpdict - anmgrpdescdictoffs));
                er.BaseStream.Position = anmgrpdict;
                AnimationInfoDict.Write(er, c);
            }

            long matdict = er.BaseStream.Position;
            if (NrMaterials != 0 && MaterialsDict != null)
            {
                er.BaseStream.Position = matdictoffs;
                er.Write((uint)(matdict - matdictoffs));
                er.BaseStream.Position = matdict;
                MaterialsDict.Write(er, c);
            }

            long mshnoddict = er.BaseStream.Position;
            if (NrMeshNodes != 0 && MeshNodeVisibilitiesDict != null)
            {
                er.BaseStream.Position = mshnodedictoffs;
                er.Write((uint)(mshnoddict - mshnodedictoffs));
                er.BaseStream.Position = mshnoddict;
                MeshNodeVisibilitiesDict.Write(er, c);
            }

            for (int i = 0; i < NrAnimationGroupDescriptions; i++)
            {
                long curpos = er.BaseStream.Position;
                long bpos = er.BaseStream.Position = anmgrpdict + 0x1C + i * 0x10 + 0xC;
                er.Write((uint)(curpos - bpos));
                er.BaseStream.Position = curpos;
                AnimationGroupDescriptions[i].Write(er, c);
            }

            for (int i = 0; i < NrMeshes; i++)
            {
                while ((er.BaseStream.Position % 8) != 0) er.Write((byte)0);
                long curpos = er.BaseStream.Position;
//.........这里部分代码省略.........
开发者ID:Ermelber,项目名称:EveryFileExplorer,代码行数:101,代码来源:CMDL.cs


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