How to get a Sphere's constituent triangles?

Is there a way to get a list of the triangles that make up a Sphere? (Yes, I realize that I have to not-share geometry, if I don’t want the triangles for EVERY sphere :))

I’m actually trying to decompose a sphere that’s in my scene, and do effects with the triangles that made it up. Think like an explosion – so I want to remove the “Sphere” object, and replace it with the however-many-triangles objects, then have them move outward from the center and rotate.

Sure, I could do this all “by hand” – I was just curious if there was some way to get the J3D API to hand me all the bits, pre-made.

Thanks!

If all else fails it doesn’t take long to generate a sphere; it’s only simple geometry!

Well, I guess that you could grab the Shape3D from the Sphere, and then the GeometryArray (probably a TriangleStripArray) from that Shape3D to get the triangles. IIRC, the current version of Sphere in J3D does something extra to attempt optimal discretization for a given resolution - look at the source code for Sphere in the utils. To dynamically alter the vertex positions, look at the BY_REFERENCE option in the GeometryArray API.

–Vaidya