Skip to content

Extents for Entities #205

Answered by DJGosnell
jameswilliambell asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jameswilliambell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants