本文整理汇总了C#中System.IO.BinaryWriter.WriteVector3f方法的典型用法代码示例。如果您正苦于以下问题:C# BinaryWriter.WriteVector3f方法的具体用法?C# BinaryWriter.WriteVector3f怎么用?C# BinaryWriter.WriteVector3f使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.BinaryWriter
的用法示例。
在下文中一共展示了BinaryWriter.WriteVector3f方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Serialize
public byte[] Serialize()
{
using (MemoryStream ms = new MemoryStream())
{
using (BinaryWriter bw = new BinaryWriter(ms))
{
bw.Write((uint)this.Flags);
bw.WriteVector3f(this.Position);
bw.Write(this.GlobalStartRadius);
bw.Write(this.GlobalEndRadius);
bw.Write(this.LandFog.Serialize());
bw.Write(this.UnderwaterFog.Serialize());
}
return ms.ToArray();
}
}
示例2: Serialize
public byte[] Serialize()
{
using (MemoryStream ms = new MemoryStream())
{
using (BinaryWriter bw = new BinaryWriter(ms))
{
foreach (Vector3f visibleVertex in this.VisibleVertices)
{
bw.WriteVector3f(visibleVertex);
}
}
return ms.ToArray();
}
}
示例3: Serialize
public byte[] Serialize()
{
using (MemoryStream ms = new MemoryStream())
{
using (BinaryWriter bw = new BinaryWriter(ms))
{
byte[] nameOffsetBytes = BitConverter.GetBytes(this.NameOffset);
byte[] finalNameOffsetBytes = new byte[3];
Buffer.BlockCopy(nameOffsetBytes, 0, finalNameOffsetBytes, 0, 3);
bw.Write(finalNameOffsetBytes);
bw.Write((byte)this.Flags);
bw.WriteVector3f(this.Position);
// TODO: Investigate whether or not this is a Quat16 in >= BC
bw.WriteQuaternion32(this.Orientation);
bw.Write(this.Scale);
bw.WriteBGRA(this.StaticLightingColour);
}
return ms.ToArray();
}
}
示例4: Serialize
public byte[] Serialize()
{
using (MemoryStream ms = new MemoryStream())
{
using (BinaryWriter bw = new BinaryWriter(ms))
{
foreach (Vector3f normal in this.Normals)
{
bw.WriteVector3f(normal);
}
}
return ms.ToArray();
}
}
示例5: Serialize
public byte[] Serialize()
{
using (MemoryStream ms = new MemoryStream())
{
using (BinaryWriter bw = new BinaryWriter(ms))
{
bw.Write((byte)this.Type);
bw.Write(this.bUseAttenuation);
bw.Write(this.bUseUnknown1);
bw.Write(this.bUseUnknown2);
bw.WriteBGRA(this.Colour);
bw.WriteVector3f(this.Position);
bw.Write(this.Intensity);
bw.Write(this.AttenuationStartRadius);
bw.Write(this.AttenuationEndRadius);
bw.Write(this.Unknown1StartRadius);
bw.Write(this.Unknown1EndRadius);
bw.Write(this.Unknown2StartRadius);
bw.Write(this.Unknown2EndRadius);
}
return ms.ToArray();
}
}
示例6: Serialize
public byte[] Serialize()
{
using (MemoryStream ms = new MemoryStream())
{
using (BinaryWriter bw = new BinaryWriter(ms))
{
bw.Write(this.WidthVertices);
bw.Write(this.HeightVertices);
bw.Write(this.WidthTileFlags);
bw.Write(this.HeightTileFlags);
bw.WriteVector3f(this.Location);
bw.Write(this.MaterialIndex);
foreach (LiquidVertex liquidVertex in this.LiquidVertices)
{
bw.Write(liquidVertex.Serialize());
}
foreach (LiquidFlags liquidFlag in this.LiquidTileFlags)
{
bw.Write((byte)liquidFlag);
}
}
return ms.ToArray();
}
}