What is the meaning of "AabbTree.overlaps_aabb()" result ? #82
Replies: 2 comments 5 replies
-
@MaartenBehn can probably answer this question. Could you also correct the docstring? |
Beta Was this translation helpful? Give feedback.
-
You are right the docstring is not correct. Because this behavior is not really reliable. I will also add another list to the aabb tree which maps the insertion order to the internal indices. aabb1 = np.array([[0, 10], [0, 10], [0, 10]], dtype=np.float64)
aabb2 = np.array([[8, 12], [3, 4], [4, 5]], dtype=np.float64)
aabb3 = np.array([[20, 30], [0, 1], [0, 2]], dtype=np.float64)
aabb4 = np.array([[-50, 50], [-50, 50], [-50, 50]], dtype=np.float64)
aabb_tree = AabbTree()
aabb_tree.insert_aabb(aabb1, 1)
aabb_tree.insert_aabb(aabb2, 2)
aabb_tree.insert_aabb(aabb3, 3)
overlap_flag_1, overlaps_1 = aabb_tree.overlaps_aabb(aabb1)
print(overlap_flag_1)
for overlap in overlaps_1:
print(aabb_tree.external_data_list[overlap])
overlap_flag_4, overlaps_4 = aabb_tree.overlaps_aabb(aabb4)
print(overlap_flag_4)
for overlap in overlaps_4:
print(aabb_tree.external_data_list[overlap]) |
Beta Was this translation helpful? Give feedback.
-
Can somebody explain the result of
AabbTree.overlaps_aabb()
?I can't make any sense of the result, it looks different compared to the docstring where the result contains "pairs" and the numbers look strange:
which prints
What is the meaning of second value of the returned tuple ?
external_data
of the AABBs that overlap with the given aabb ? Why do I get0
? This is not anyexternal_data
I have used.3
? I only inserted 3 AABBs, expecting at max index2
.Beta Was this translation helpful? Give feedback.
All reactions