I don’t think it would be good for memory reasons and more importantly because you will want to send data to the video card via nio buffers.
If you want to wrap it, I would suggest doing it by creating a proxy to the data using a Vertex manager type of class with static mehtods that manag looking up and storing data in a nio buffer.
For example (quick and dirty):
class VertexManager {
public static final int BLOCK_SIZE = 3;
FloatBuffer buffer;
public VertexManager(FloatBuffer b) {
buffer = b;
}
public void set(int index, float x, float y, float z) {
int pointer = index* BLOCK_SIZE;
buffer.put( p, x) ;
buffer.put( p+1, y);
buffer.put( p+2, z);
}
public float getX(int index) {
return buffer.get(index*BLOCK_SIZE);
}
public float getY(int index) {
return buffer.get(index*BLOCK_SIZE+1);
}
public float getZ(int index) {
return buffer.get(index*BLOCK_SIZE+2);
}
public void setX(int index, float x) {
return buffer.put(index*BLOCK_SIZE, x);
}
... etc...
}
By doing it this way all vertex data can be stored in one giant FloatBuffer and sent to the video card as such. You save creating millions of instances of the vertex class and you get some (most) of the management that would give you. You could expand this class out with pointers to other buffers (could use the same buffer with interleaving) with texture coordinates, colors, normals, etc. You could also easily modify it all with a relative offset so that multiple VertexManagers could be used to manage a single nio buffer.
In this example, to access the 1000th vertex would just be:
VertexManager vm = new VertexManager( vertexbuffer );
float x = Vertex.getX(1000 ) ;
vm.set(1000, x / 2f);
BLOCK_SIZE would be 3 for this example, but if your data was interleaved (or whatever else), it would be whatever length of data the VertexManager class is typically managing for a single vertex.
Now…with all that you can create a EntityManager that accesses VertexManagers. Then you can abstract out entire entities with just a couple of objects…so you wouldn’t create a polygon class, but you would create an Entity type of object that manages all the vertices for you. Doing it this way, all actual data could be stored in a single nio buffer and you only get a few actual objects created (one for each entity and one or more for each set of vertices it’s managing…arms, legs, ?..etc.). This is also where you can get your sorting by creating new VertexManagers within entities for the various data types you want to sort on (texture, color, etc).
This works pretty well for me and is how I do things in my engine.
My two cents.