getDepth method
Returns the depth of this BVH node in its hierarchy.
Implementation
double getDepth() {
double depth = 0;
BVHNode? parent = this.parent;
while ( parent != null ) {
parent = parent.parent;
depth ++;
}
return depth;
}
Returns the depth of this BVH node in its hierarchy.
double getDepth() {
double depth = 0;
BVHNode? parent = this.parent;
while ( parent != null ) {
parent = parent.parent;
depth ++;
}
return depth;
}