本文整理汇总了C#中System.IO.BinaryWriter.WriteCoordinate方法的典型用法代码示例。如果您正苦于以下问题:C# BinaryWriter.WriteCoordinate方法的具体用法?C# BinaryWriter.WriteCoordinate怎么用?C# BinaryWriter.WriteCoordinate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.BinaryWriter
的用法示例。
在下文中一共展示了BinaryWriter.WriteCoordinate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteCameras
public static void WriteCameras(BinaryWriter bw, List<Camera> cameras)
{
bw.Write(cameras.Count);
foreach (var camera in cameras)
{
bw.WriteCoordinate(camera.EyePosition);
bw.WriteCoordinate(camera.LookPosition);
}
}
示例2: WritePathNode
private static void WritePathNode(BinaryWriter bw, PathNode node)
{
bw.WriteCoordinate(node.Position);
bw.Write(node.ID);
bw.WriteFixedLengthString(Encoding.UTF8, 128, node.Name);
bw.Write(node.Properties.Count);
foreach (var property in node.Properties)
{
WriteProperty(bw, property);
}
}
示例3: WriteMapEntity
private static void WriteMapEntity(BinaryWriter bw, Entity ent)
{
bw.WriteCString("CMapEntity");
WriteMapBase(bw, ent);
WriteEntityData(bw, ent.EntityData);
bw.Write(new byte[2]); // Unused
bw.WriteCoordinate(ent.Origin);
bw.Write(new byte[4]); // Unused
}
示例4: WriteFace
private static void WriteFace(BinaryWriter bw, Face face)
{
bw.WriteFixedLengthString(Encoding.UTF8, 256, face.Texture.Name);
bw.Write(new byte[4]);
bw.WriteCoordinate(face.Texture.UAxis);
bw.WriteDecimalAsSingle(face.Texture.XShift);
bw.WriteCoordinate(face.Texture.VAxis);
bw.WriteDecimalAsSingle(face.Texture.YShift);
bw.WriteDecimalAsSingle(face.Texture.Rotation);
bw.WriteDecimalAsSingle(face.Texture.XScale);
bw.WriteDecimalAsSingle(face.Texture.YScale);
bw.Write(new byte[16]);
bw.Write(face.Vertices.Count);
foreach (var vertex in face.Vertices)
{
bw.WriteCoordinate(vertex.Location);
}
bw.WritePlane(face.Vertices.Select(v => v.Location).ToArray());
}