I am trying to figure out how I can get and modify a Vertex buffer position while knowing the triangle index of the mesh.
Somewhat working code below, I cannot make sense of the VBO and how the verts are described. Basically the idea is to select a tri on the mesh, then move it along an axis so it becomes deformed.
`
Triangle t = new Triangle();
results.getClosestCollision().getTriangle(t);
System.out.println(t.getIndex());
results.getCollision(i).getGeometry().getMesh().setDynamic();
//System.out.println(results.getCollision(i).getGeometry().getMesh().getBufferList())
VertexBuffer buf = results.getCollision(i).getGeometry().getMesh().getBuffer(VertexBuffer.Type.Position);
VertexBuffer bufi = results.getCollision(i).getGeometry().getMesh().getBuffer(VertexBuffer.Type.Index);
FloatBuffer pos = (FloatBuffer) buf.getData();
ShortBuffer ind = (ShortBuffer) bufi.getData();
int id = t.getIndex(); //ind.get
float fpos = pos.get(id);//(ind.get(t.getIndex()));
//pos.rewind();
pos.put(id,fpos*5);
//pos.flip();
results.getCollision(i).getGeometry().getMesh().clearBuffer(VertexBuffer.Type.Position);
buf.updateData(pos); //apply to vbo
results.getCollision(i).getGeometry().getMesh().setBuffer(buf);
`