Skip to main content

GeometryArrayRetained

2 replies [Last post]
Clifford Lyon
Offline
Joined: 2006-02-17

3d gurus: I have a SimpleUniverse scene that was performing reasonably well. I added the ability for a user to add and remove a branchgroup interactively. Now, updates to the data in the scene - e.g., changing the color attribute of points in a point array - spend a lot of time in this method, according to hprof:

javax.media.j3d.GeometryArrayRetained.computeBoundingBox

And the display freezes while it's happening. (I can't say for sure it's related, just the when I finished the tweaking, the behavior had changed)

I'm not sure what Java is doing here. I compute a single bounds object for the whole scene, and use it for each component. (and it's a sphere.) Any thoughts on why this would crop up?

tia

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
herkules
Offline
Joined: 2003-06-12

have you played around with setBoundsAutoCompute()?

Clifford Lyon
Offline
Joined: 2006-02-17

Thanks - I did try setting it to 'true' for the PointArray, but it still spends a lot of time in that method. I did not call that method at all in the original version that doesn't spend time in that method.

I'm thinking I must've flipped some bit that's causing the update to do extra work, but can't seem to find it.