capsule.write(m_WallMidpoint, "midpoints", null);
capsule.write(m_WallDistance, "distances", null);
}
public void read(JmeImporter e) throws IOException {
InputCapsule capsule = e.getCapsule(this);
id = capsule.readInt("id", -1);
m_CellPlane = (Plane) capsule.readSavable("cellplane", new Plane());
Savable[] sav = capsule.readSavableArray("vertex", new Vector3f[3]);
for (int i = 0; i < sav.length; i++){
m_Vertex[i] = (Vector3f) sav[i];
}
m_CenterPoint = (Vector3f) capsule.readSavable("center", new Vector3f());
sav = capsule.readSavableArray("sides", new Line2D[3]);
for (int i = 0; i < sav.length; i++){
m_Side[i] = (Line2D) sav[i];
}
//done one level above in mesh
// m_Link = (Cell[]) capsule.readSavableArray("links", new Cell[3]);
sav = capsule.readSavableArray("midpoints", new Vector3f[3]);
for (int i = 0; i < sav.length; i++){
m_WallMidpoint[i] = (Vector3f) sav[i];
}
m_WallDistance = capsule.readFloatArray("distances", new float[3]);
}