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


C# BitPack.PackFixed方法代码示例

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


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

示例1: PackSystemBytes

 void PackSystemBytes(ref BitPack pack)
 {
     pack.PackBits(CRC, 32);
     pack.PackBits((uint)PartFlags, 32);
     pack.PackBits((uint)Pattern, 8);
     pack.PackFixed(MaxAge, false, 8, 8);
     pack.PackFixed(StartAge, false, 8, 8);
     pack.PackFixed(InnerAngle, false, 3, 5);
     pack.PackFixed(OuterAngle, false, 3, 5);
     pack.PackFixed(BurstRate, false, 8, 8);
     pack.PackFixed(BurstRadius, false, 8, 8);
     pack.PackFixed(BurstSpeedMin, false, 8, 8);
     pack.PackFixed(BurstSpeedMax, false, 8, 8);
     pack.PackBits(BurstPartCount, 8);
     pack.PackFixed(AngularVelocity.X, true, 8, 7);
     pack.PackFixed(AngularVelocity.Y, true, 8, 7);
     pack.PackFixed(AngularVelocity.Z, true, 8, 7);
     pack.PackFixed(PartAcceleration.X, true, 8, 7);
     pack.PackFixed(PartAcceleration.Y, true, 8, 7);
     pack.PackFixed(PartAcceleration.Z, true, 8, 7);
     pack.PackUUID(Texture);
     pack.PackUUID(Target);
 }
开发者ID:skidzTweak,项目名称:libopenmetaverse,代码行数:23,代码来源:ParticleSystem.cs

示例2: GetBytes

            /// <summary>
            /// Generate byte[] array from particle data
            /// </summary>
            /// <returns>Byte array</returns>
            public byte[] GetBytes()
            {
                byte[] bytes = new byte[86];
                BitPack pack = new BitPack(bytes, 0);

                pack.PackBits(CRC, 32);
                pack.PackBits((uint)PartFlags, 32);
                pack.PackBits((uint)Pattern, 8);
                pack.PackFixed(MaxAge, false, 8, 8);
                pack.PackFixed(StartAge, false, 8, 8);
                pack.PackFixed(InnerAngle, false, 3, 5);
                pack.PackFixed(OuterAngle, false, 3, 5);
                pack.PackFixed(BurstRate, false, 8, 8);
                pack.PackFixed(BurstRadius, false, 8, 8);
                pack.PackFixed(BurstSpeedMin, false, 8, 8);
                pack.PackFixed(BurstSpeedMax, false, 8, 8);
                pack.PackBits(BurstPartCount, 8);
                pack.PackFixed(AngularVelocity.X, true, 8, 7);
                pack.PackFixed(AngularVelocity.Y, true, 8, 7);
                pack.PackFixed(AngularVelocity.Z, true, 8, 7);
                pack.PackFixed(PartAcceleration.X, true, 8, 7);
                pack.PackFixed(PartAcceleration.Y, true, 8, 7);
                pack.PackFixed(PartAcceleration.Z, true, 8, 7);
                pack.PackUUID(Texture);
                pack.PackUUID(Target);

                pack.PackBits((uint)PartDataFlags, 32);
                pack.PackFixed(PartMaxAge, false, 8, 8);
                pack.PackColor(PartStartColor);
                pack.PackColor(PartEndColor);
                pack.PackFixed(PartStartScaleX, false, 3, 5);
                pack.PackFixed(PartStartScaleY, false, 3, 5);
                pack.PackFixed(PartEndScaleX, false, 3, 5);
                pack.PackFixed(PartEndScaleY, false, 3, 5);

                return bytes;
            }
开发者ID:3di,项目名称:3di-viewer-rei-libs,代码行数:41,代码来源:ParticleSystem.cs

示例3: PackLegacyData

 void PackLegacyData(ref BitPack pack)
 {
     pack.PackBits((uint)PartDataFlags, 32);
     pack.PackFixed(PartMaxAge, false, 8, 8);
     pack.PackColor(PartStartColor);
     pack.PackColor(PartEndColor);
     pack.PackFixed(PartStartScaleX, false, 3, 5);
     pack.PackFixed(PartStartScaleY, false, 3, 5);
     pack.PackFixed(PartEndScaleX, false, 3, 5);
     pack.PackFixed(PartEndScaleY, false, 3, 5);
 }
开发者ID:skidzTweak,项目名称:libopenmetaverse,代码行数:11,代码来源:ParticleSystem.cs


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