Most efficient data structure for a 3d model?

Hey guys,

So, I've used JOGL before, and now I'm trying to make a program where I use my own model class- a simple class storing a set of 3d points and all the points they are connected to. What is the most efficient data structure to store those points in considering that to render a model I'm planning on iterating through the entire thing, drawing each triangle formed by the vertex connections; an prototype model class I made used arrays since accessing each vertex has O(1) but I wasn't sure if Java had something better suited or if there was a datastruc better suited- any thoughts would be hugely appreciated!

Re: Most efficient data structure for a 3d model?

A simple class with the three points and an arraylist of the connections.

Re: Most efficient data structure for a 3d model?

So, I'm assuming that's for a single triangle since you said three points; should I just do something similar for all those triangles (array/arraylist)?

Thanks

Re: Most efficient data structure for a 3d model?

The class could contain all the data needed for a point and then a list of the points it connects to.

Re: Most efficient data structure for a 3d model?