Example #1
0
        public void GetPointsWithinBoundary(BoundingCuboid area, ref List <Point3Int <T> > points)
        {
            if (!Boundary.DoesBoundaryCuboidIntersect(area))
            {
                return;
            }

            if (Points != null)
            {
                GetLocalPointsInCuboid(area, ref points);
            }
            else
            {
                ULF.GetPointsWithinBoundary(area, ref points);
                URF.GetPointsWithinBoundary(area, ref points);
                URB.GetPointsWithinBoundary(area, ref points);
                ULB.GetPointsWithinBoundary(area, ref points);
                BLF.GetPointsWithinBoundary(area, ref points);
                BRF.GetPointsWithinBoundary(area, ref points);
                BLB.GetPointsWithinBoundary(area, ref points);
                BRB.GetPointsWithinBoundary(area, ref points);
            }
        }
Example #2
0
		public static List<Entry> ProcessBlamFile(string path)
		{
			List<Entry> entries = null;

			using(IO.EndianReader s = new BlamLib.IO.EndianReader(path, BlamLib.IO.EndianState.Big))
			{
				BLF head = new BLF();
				try { head.Read(s); }
				catch (Debug.ExceptionLog) { return null; }
				entries.Add(head);

				uint group_tag;
				TagInterface.TagGroup tag_group;
				Entry e;

				while((group_tag = unchecked((uint)s.Peek())) != MiscGroups._eof.ID)
				{
					tag_group = Groups.FindTagGroup(group_tag);
					Debug.Assert.If(tag_group, "Unhandled group @0x{0:X} ('{1}')", s.Position, new string(TagInterface.TagGroup.FromUInt(group_tag)));

					Type t = (Type)tag_group.EngineData;

					System.Reflection.ConstructorInfo ci = t.GetConstructor(new Type[0]);
					e = (Entry)ci.Invoke(null);

					e.Read(s);
					entries.Add(e);
				}
			}

			return entries;
		}