public int GetDepth()
{
Quad quad = this;
int depth = 0;
while (quad.parent != null)
{
quad = quad.parent;
depth++;
}
return depth;
}