def translateLocal(x: Double, y: Double, m: Matrix4, store: MutableVector3) = { synchronized { storeRay.origin.set(0.0, 0.0, 0.0) storeRay.direction.set(x, y, -nearDistance) storeMatrix.set(m) storeMatrix.invert() storeRay.transform(storeMatrix) storeRay.translateLocal(store) store } }
Today I'm working on integration of this within the Component architecture to support determination of hits within bounding regions. This does not create any additional garbage and I can run this on my machine about a million times in 700ms. Ideally I'd like the performance to be better than that, but since this does not absolutely have to be done within the rendering thread and with optimizations to limit the checks in the first place the performance should be fine.
Upgrading to LWJGL 2.4.2 from 2.2.2 gave me a framerate improvement of about 40% in my examples which is nice. :)
Next steps are to finish bounding support for BoundingQuad (what all my 2D UI components will use) and then start working on Scale-9 images, Label, TextInput, and multi-line text support with selection ability along with focus management.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.