No, never. I think i have written something in the past to export jPCT data into ASC-format. I'll try to find that code...
Edit: This is the method i was using to export an Object3D to ASC. It doesn't store texture coords, but that's not to hard to add. They can be obtained from the PolygonManager as well and are part of the vertex list, i.e. instead of X:... Y:... Z:.... you would write: X:... Y:... Z:.... U:.... V:....
private void write(String dir, String name, Object3D obj) {
List vertices=new ArrayList();
List polys=new ArrayList();
PolygonManager pm=obj.getPolygonManager();
int max=pm.getMaxPolygonID();
//System.out.println(max);
for (int i=0; i<max; i++) {
SimpleVector[] p=new SimpleVector[3];
for (int pp=0; pp<3; pp++) {
p[pp]=pm.getTransformedVertex(i, pp);
}
int[] vnum=new int[3];
for (int pp=0; pp<3; pp++) {
int pos=vertices.indexOf(p[pp]);
if (pos==-1) {
vertices.add(p[pp]);
pos=vertices.size()-1;
}
vnum[pp]=pos;
}
polys.add(vnum);
}
try {
File f=new File(dir);
f.mkdirs();
System.out.println("Writing to disk: "+name);
OutputStream os=new FileOutputStream(dir+File.separatorChar+name);
PrintWriter pw=new PrintWriter(os);
pw.println("Named object: \""+name+"\"");
pw.println("Tri-mesh, Vertices: "+vertices.size()+" Faces: "+polys.size()+"");
pw.println("Vertex List:");
for (int i=0; i<vertices.size(); i++) {
SimpleVector v=(SimpleVector) vertices.get(i);
pw.println("Vertex "+i+": X:"+v.x+" Y:"+v.y+" Z:"+v.z);
}
pw.println("Face list:");
for (int i=0; i<polys.size(); i++) {
int[] ps=(int[]) polys.get(i);
pw.println("Face "+i+": A:"+ps[0]+" B:"+ps[1]+" C:"+ps[2]+" AB:1 BC:1 CA:1");
}
pw.close();
os.close();
} catch(Exception e) {
e.printStackTrace(); // Who cares?
}
}
Does this help?