phetsims / kite

A library for creating, manipulating and displaying 2D shapes in JavaScript.
http://scenerystack.org/
MIT License
15 stars 6 forks source link

Efficient bounding boxes over arbitrary transforms #24

Open jonathanolson opened 11 years ago

jonathanolson commented 11 years ago

Instead of transforming the shape and determining the bounding box, can we simply compute the bounding box given the transform?

May be useful for Scenery with Node's isInGlobalBounds( globalBounds, currentTransform ).

jonathanolson commented 10 years ago

Implemented, but only efficiently for line segments for now. Leaving open for efficient implementation for all segment types.