-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return bounding boxes #4
Comments
Hi @krober10nd , Yes, it is possible. Each leaf contains an instance of the AABB class, which has the attribute limits. The corners can be derived from the limits using a function like this: def limits2corners(limits):
n_dim = len(limits)
f = '{:0' + str(n_dim) + 'b}'
n_corners = 2 ** n_dim
corners = []
for i in range(n_corners):
inds = [int(s) for s in f.format(i)] # convert i to list of 0s and 1s
corner = [limits[d][ind] for d, ind in enumerate(inds)]
corners.append(corner)
return corners I could add this as a property of the AABB class, then the corners of each leaf would be in |
Yes that would help! Thanks for that! |
I added the |
Hey,
Is is possible to return the corners of the bounding box for each leaf? I would like to use the decomposition of an input point set in another algorithm.
Thanks!
The text was updated successfully, but these errors were encountered: