public void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddVector3("Origin", Origin); info.AddValue("TileWidth", TileWidth); info.AddValue("TileHeight", TileHeight); info.AddValue("MaxTiles", MaxTiles); info.AddValue("MaxPolys", MaxPolys); }
public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue("header", Header); info.AddValue("navVerts.Count", NavVerts.Count); for (int i = 0; i < NavVerts.Count; i++) { info.AddVector3(string.Format("navVerts.{0}", i), NavVerts[i]); } info.AddValue("navPolys.Count", NavPolys.Count); for (int i = 0; i < NavPolys.Count; i++) { info.AddValue(string.Format("navPolys.{0}", i), NavPolys[i]); } info.AddValue("navDMeshes.Count", NavDMeshes.Count); for (int i = 0; i < NavDMeshes.Count; i++) { info.AddValue(string.Format("navDMeshes.{0}", i), NavDMeshes[i]); } info.AddValue("navDVerts.Count", NavDVerts.Count); for (int i = 0; i < NavDVerts.Count; i++) { info.AddVector3(string.Format("navDVerts.{0}", i), NavDVerts[i]); } info.AddValue("navDTris.Count", NavDTris.Count); for (int i = 0; i < NavDTris.Count; i++) { info.AddInt4(string.Format("navDTris.{0}", i), NavDTris[i]); } info.AddValue("navBvtree.Count", NavBvtree.Count); for (int i = 0; i < NavBvtree.Count; i++) { info.AddValue(string.Format("navBvtree.{0}", i), NavBvtree[i]); } info.AddValue("offMeshCons.Count", OffMeshCons.Count); for (int i = 0; i < OffMeshCons.Count; i++) { info.AddValue(string.Format("offMeshCons.{0}", i), OffMeshCons[i]); } }
public void GetObjectData(SerializationInfo info, StreamingContext context) { if (info is null) { throw new ArgumentNullException(nameof(info)); } info.AddValue("Type", TYPE_NAME); info.AddVector3(nameof(Position), Position); info.AddQuaternion(nameof(Orientation), Orientation); }
public void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddVector3("Origin", Origin); info.AddValue("CellSize", CellSize); info.AddValue("CellHeight", CellHeight); info.AddValue("Width", Width); info.AddValue("Height", Height); info.AddValue("WalkableHeight", WalkableHeight); info.AddValue("WalkableRadius", WalkableRadius); info.AddValue("WalkableClimb", WalkableClimb); info.AddValue("MaxSimplificationError", MaxSimplificationError); info.AddValue("MaxTiles", MaxTiles); info.AddValue("MaxObstacles", MaxObstacles); }
public void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue("magic", Magic); info.AddValue("version", Version); info.AddValue("x", X); info.AddValue("y", Y); info.AddValue("layer", Layer); info.AddValue("userId", UserId); info.AddValue("polyCount", PolyCount); info.AddValue("vertCount", VertCount); info.AddValue("maxLinkCount", MaxLinkCount); info.AddValue("detailMeshCount", DetailMeshCount); info.AddValue("detailVertCount", DetailVertCount); info.AddValue("detailTriCount", DetailTriCount); info.AddValue("bvNodeCount", BvNodeCount); info.AddValue("offMeshConCount", OffMeshConCount); info.AddValue("offMeshBase", OffMeshBase); info.AddValue("walkableHeight", WalkableHeight); info.AddValue("walkableRadius", WalkableRadius); info.AddValue("walkableClimb", WalkableClimb); info.AddVector3("bmin", BMin); info.AddVector3("bmax", BMax); info.AddValue("bvQuantFactor", BvQuantFactor); }
/// <summary> /// Adds a BoundingBox instance to a serialization info object /// </summary> /// <param name="info">Serialization info</param> /// <param name="name">Name</param> /// <param name="value">Value</param> public static void AddBoundingBox(this SerializationInfo info, string name, BoundingBox value) { info.AddVector3(string.Format("{0}.Min", name), value.Minimum); info.AddVector3(string.Format("{0}.Max", name), value.Maximum); }