}
public void write(JmeExporter e) throws IOException {
super.write(e);
OutputCapsule capsule = e.getCapsule(this);
capsule.write(top, "top", null);
capsule.write(right, "right", null);
capsule.write(bottom, "bottom", null);
capsule.write(left, "left", null);
capsule.write(worldTranslation, "worldpos", null);
//FIXME ev. override ? and do it only once?
HashMap<Cell, Integer> tmp = new HashMap<Cell, Integer>();
for(int i =0; i<mCellArray.length; i++)
tmp.put(mCellArray[i], i);
int r=0;
int[] vals = new int[borders.keySet().size()];
for(Cell i : borders.keySet())
vals[r++]=tmp.get(i);
capsule.write(vals, "borders_keys",null);
r=0;
for(Integer i : borders.values())
vals[r++]=i;
capsule.write(vals, "borders_values",null);
for(int i=0;i<8;i++){
vals = new int[allBorders.get(i).size()];
r = 0;
for(Cell c : allBorders.get(i))
vals[r++]=tmp.get(c);
capsule.write(vals, "allborders"+i,null);
}
}