-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cs
32 lines (26 loc) · 1 KB
/
main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
namespace CSharpOctree {
public class Test
{
static public void Main(string[] args)
{
double min = 0.0d, max = 100.0d;
int limit = 100000;
Octree oc = new Octree(min, max, min, max, min, max, 5);
Random random = new Random();
for (int i = 0; i < limit; i++)
{
double x = random.NextDouble() * (max - min) + min;
double y = random.NextDouble() * (max - min) + min;
double z = random.NextDouble() * (max - min) + min;
Console.WriteLine("Added " + i + " - " + x + " " + y + " " + z);
oc.Add(x, y, z, i);
}
Console.WriteLine(oc.printTree());
Console.WriteLine("Depth: " + oc.getDepth());
Console.WriteLine("Outer Nodes: " + oc.getNumberOfOuterNodes());
Console.WriteLine("Representations: " + oc.getRepresentation().Count);
}
}
}