Beispiel #1
0
        public void Serialize(Object3D obj)
        {
            byte[] data = Encoding.ASCII.GetBytes(obj.ObjectFile.PadRight(80, '\0'));
            writer.Write(data);

            Serialize(obj.ObjectPosition);
            Serialize(obj.ObjectRotation);

            writer.Write(obj.SelfLit);
            writer.Write(obj.Blended);
            writer.Write(new byte[2]);

            Serialize(obj.ObjectColor);
            writer.Write(new byte[24]);
        }
Beispiel #2
0
 public ObjectPOINode(ClusteredMap map, Object3D object3d)
     : base(map, (short)(object3d.Location.X * 2 + 0.5), (short)(object3d.Location.Y * 2 + 0.5))
 {
     this.objectId = object3d.ObjectID;
 }
Beispiel #3
0
 public void Serialize(Object3D obj)
 {
     writer.WriteElementString("filename", obj.ObjectFile);
     writer.WriteStartElement("position");
     Serialize(obj.ObjectPosition);
     writer.WriteEndElement();
     writer.WriteStartElement("rotation");
     Serialize(obj.ObjectRotation);
     writer.WriteEndElement();
     writer.WriteStartElement("color");
     Serialize(obj.ObjectColor);
     writer.WriteEndElement();
     writer.WriteElementString("self_lit", obj.SelfLit.ToString());
     writer.WriteElementString("blended", obj.Blended.ToString());
 }