Extents for Entities #205
Answered
by
DJGosnell
jameswilliambell
asked this question in
Q&A
-
Is there any way to get the extents (bounding box) for an attribute (and/or a block). i.e. the MinX, MinY, MaxX, and MaxY values |
Beta Was this translation helpful? Give feedback.
Answered by
DJGosnell
Nov 18, 2023
Replies: 1 comment
-
Right now you have to loop through all the entities and calculate that yourself. You will also need to account for blocks and inserts, including rotation & scale, to get the full extents. When I've needed to calculate the bounds in the past, especially multiple times, I've used QuadTrees to query the objects extents. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jameswilliambell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now you have to loop through all the entities and calculate that yourself. You will also need to account for blocks and inserts, including rotation & scale, to get the full extents. When I've needed to calculate the bounds in the past, especially multiple times, I've used QuadTrees to query the objects extents.
https://stackoverflow.com/questions/41946007/efficient-and-well-explained-implementation-of-a-quadtree-for-2d-collision-det