Hi,
Here are some snipets of code from a simulation I did.
For a updateable geometry I used this(the numVerts is the maximum allowed for the applicaction):
tris = new TriangleArray(numVerts, GeometryArray.COORDINATES | GeometryArray.NORMALS | GeometryArray.BY_REFERENCE);
tris.setCapability(GeometryArray.ALLOW_REF_DATA_WRITE);
tris.setCapability(GeometryArray.ALLOW_REF_DATA_READ);
tris.setCapability(GeometryArray.ALLOW_COUNT_READ);
tris.setCapability(GeometryArray.ALLOW_COUNT_WRITE);
For the appearance in lines this:
app.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_LINE, PolygonAttributes.CULL_BACK, 0));
Last, for the update, (using the GeometryUpdater interface):
public void updateData(Geometry geo){
TriangleArray tris = (TriangleArray)geo;
float[] coords = tris.getCoordRefFloat();
float[] norms = tris.getNormalRefFloat();
int validVerts = 0;
//Upadte your vertex/normal/texcoord..
//Now you can have a new number of vertices..
//set it to the geometry.
tris.setValidVertexCount(validVerts);
}
This method is called from the behaviors that receives the input.
SInce you want to show the lines and the vertices, you can have two Shape3D objects sharing the same geometry but using the line appearance y point appearance(look in the javadocs for the points, I also use CULL_NONE for them)
Rafael .-