Then you actually won't need the casts, thanks to ArrayList being generic.

EDIT: hmm, seems like cast is still necessary, my bad, and that code of yours still runs fine, put a print in a finally block and see what just attempted to cast, my guess is some other object got into your list.

"vertices", "quads" and "tris" are ArrayList's of their respective types.

If, as you seem to suggest "vertices" is an ArrayList<Vertice> or something like that, then the toArray function you call returns an array of Vertice(or whatever that type is), which is not an array of Transform (i.e. you cannot cast Transform[] to Vertice[]). Hence the class cast exception, which is what I would assume to be the problem.

Then you actually won't need the casts, thanks to ArrayList being generic.

EDIT: hmm, seems like cast is still necessary, my bad, and that code of yours still runs fine, put a print in a finally block and see what just attempted to cast, my guess is some other object got into your list.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org